Vals using @mux/mux-node
Description from the NPM package:
The official TypeScript library for the Mux API
decepulis
MuxAITranscript
HTTP
Generate CuePoints and transcripts for your Mux video Adapted from the blog post, Build an AI-powered interactive video transcript with Mux Player CuePoints This Val exposes an HTTP endpoint that takes a Mux Asset ID and a list of speakers and Uses Mux's auto-generated captions to generate a CuePoints object for Mux Player Uses AssemblyAI for speaker labeling (diarization) Uses GPT-4o to format text Fork it and use it as a foundation for your own interactive video transcript project. Usage: Required environment variables: Mux Access token details ( MUX_TOKEN_ID , MUX_TOKEN_SECRET ) This endpoint requires an existing Mux asset that's ready with an audio-only static rendition associated with it. You can run this val to create a new one for testing. AssemblyAI API key ( ASSEMBLYAI_API_KEY ). Get it from their dashboard here OpenAI API key ( OPENAI_API_KEY ). Get it from their dashboard here Make a POST request to the Val's endpoint with the following body, replacing the values with your own asset ID and the list of speakers. Speakers are listed in order of appearance. {
"asset_id": "00OZ8VnQ01wDNQDdI8Qw3kf01FkGTtkMq2CW901ltq64Jyc",
"speakers": ["Matt", "Nick"]
} Limitations This is just a demo, so it's obviously not battle hardened. The biggest issue is that it does this whole process synchronously, so if the any step takes longer than the Val's timeout, you're hosed.
0
mux
seiveDubbing
HTTP
Dub Mux Videos using Sieve This Val exposes an HTTP endpoint that takes a Mux Asset ID and a list of languages, creates dubbed versions of the audio tracks using Sieve , then adds those dubbed audio tracks back to the Mux asset as new audio tracks. Usage: Required environment variables: Sieve API token ( SIEVE_API_KEY ) Mux Access token details ( MUX_TOKEN_ID , MUX_TOKEN_SECRET )
This endpoint requires an existing Mux asset that's ready with an audio-only static rendition associated with it. You can run this val to create a new one for testing. Make a POST request to the Val's endpoint with the following body, replacing the values with your own asset ID and the list of languages you want to create. {
"asset_id": "00OZ8VnQ01wDNQDdI8Qw3kf01FkGTtkMq2CW901ltq64Jyc",
"languages": ["es", "fr", "nl"]
} Limitations This is just a demo, so it's obviously not battle hardened. The biggest issue is that it does this whole process synchronously, so if the Sieve dubbing process takes longer than the Val's timeout, you're hosed.
2
mux
videoStorage
Script
Video Storage Intended to be imported into other Vals and used with Mux Webhooks (like our webhookHandler . Stores videos off into Sqlite. Webhook handlers At least these are how we use them in the webhookHandler | Function | Mux Event | Note |
|------------------|-------------------|-------------------------------|
| createVideo() | video.upload.created | Triggered when a direct upload is initially created |
| updateVideoCreated() | video.upload.asset_created | Triggered when an asset is created |
| updateVideoReady() | video.asset.ready | An asset is ready for playback | Others getAllVideos Lists all the videos in the database backfillVideo Takes a video object and puts it in the DB. Useful if you're iterating over to...you guessed it, backfill content.
0