mux-video
Audited by Runlayer on Feb 21, 2026
Malicious tool definition detected
Tool: SKILL.md [1/2] Description: --- name: mux-video description: Comprehensive guide to building video applications with Mux, the developer-first video infrastructure platform.
Tool: SKILL.md [2/2] Description: Strategies for reducing encoding, storage, and delivery costs | --- ## Examples ### Getting Started | File | Description | |------|-------------| | [examples/quickstart-stream-video.md](examples/quickstart-stream-video.md) | Complete guide to uploading and playing your first video | | [examples/webhook-signature-verification.md](examples/webhook-signature-verification.md) | Verifying webhook signatures in Node.js, Python, and Ruby | ### Player Integration | File
Malicious tool definition detected
Tool: examples/ai-video-workflows.md [1/4] Description: # AI Video Workflows with @mux/ai Complete guide to using the `@mux/ai` library for AI-powered video workflows including automatic chapter generation, video summarization and tagging, content moderation, video recommendations with embeddings, subtitle translation, and audio dubbing.
Tool: examples/ai-video-workflows.md [2/4] Description: = await getModerationScores("your-mux-asset-id", { provider: "openai" }); // Using Hive const result = await getModerationScores("your-mux-asset-id", { provider: "hive" }); ``` ### Configuring Thresholds Thresholds use a 0-1 scale where higher values mean stricter moderation (fewer false positives): ```javascript const result = await getModerationScores("your-mux-asset-id", { thresholds: { sexual: 0.7, // Flag content with 70%+ confidence o
Tool: examples/ai-video-workflows.md [3/4] Description: Language Support Uses ISO 639-1 language codes.
Tool: examples/ai-video-workflows.md [4/4]
Malicious tool definition detected
Tool: examples/cms-setup-sanity.md Description: # Setting Up Mux Video with Sanity CMS This guide walks through the complete process of integrating Mux video with Sanity CMS, allowing content teams to upload videos to Mux directly from the Sanity Studio interface.
Malicious tool definition detected
Tool: examples/content-moderation-strategies.md [1/2] Description: # Content Moderation Strategies Comprehensive guide to moderating user-generated video content on your platform.
Tool: examples/content-moderation-strategies.md [2/2] Description: CSV files or Streaming Exports for external analysis **Note**: The High Delivery Webhook "delivery rate" is different from "Views" tracked by Mux Data.
Malicious tool definition detected
Tool: examples/custom-analytics-integration.md [1/3] Description: # Building a Custom Analytics Integration This guide provides a practical example of building a comprehensive custom Mux Data integration.
Tool: examples/custom-analytics-integration.md [2/3] Description: `fatal` or `warning` 5. Set **Error Type**: `playback failure` or `business exception` ### Implementing Error Categorization in SDKs #### Web SDKs ```js function errorTranslator(error) { return { player_error_code: translateCode(error.player_error_code), player_error_message: translateMessage(error.player_error_message), player_error_context: translateContext(error.player_error_context), player_error_severity: translateSeverity(er
Tool: examples/custom-analytics-integration.md [3/3]
Malicious tool definition detected
Tool: examples/direct-upload-with-webhooks.md [1/2] Description: # Complete Direct Upload Implementation with Webhooks This guide provides an end-to-end example of implementing video uploads in a web application using Mux Direct Uploads.
Tool: examples/direct-upload-with-webhooks.md [2/2] Description: db.get(eventData.passthrough); await db.put(item.id, { ...item, asset: eventData, }); break; } case 'video.upload.cancelled': { // Upload was cancelled - update internal state const item = await db.findByUploadId(eventData.passthrough); await db.put(item.id, { ...item, status: 'cancelled_upload' }); break; } default: // Mux sends webhooks for many events, ignore others for now console.log('some other event!', eventType, eventData);
Malicious tool definition detected
Tool: examples/drm-protected-playback.md [1/2] Description: # Playing DRM-Protected Videos This guide demonstrates how to configure DRM-protected playback across web, iOS, and Android platforms, including token generation and player configuration.
Tool: examples/drm-protected-playback.md [2/2]
Malicious tool definition detected
Tool: examples/live-captions-and-simulcasting.md [1/2] Description: # Live Captions and Simulcasting Example This guide demonstrates how to enable auto-generated captions on a Mux live stream, create transcription vocabularies for improved accuracy, and set up simulcasting to stream to multiple platforms like YouTube and Facebook simultaneously.
Tool: examples/live-captions-and-simulcasting.md [2/2]
Malicious tool definition detected
Tool: examples/live-streaming-complete-setup.md [1/2] Description: # Complete Live Streaming Setup Example This guide provides an end-to-end example showing how to create a live stream with reduced latency, configure OBS for streaming, handle webhooks for stream lifecycle events, and play back the live stream using Mux Player. ## Overview Building a live streaming platform with Mux involves these key steps: 1.
Tool: examples/live-streaming-complete-setup.md [2/2] Description: add the `low_latency=false` parameter: ``` https://stream.mux.com/{PLAYBACK_ID}.m3u8?low_latency=false ``` ## Low Latency Input Requirements For best results with `reduced` or `low` latency modes, ensure you have control over: - The encoder software - The hardware running the encoder - The network the encoder is connected to **Note:** Home networks and mobile connections are often not stable enough for reliable `reduced` or `low`
Malicious tool definition detected
Tool: examples/mobile-player-integration-example.md [1/3] Description: # Mobile Player Integration Examples Practical code examples for integrating Mux Data with ExoPlayer on Android and AVPlayer on iOS/tvOS, including SDK initialization, metadata configuration, Google IMA ads integration, and video change handling.
Tool: examples/mobile-player-integration-example.md [2/3] Description: init]; viewData.viewSessionId = @"some session id"; MUXSDKCustomData *customData = [[MUXSDKCustomData alloc] init]; [customData setCustomData1:@"my-data-string"]; [customData setCustomData2:@"my-custom-dimension-2"]; MUXSDKCustomerViewerData *viewerData = [[MUXSDKCustomerViewerData alloc] init]; viewerData.viewerApplicationName = @"MUX DemoApp"; MUXSDKCustomerData *customerData = [[MUXSDKCustomerData alloc] initWithCustomerPl
Tool: examples/mobile-player-integration-example.md [3/3] Description: register as a delegate for the adsManager too func adsLoader(_ loader: IMAAdsLoader!, adsLoadedWith adsLoadedData: IMAAdsLoadedData!) { adsManager = adsLoadedData.adsManager; adsManager.delegate = self; adsListener?.monitorAdsManager(adsManager) } // all of these events get fired by the adsManager delegate func adsManager(_ adsManager: IMAAdsManager!, didReceive event: IMAAdEvent!) { if (event.type == kIMAAdEvent_LOADED) { ad
Malicious tool definition detected
Tool: examples/mux-player-web-setup.md [1/2] Description: # Setting Up Mux Player for Web This guide provides step-by-step instructions for setting up Mux Player in a web application using HTML, React, and iframe embed methods, including metadata configuration and basic customization.
Tool: examples/mux-player-web-setup.md [2/2]
Malicious tool definition detected
Tool: examples/quickstart-stream-video.md [1/2] Description: # Quickstart: Stream Videos in Five Minutes Upload and play back your video files in your application using Mux in five minutes or less. ## Prerequisites - Mux account with access to dashboard - Access token with Mux Video Read and Write permissions ## Overview This guide walks through the essential steps to stream your first video with Mux: 1.
Tool: examples/quickstart-stream-video.md [2/2] Description: style="aspect-ratio: 16/9; width: 100%; border: 0;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true" ></iframe> ``` **Swift (iOS):** ```swift import SwiftUI import AVKit let playbackID = "qxb01i6T202018GFS02vp9RIe01icTcDCjVzQpmaB00CUisJ4" struct ContentView: View { private let player = AVPlayer( url: URL.makePlaybackURL( playbackID: playbackID ) ) var body: some View { // VideoPlay
Malicious tool definition detected
Tool: examples/react-native-stories-app.md [1/4] Description: # Building a Stories/Reels Video App Complete walkthrough of building an Instagram Stories or TikTok-style vertical video app with React Native and Mux, featuring AI video generation, Stories-style playback, and engagement features.
Tool: examples/react-native-stories-app.md [2/4] Description: Bottom gradient and content */} <LinearGradient colors={['transparent', 'rgba(0,0,0,0.8)']} style={styles.bottomGradient} > <View style={styles.bottomContent}> {/* Left side: User info and caption */} <View style={styles.leftContent}> <Text style={styles.username}>@{username}</Text> <Text style={styles.title} numberOfLines={2}> {title} </Text> <Text style={styles.views}> {formatNumber(viewCount)} views </Text> </View> {/* Right side:
Tool: examples/react-native-stories-app.md [3/4] Description: response = await fetch('https://your-api.com/generate-upload-url', { method: 'POST', }); const { uploadUrl, uploadId } = await response.json(); // Step 2: Upload video file to Mux with progress tracking const uploadTask = FileSystem.createUploadTask( uploadUrl, videoUri, { httpMethod: 'PUT', uploadType: FileSystem.FileSystemUploadType.BINARY_CONTENT, }, (uploadProgress) => { const progress = uploadProgress.totalBytesSent / uploadProgr
Tool: examples/react-native-stories-app.md [4/4] Description: default uuid_generate_v4(), user_id uuid references auth.users(id), video_id uuid references videos(id), created_at timestamp with time zone default now(), unique(user_id, video_id) ); -- Realtime setup alter publication supabase_realtime add table videos; ``` --- ## Error Handling ### Direct Upload Errors | Error | Cause | Solution | |-------|-------|----------| | Network timeout | Slow/unstable connection | Implement retry logic, al
Malicious tool definition detected
Tool: examples/react-native-video-upload-workflow.md [1/5] Description: # Video Upload Workflow in React Native This guide provides a complete step-by-step implementation for uploading videos to Mux from React Native applications.
Tool: examples/react-native-video-upload-workflow.md [2/5] Description: URL (AI-Generated Videos) This approach is ideal when videos are generated by AI services or already hosted elsewhere.
Tool: examples/react-native-video-upload-workflow.md [3/5] Description: videoId) .single(); if (data) { setVideo(data); setLoading(false); } }; fetchVideo(); // Subscribe to realtime updates const subscription = supabase .channel(`video-${videoId}`) .on( 'postgres_changes', { event: 'UPDATE', schema: 'public', table: 'videos', filter: `id=eq.${videoId}`, }, (payload) => { console.log('Video updated:', payload.new); setVideo(payload.new as Video); } ) .subscribe(); return () => { subscription.uns
Tool: examples/react-native-video-upload-workflow.md [4/5] Description: userId } }); if (user.pushToken) { await fetch('https://exp.host/--/api/v2/push/send', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ to: user.pushToken, title: 'Your video is ready!', body: 'Tap to watch your AI-generated video', data: { videoId, playbackId }, }), }); } } ``` ### Handle Notification Tap ```tsx import { useEffect, useRef } from 'react'; import { useNavigation } fro
Tool: examples/react-native-video-upload-workflow.md [5/5] Description: * 100, 95); return ( <View style={styles.container}> <ActivityIndicator size="large" color="#007AFF" /> <Text style={styles.title}>Generating your video</Text> <Text style={styles.subtitle}>This usually takes {estimatedTime}s</Text> <View style={styles.progressBar}> <View style={[styles.progressFill, { width: `${progress}%` }]} /> </View> <Text style={styles.time}>{elapsedTime}s elapsed</Text> </View> ); } const styles = Sty
Malicious tool definition detected
Tool: examples/signed-url-playback.md [1/2] Description: # Implementing Signed URL Playback Complete example demonstrating how to secure video playback using signed URLs, including JWT generation on the server, token configuration in Mux Player, and handling thumbnail/storyboard tokens.
Tool: examples/signed-url-playback.md [2/2] Description: false, "allow_high_risk_user_agent": false } } ``` ### Include Restriction in JWT Claims ```json { "sub": "{PLAYBACK_ID}", "aud": "v", "exp": 1234567890, "kid": "{SIGNING_KEY_ID}", "playback_restriction_id": "JL88SKXTr7r2t9tovH7SoYS8iLBVsjZ2qTuFS8NGAQY" } ``` ### Domain Syntax Options - Empty array `[]`: Deny all domains - Specific domain: `["example.com"]` - Subdomain wildcard: `["*.example.com"]` (one level only) - Allow all: `["*"]` ###
Malicious tool definition detected
Tool: examples/thumbnail-and-preview-integration.md [1/2] Description: # Thumbnail and Preview Integration Examples Examples for integrating thumbnails and storyboards into video players and catalogs, including poster images, hover previews, and timeline scrubbing with various player libraries. ## Getting Thumbnails from Videos ### Basic Thumbnail Request Request a thumbnail image from any Mux video using the playback ID: ``` https://image.mux.com/{PLAYBACK_ID}/thumbnail.{png|jpg|webp} ``` Suppo
Tool: examples/thumbnail-and-preview-integration.md [2/2] Description: const storyboard = await response.json(); // Preload storyboard image const storyboardImg = new Image(); storyboardImg.src = storyboard.url; // Find tile for a given time function getTileForTime(timeInSeconds) { const tiles = storyboard.tiles; for (let i = tiles.length - 1; i >= 0; i--) { if (timeInSeconds >= tiles[i].start) { return tiles[i]; } } return tiles[0]; } // Render preview at hover position function showPreview(tim
Malicious tool definition detected
Tool: examples/video-clipping-workflows.md [1/2] Description: # Video Clipping Workflow Examples Practical examples showing common clipping workflows: creating highlight clips from live streams, trimming pre/post-roll from recordings, and building a clip creation interface.
Tool: examples/video-clipping-workflows.md [2/2] Description: signed URLs.
Malicious tool definition detected
Tool: examples/video-synchronization.md Description: # Video Playback Synchronization Guide to synchronizing video playback across multiple viewers or with other application components. Covers watch party implementations, understanding EXT-X-PROGRAM-DATE-TIME tags in HLS manifests, supported video players, and integration with real-time communication channels.
Malicious tool definition detected
Tool: examples/video-with-captions-and-metadata.md Description: # Creating a Video Asset with Captions and Metadata This guide demonstrates how to create a fully configured Mux Video asset that includes auto-generated captions, custom metadata, quality settings, and static MP4 renditions for download.
Malicious tool definition detected
Tool: examples/web-player-integration-example.md [1/2] Description: # Web Player Integration Examples Practical code examples for integrating Mux Data with popular web video players, including Video.js plugin setup, HLS.js with mux-embed, and handling common scenarios like video changes, metadata updates, and error tracking.
Tool: examples/web-player-integration-example.md [2/2] Description: Mux: ```js function errorTranslator (error) { return { player_error_code: translateCode(error.player_error_code), player_error_message: translateMessage(error.player_error_message), player_error_context: translateContext(error.player_error_context) }; } mux.monitor('#my-player', { debug: false, errorTranslator, hlsjs: hls, Hls, data: { env_key: 'ENV_KEY', // required // ...
Malicious tool definition detected
Tool: examples/webhook-signature-verification.md [1/2] Description: # Example: Verify Webhook Signatures Practical code examples for verifying Mux webhook signatures in your application.
Tool: examples/webhook-signature-verification.md [2/2] Description: raw request body string for signature verification, not a parsed JSON object 2.
Malicious tool definition detected
Tool: reference/alerts-and-monitoring.md [1/2] Description: # Alerts and Monitoring Reference for setting up alerts in Mux Data including anomaly alerts and threshold alerts.
Tool: reference/alerts-and-monitoring.md [2/2] Description: Mux Data Dashboard 2. Select the "Notification Channels" tab 3. Click "Add Channel" 4.
Malicious tool definition detected
Tool: reference/api-authentication.md [1/2] Description: # API Authentication and Requests Complete guide to authenticating with the Mux API, making HTTP requests, handling pagination, understanding rate limits, and using serverless functions. ## HTTP Basic Authentication Mux uses HTTP Basic Auth with access tokens to authenticate all API requests.
Tool: reference/api-authentication.md [2/2] Description: assets endpoint, the response includes a `next_cursor` value: ```json // GET /video/v1/assets { "data": [ { "id": "asset_id", "status": "ready", ...
Malicious tool definition detected
Tool: reference/asset-configuration.md [1/3] Description: # Asset Configuration and Processing This reference covers configuring video assets in Mux, including metadata, video quality levels, 4K resolution support, processing optimization, audio normalization, watermarks, static MP4 renditions, and master access for downloading original files.
Tool: reference/asset-configuration.md [2/3] Description: libx264 \ -profile high -b:v 7000k -g 239 -pix_fmt yuv420p -maxrate 16000k -bufsize 24000k out.mp4 ``` For 4K content: ```shell ffmpeg -i input.mp4 -c:a copy -vf "scale=w=min(iw\,4096):h=-2" -c:v libx264 \ -profile high -b:v 18000k -g 239 -pix_fmt yuv420p -maxrate 36000k -bufsize 54000k out.mp4 ``` ### Non-Standard Input Detection When Mux detects non-standard input, it emits the `video.asset.non_standard_input_detected` webhook: ```json
Tool: reference/asset-configuration.md [3/3] Description: ["public"], "video_quality": "basic", "master_access": "temporary" } } ``` ### Retrieving the Master URL After enabling, check the asset for the `master` object: ```json { "master_access": "temporary", "master": { "status": "preparing" } } ``` When ready: ```json { "master_access": "temporary", "master": { "status": "ready", "url": "https://mezzanine.mux.com/ABC123/mezzanine.mp4?skid=foo&signature=bar" } } ``` **Important:** The URL expir
Malicious tool definition detected
Tool: reference/cms-integrations.md [1/3] Description: # CMS Integrations Comprehensive guide to integrating Mux video with content management systems including Sanity, Contentful, WordPress, Strapi, Cosmic, DatoCMS, and Prepr. Covers installation, configuration, video upload workflows, playback integration, and advanced features.
Tool: reference/cms-integrations.md [2/3] Description: audio tracks for different languages or alternative audio content. 1. Provide a public URL of an audio file 2.
Tool: reference/cms-integrations.md [3/3] Description: videos, add them to content models, and query URLs for display.
Malicious tool definition detected
Tool: reference/content-security-policy.md Description: # Content Security Policy for Mux Security reference for configuring Content Security Policy (CSP) to work with Mux Video and Data services.
Malicious tool definition detected
Tool: reference/cost-optimization.md [1/2] Description: # Optimizing Mux Video Costs Strategies and techniques to reduce and optimize Mux Video costs through quality settings, delivery optimization, player configuration, and storage management.
Tool: reference/cost-optimization.md [2/2]
Malicious tool definition detected
Tool: reference/custom-domains-and-security.md [1/2] Description: # Custom Domains and JWT Security Configuration guide for custom domains (CNAME setup for ingest and playback) and JWT signing for secure video access.
Tool: reference/custom-domains-and-security.md [2/2] Description: = thumbnail, g = gif "exp" => time() + 600, // Expiry time in epoch - now + 10 mins "kid" => $keyId, // Optional image manipulations "time" => 10, "width" => 640, "fit_mode" => "smartcrop" ); $jwt = JWT::encode($payload, base64_decode($keySecret), 'RS256'); print "$jwt "; ?> ``` #### Go ```go package main import ( "encoding/base64" "fmt" "log" "time" "github.com/golang-jwt/jwt/v4" ) func main() { playbackId := "" // Enter your sig
Malicious tool definition detected
Tool: reference/custom-metadata-and-dimensions.md [1/2] Description: # Custom Metadata and Dimensions Reference for extending Mux Data with custom metadata, including custom dimensions (custom_1 through custom_10), configurable metadata fields, and dimension categories.
Tool: reference/custom-metadata-and-dimensions.md [2/2] Description: Enables tracking of additional metrics but unavailable as dimensions | | **Limited** | Appear as view attributes on individual view page and in API | | **Full** | Available as filters and breakdowns in aggregate reports, view page, and API | Custom dimensions are **Full** type dimensions.
Malicious tool definition detected
Tool: reference/custom-player-integrations.md [1/3] Description: # Building Custom Player Integrations Comprehensive guide for building custom Mux Data integrations when no pre-built SDK exists for your player.
Tool: reference/custom-player-integrations.md [2/3] Description: `IDevice` 3.
Tool: reference/custom-player-integrations.md [3/3] Description: setVideoSourceWidth:[NSNumber numberWithInt:width]]; [videoData setVideoSourceHeight:[NSNumber numberWithInt:height]]; MUXSDKDataEvent *dataEvent = [[MUXSDKDataEvent alloc] init]; [dataEvent setVideoData:videoData]; [MUXSDKCore dispatchEvent:dataEvent forPlayer:_playerName]; ``` #### Playback Events Event naming convention: `MUXSDK` + PascalCasedName + `Event` (e.g., `playerready` becomes `MUXSDKPlayerReadyEvent`).
Malicious tool definition detected
Tool: reference/dashboards-and-filtering.md [1/3] Description: # Mux Data Dashboards and Filtering Reference for building custom dashboards in Mux Data, including component types, dashboard configuration, time periods, and filtering capabilities. Covers filter syntax for the API and filter sets for saving and sharing filter combinations. ## Custom Dashboards Overview Custom dashboards provide a centralized view of your video performance data through configurable components. You can create dashbo
Tool: reference/dashboards-and-filtering.md [2/3] Description: make their own editable copy ### Editing Dashboard Permissions Users have the ability to edit dashboards they are the owner of but do not have the ability to edit public dashboards they do not own. Admins have full editing abilities for all dashboards.
Tool: reference/dashboards-and-filtering.md [3/3] Description: sequence analysis filters[]=video_cdn_trace:[fastly,akamai,cloudfront] ``` #### Performance Analysis High-performance regions: ``` # Exclude slow CDN providers filters[]=-video_cdn_trace:slow-cdn filters[]=!operating_system:legacy ``` Mobile vs Desktop comparison: ``` # Mobile traffic analysis filters[]=operating_system:ios filters[]=operating_system:android ``` #### Content Filtering Live vs VOD content: ``` # Exclude recorded conte
Malicious tool definition detected
Tool: reference/data-exports.md [1/4] Description: # Mux Data Exports Complete reference for exporting Mux Data including daily CSV exports via the Exports API, streaming exports to Amazon Kinesis Data Streams and Google Cloud Pub/Sub, and monitoring data exports. ## Overview View data can be exported from Mux Data for aggregation and reporting in your data infrastructure.
Tool: reference/data-exports.md [2/4] Description: `PLAYBACK_ERROR` | Instantaneous event when playback fails due to fatal technical error. Value is playhead timestamp when error occurred. Non-fatal and business errors not included. | ### Setting Up Monitoring Samples Stream Monitoring Samples streams are enabled by working with the Mux team (not configured in the dashboard).
Tool: reference/data-exports.md [3/4] Description: Dim. | Video length from custom metadata | v1+ | | `video_dynamic_range_type` | Text | Dim.
Tool: reference/data-exports.md [4/4] Description: | | `ad_startup_error_count` | Integer | Metric | Ad startup errors | v8+ | | `ad_startup_error_percentage` | Percentage | Metric | Percentage with startup errors | v8+ | | `ad_exit_before_start_count` | Integer | Metric | Exits before ad started | v8+ | | `ad_exit_before_start_percentage` | Percentage | Metric | Percentage with ad exit before start | v8+ | | `ad_playback_failure_error_type_id` | Unique ID | Dim.
Malicious tool definition detected
Tool: reference/images-and-thumbnails.md [1/2] Description: # Images, Thumbnails, and Storyboards This guide covers extracting images from videos including static thumbnails, animated GIFs, and storyboards for timeline hover previews. All image requests are made to `image.mux.com` using a playback ID. ## Static Thumbnails To get an image from a video, make a request to `image.mux.com` in the following format: ``` https://image.mux.com/{PLAYBACK_ID}/thumbnail.{png|jpg|webp} ``` Images can be serv
Tool: reference/images-and-thumbnails.md [2/2] Description: a catalog.
Malicious tool definition detected
Tool: reference/live-stream-configuration.md [1/2] Description: # Live Stream Configuration Reference for configuring live stream parameters including latency modes, reconnect windows, slate images, DVR mode, and recording settings.
Tool: reference/live-stream-configuration.md [2/2] Description: Use the playback ID associated with the live stream - Recommended for most live streaming use cases ### DVR Mode - Viewers can scrub back to the beginning of the live stream - Use the playback ID associated with the live stream's `active_asset_id` - Not recommended for live streams longer than 4 hours ## Recording Settings Every live stream on Mux is automatically recorded as an asset.
Malicious tool definition detected
Tool: reference/live-stream-features.md [1/2] Description: # Live Stream Features Reference for advanced live streaming features including live captions (embedded CEA-608 and auto-generated), viewer counts, health monitoring, simulcasting to third-party platforms, and simulated live streaming. ## Live Captions Closed captions make video accessible to people who are deaf or hard of hearing, and empower all viewers to consume content in whichever way is best for them. Mux supports two approaches t
Tool: reference/live-stream-features.md [2/2] Description: want to count.
Malicious tool definition detected
Tool: reference/live-stream-troubleshooting.md [1/2] Description: # Live Stream Troubleshooting Guide to debugging live stream issues, understanding the Live Stream Input Health dashboard, identifying common problems, and using health data exports for monitoring.
Tool: reference/live-stream-troubleshooting.md [2/2] Description: Live Stream Id "asset_id": "hfye6sBqRmR8MRJZaWYq602X1rB0" // Mux Asset Id } ``` #### Health Update Event Contains stream input health data: ```javascript HealthUpdateEvent = { // Video tracks (present for AV streams) "video_tracks": [ { "bytes_received": 3155737, // Number of video bytes received during this interval "stream_start_ms": 4979091, // Timestamp of first video frame (ms since stream start) "stream_end_ms": 4985097, //
Malicious tool definition detected
Tool: reference/live-streaming-getting-started.md [1/2] Description: # Getting Started with Live Streaming Comprehensive guide to creating and managing live streams with Mux, including API setup, creating live stream resources, understanding stream keys and playback IDs, starting broadcasts, and handling webhook events for live stream lifecycle management. ## Overview The Mux Live Streaming API enables you to build live video capabilities into your application.
Tool: reference/live-streaming-getting-started.md [2/2] Description: your application can respond using webhooks.
Malicious tool definition detected
Tool: reference/mcp-server.md [1/2] Description: # MCP Server for AI Tools The Mux MCP (Model Context Protocol) Server brings Mux's Video and Data platform capabilities directly to your AI tools.
Tool: reference/mcp-server.md [2/2]
Malicious tool definition detected
Tool: reference/metrics-overview.md [1/4] Description: # Mux Data Metrics Overview Mux Data provides comprehensive metrics to measure video engagement and Quality of Experience (QoE).
Tool: reference/metrics-overview.md [2/4] Description: = Tradeoff(Smoothness, Quality) - T_Sm,Su = Tradeoff(Smoothness, Startup) - T_Su,Q = Tradeoff(Startup, Quality) **Relative importance (from most to least):** 1.
Tool: reference/metrics-overview.md [3/4] Description: Time Time from initial user request for a page to when the video player is first initialized.
Tool: reference/metrics-overview.md [4/4] Description: Yes | ### Live Stream Latency Time from camera capture to viewer seeing the action (ingest-to-render latency).
Malicious tool definition detected
Tool: reference/mobile-player-integrations.md [1/2] Description: # Mobile Player Integrations Guide for integrating Mux Data with mobile video players on iOS, tvOS, and Android platforms.
Tool: reference/mobile-player-integrations.md [2/2] Description: com.mux.stats.sdk.core.model.CustomData; import com.mux.stats.sdk.core.model.CustomerData; CustomerPlayerData customerPlayerData = new CustomerPlayerData(); customerPlayerData.setEnvironmentKey("YOUR_ENVIRONMENT_KEY_HERE"); CustomerVideoData customerVideoData = new CustomerVideoData(); customerVideoData.setVideoTitle(intent.getStringExtra("YOUR_VIDEO_TITLE")); CustomerViewData customerViewData = new CustomerViewData(); customerView
Malicious tool definition detected
Tool: reference/mobile-upload-sdks.md [1/2] Description: # Mobile Upload SDKs (iOS and Android) Reference guide for uploading videos from native mobile applications using Mux Upload SDKs for iOS/iPadOS and Android.
Tool: reference/mobile-upload-sdks.md [2/2] Description: early in app startup MuxUploadManager.resumeAllCachedJobs() ``` Java: ```java // You can do this anywhere, but it's really effective to do early in app startup MuxUploadManager.INSTANCE.resumeAllCachedJobs() ``` ### Find Uploads Already in Progress `MuxUpload` objects are managed internally by the SDK.
Malicious tool definition detected
Tool: reference/mux-fundamentals.md [1/2] Description: # Mux Fundamentals Core concepts and terminology for building with Mux, including organizations, environments, access tokens, assets, playback IDs, live streams, signing keys, and webhooks. ## Quick Reference | Term | Description | | :--- | :---------- | | **Organization** | The top-level account container.
Tool: reference/mux-fundamentals.md [2/2] Description: channel.
Malicious tool definition detected
Tool: reference/mux-player-overview.md [1/2] Description: # Mux Player Overview Mux Player is a drop-in video player component optimized for playing Mux Video assets.
Tool: reference/mux-player-overview.md [2/2] Description: "customdomain.com", ) .build() ``` --- ## Core Features ### Mux Data Integration Mux Player automatically integrates with Mux Data to measure performance and quality of experience.
Malicious tool definition detected
Tool: reference/mux-uploader.md [1/3] Description: # Mux Uploader Components Complete reference for Mux Uploader web components covering installation, usage in various frameworks (React, Vue, Svelte), core functionality, UI customization, styling with CSS and Tailwind, and working with subcomponents for custom upload experiences.
Tool: reference/mux-uploader.md [2/3] Description: /> ``` ### Custom File Select Button with Slots Use the `slot="file-select"` attribute to provide your own file select element: ```html <mux-uploader endpoint="..."> <button slot="file-select" class="btn">Pick a video</button> </mux-uploader> ``` React: ```jsx <MuxUploader endpoint="..."> <button slot="file-select" className="btn">Pick a video</button> </MuxUploader> ``` ## Styling with CSS ### Basic CSS Styling ```css mux-uploader { display: in
Tool: reference/mux-uploader.md [3/3]
Malicious tool definition detected
Tool: reference/playback-modifiers-resolution.md [1/2] Description: # Playback Modifiers and Resolution Control Playback modifiers are optional parameters added to video playback URLs that allow you to change the behavior of the stream you receive from Mux.
Tool: reference/playback-modifiers-resolution.md [2/2] Description: in React).
Malicious tool definition detected
Tool: reference/playback-security.md [1/2] Description: # Playback Security (Signed URLs and DRM) Comprehensive guide to securing video playback with signed URLs, JSON Web Tokens (JWT), playback restrictions, and Digital Rights Management (DRM) protection including Widevine, FairPlay, and PlayReady.
Tool: reference/playback-security.md [2/2] Description: a `custom` key for tracking purposes (e.g., identifying bad actors who share URLs): ```json { "sub": "{PLAYBACK_ID}", "aud": "{AUDIENCE_TYPE}", "exp": "{EXPIRATION_TIME}", "custom": { "session_id": "xxxx-123" } } ``` **Guidelines**: - Do NOT include personally identifiable information (PII) - Nest custom parameters inside the `"custom"` key --- ## Digital Rights Management (DRM) DRM provides an extra layer of content security for video cont
Malicious tool definition detected
Tool: reference/player-advanced-features.md [1/2] Description: # Player Advanced Features Advanced Mux Player features including event handling, preloading, custom domains, chapters and cue points, playback synchronization, quality selection, and debugging options.
Tool: reference/player-advanced-features.md [2/2] Description: Extensions (HLS.js) | | `native` | Use native HLS playback | **Warning**: Test thoroughly across operating systems and browsers when overriding this setting.
Malicious tool definition detected
Tool: reference/player-customization.md [1/2] Description: # Player Customization Complete guide to customizing Mux Player appearance and behavior, including themes, colors, CSS styling, control visibility, keyboard shortcuts, poster images, and caption styling.
Tool: reference/player-customization.md [2/2] Description: with sound first, falls back to muted | ## Keyboard Shortcuts (Hotkeys) Default hotkeys are enabled when the player or controls are focused.
Malicious tool definition detected
Tool: reference/player-setup-integration.md [1/2] Description: # Player Setup and Integration Detailed guide on integrating Mux Player into web applications using various frameworks (React, Vue, Svelte), embedding via iframe, providing playback IDs and metadata, and using Video.js kit as an alternative player.
Tool: reference/player-setup-integration.md [2/2] Description: src="{PLAYBACK_ID}" type="video/mux" /> </video> ``` ### JavaScript Initialization ```html <video id="my-player" class="video-js vjs-16-9" controls preload="auto" width="100%"> </video> <script> const player = videojs('my-player', { timelineHoverPreviews: true, plugins: { mux: { debug: false, data: { env_key: 'ENV_KEY', video_title: 'Example Title' } } } }); player.src({ src: "{PLAYBACK_ID}", type: "video/mux", }); </script> ``` ###
Malicious tool definition detected
Tool: reference/pricing-overview.md [1/2] Description: # Mux Video Pricing Overview Mux Video pricing is split into three categories: **input**, **storage**, and **delivery**.
Tool: reference/pricing-overview.md [2/2] Description: | $0.000080 | | Next 500,000 min | $0.000760 | $0.000950 | $0.001520 | $0.003040 | $0.000076 | | Next 1M min | $0.000720 | $0.000900 | $0.001440 | $0.002880 | $0.000072 | | Next 4M min | $0.000670 | $0.000838 | $0.001340 | $0.002680 | $0.000067 | | Next 4M min | $0.000610 | $0.000763 | $0.001220 | $0.002440 | $0.000061 | | Over 10M min | $0.000560 | $0.000700 | $0.001120 | $0.002240 | $0.000056 | ### Premium Quality Delivery Live video up to
Malicious tool definition detected
Tool: reference/privacy-and-configuration.md [1/2] Description: # Privacy, Compliance, and Configuration This reference covers privacy compliance (GDPR, CCPA, VPPA), data collection practices, custom domain configuration for beacon collection, and CDN detection setup for Mux Data. ## Privacy Compliance ### Regulatory Compliance Mux Data is compliant with major privacy regulations: | Regulation | Status | Description | |------------|--------|-------------| | GDPR | Compliant | General Data Protec
Tool: reference/privacy-and-configuration.md [2/2] Description: | |--------|-------------| | `X-CDN` | Custom header added to all responses.
Malicious tool definition detected
Tool: reference/react-native-advanced-topics.md [1/5] Description: # React Native: Analytics, Best Practices, and Advanced Topics Advanced topics for building production-ready React Native video applications with Mux, including analytics integration, async processing patterns, native SDK bridging, best practices, and troubleshooting.
Tool: reference/react-native-advanced-topics.md [2/5] Description: id: video.id }, data: { viewCount, viewCountUpdatedAt: new Date() }, }); } catch (error) { console.error(`Failed to update views for ${video.id}:`, error); } // Rate limit: wait 250ms between requests (4 req/sec) await new Promise((resolve) => setTimeout(resolve, 250)); } } ``` ### Analytics Best Practices 1.
Tool: reference/react-native-advanced-topics.md [3/5] Description: alert('Failed to get push token for push notification!'); return; } token = (await Notifications.getExpoPushTokenAsync()).data; } return token; } ``` **Backend: Send Notification:** ```javascript async function notifyUserVideoReady(userId, videoId, playbackId) { const user = await db.users.findUnique({ where: { id: userId } }); if (user.pushToken) { await fetch('https://exp.host/--/api/v2/push/send', { method: 'POST', headers: {
Tool: reference/react-native-advanced-topics.md [4/5] Description: 'English Subtitles', language: 'en', type: 'text/vtt', uri: `https://stream.mux.com/${playbackId}/text/en.vtt`, }, ]} selectedTextTrack={{ type: 'title', value: 'English Subtitles' }} /> ``` ### Screen Reader Support ```tsx <View accessible={true} accessibilityLabel={`Video by ${username}: ${title}`}> <Video source={{ uri: videoUrl }} accessible={true} accessibilityLabel="Video player" accessibilityHint="Double tap to play or pau
Tool: reference/react-native-advanced-topics.md [5/5]
Malicious tool definition detected
Tool: reference/react-native-getting-started.md [1/2] Description: # React Native: Getting Started Quickstart guide for playing Mux video in React Native apps using Expo and expo-video.
Tool: reference/react-native-getting-started.md [2/2] Description: Features like Picture-in-Picture (`allowsPictureInPicture`) and background playback require configuration through the config plugin and a custom development build.
Malicious tool definition detected
Tool: reference/react-native-ui-patterns.md [1/4] Description: # React Native: Video Feeds and Stories UI Build performant video feeds and Instagram Stories/TikTok-style vertical video interfaces with auto-play, preloading, memory management, and gesture controls.
Tool: reference/react-native-ui-patterns.md [2/4] Description: refresh:', error); } finally { setRefreshing(false); } }; return ( <FlatList data={videos} renderItem={({ item }) => <VideoCard video={item} />} refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={handleRefresh} tintColor="#007AFF" /> } /> ); } ``` --- ## Horizontal Video Feed For YouTube-style horizontal scrolling: ```tsx export function HorizontalVideoFeed() { return ( <FlatList data={videos} renderItem={({ item })
Tool: reference/react-native-ui-patterns.md [3/4] Description: { runOnJS(onComplete)(); } }) ); opacity.value = withSequence( withSpring(1), withSpring(1), withSpring(0) ); }, []); const animatedStyle = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }], opacity: opacity.value, })); return ( <Animated.View style={[styles.container, animatedStyle]}> <Animated.Text style={styles.heart}>heart icon</Animated.Text> </Animated.View> ); } const styles = StyleSheet.create({ container: { posit
Tool: reference/react-native-ui-patterns.md [4/4]
Malicious tool definition detected
Tool: reference/react-native-video-features.md [1/7] Description: # React Native: Video Playback, Upload, and Live Streaming This guide provides comprehensive coverage of video features in React Native using Mux, including video playback patterns, uploading videos, and live streaming capabilities.
Tool: reference/react-native-video-features.md [2/7] Description: / height; } return 16 / 9; // Default fallback })(); return ( <VideoView player={player} style={[styles.video, { aspectRatio }]} nativeControls /> ); } const styles = StyleSheet.create({ video: { width: '100%', }, }); ``` **Note:** The `sourceLoad` event works reliably on iOS and Android.
Tool: reference/react-native-video-features.md [3/7] Description: && isPictureInPictureSupported(); if (!pipSupported) { return ( <View style={styles.container}> <Text style={styles.errorText}> Picture-in-Picture is not supported on this platform.
Tool: reference/react-native-video-features.md [4/7] Description: SDK import Mux from '@mux/mux-node'; const mux = new Mux({ tokenId: process.env.MUX_TOKEN_ID, tokenSecret: process.env.MUX_TOKEN_SECRET, }); // API endpoint: POST /api/generate-upload-url export async function generateUploadUrl(req, res) { try { const upload = await mux.video.uploads.create({ cors_origin: '*', // Or specify your app's origin new_asset_settings: { playback_policies: ['public'], video_quality: "basic" }, }); res.jso
Tool: reference/react-native-video-features.md [5/7] Description: or Firebase, etc.
Tool: reference/react-native-video-features.md [6/7] Description: code (Node.js) import Mux from '@mux/mux-node'; const mux = new Mux({ tokenId: process.env.MUX_TOKEN_ID, tokenSecret: process.env.MUX_TOKEN_SECRET, }); // Create live stream app.post('/api/live-stream/create', async (req, res) => { const { userId, title } = req.body; const liveStream = await mux.video.liveStreams.create({ playback_policy: ['public'], // or ['signed'] for private new_asset_settings: { playback_policy: ['public'], /
Tool: reference/react-native-video-features.md [7/7]
Malicious tool definition detected
Tool: reference/server-side-sdks.md [1/2] Description: # Server-Side SDKs Reference guide for Mux server-side SDKs covering installation, authentication, and basic usage for Node.js, Python, Ruby, PHP, Go, Java, Elixir, and C#.
Tool: reference/server-side-sdks.md [2/2] Description: Example { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.mux.com"; // Configure HTTP basic authorization: accessToken config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; var apiInstance = new AssetsApi(config); var createAssetRequest = new CreateAssetRequest(); try { // Create an asset AssetResponse result = apiInstance.CreateAsset(createAssetRequest); Debug.WriteLine(
Malicious tool definition detected
Tool: reference/smart-tv-device-integrations.md [1/3] Description: # Smart TV and Connected Device Integrations This guide covers integrating Mux Data with smart TV platforms and connected devices including Roku, Samsung Tizen, LG webOS, and Chromecast.
Tool: reference/smart-tv-device-integrations.md [2/3] Description: ```js // Place in your application initialization code, around // where you call `prepare` var player = $('#my-player').get(0); player.url = this.url; var playerInitTime = monitorTizenPlayer.utils.now(); this.prepare(); monitorTizenPlayer(player, { debug: true, data: { env_key: 'ENV_KEY', // required // Metadata player_name: 'Custom Player', // ex: 'My Main Player' player_init_time: playerInitTime, // ...
Tool: reference/smart-tv-device-integrations.md [3/3] Description: console 3.
Malicious tool definition detected
Tool: reference/social-sharing-and-special-features.md [1/2] Description: # Social Media Sharing and Special Features This guide covers embedding videos for social media platforms using Open Graph and Twitter cards, plus special features like Google Cast with DRM-protected content.
Tool: reference/social-sharing-and-special-features.md [2/2] Description: = chrome.cast.media.HlsVideoSegmentFormat.FMP4; // Send information needed to create a new license URL mediaInfo.customData = { mux: { playbackId, tokens: { drm: drmToken } } } const request = new chrome.cast.media.LoadRequest(mediaInfo); // Cast the video context.getCurrentSession().loadMedia(request).then(() => { console.log('Successfully loaded the media'); }).catch((err) => { console.log(`Media playback error code: ${e
Malicious tool definition detected
Tool: reference/streaming-protocols-encoder-setup.md [1/2] Description: # Streaming Protocols and Encoder Setup Complete reference for RTMP, RTMPS, and SRT streaming protocols, including ingest URLs, encoder configuration, recommended settings, and software/hardware encoder setup guides. ## Streaming Protocols Overview Mux supports three primary protocols for live stream ingest: | Protocol | Port | Security | Use Case | |----------|------|----------|----------| | RTMP | 5222 | Unencrypted | Stan
Tool: reference/streaming-protocols-encoder-setup.md [2/2] Description: Port: `6001` - Stream ID: Your stream_key - Passphrase: Your srt_passphrase ## Mobile Streaming ### Larix Broadcaster (iOS and Android) **SRT Configuration:** Configure each parameter separately in the app settings: - Host: `global-live.mux.com` - Port: `6001` - Stream ID: Your stream_key - Passphrase: Your srt_passphrase ### Controlling Recording Resolution #### Android **CameraX:** ```kotlin val selector = QualitySelector.
Malicious tool definition detected
Tool: reference/text-tracks-and-audio.md [1/2] Description: # Text Tracks and Audio Configuration Reference for adding subtitles, captions, auto-generated captions, transcripts, and alternate audio tracks to video assets for accessibility and multi-language support.
Tool: reference/text-tracks-and-audio.md [2/2] Description: experiences (e.g., director's commentary) ### Setting Primary Audio Track Language When creating an asset, specify the language and name of the primary audio track: ```json // POST https://api.mux.com/video/assets { "inputs": [ { "url": "{VIDEO_INPUT_URL}", "language_code": "en", "name": "English" } ], "playback_policies": ["public"], "video_quality": "basic" } ``` The `language_code` must be a BCP-47 language tag (e.g., `en`, `es`, `fr
Malicious tool definition detected
Tool: reference/upload-methods.md [1/3] Description: # Video Upload Methods Comprehensive guide to uploading videos to Mux, including direct uploads with authenticated URLs, URL ingestion, handling large files with chunking, and streaming uploads for live recording scenarios.
Tool: reference/upload-methods.md [2/3] Description: <input type="file" onChange={(e) => handleUpload(e.target)} id="file-picker" name="file-picker" /> <label htmlFor="upload-progress">Downloading progress:</label> <progress value={progress} max="100"/> <em>{statusMessage}</em> </div> ); } export default Page; ``` ### Manual Chunking (Alternative to UpChunk) If you prefer not to use UpChunk, you can implement chunked uploads manually: 1.
Tool: reference/upload-methods.md [3/3]
Malicious tool definition detected
Tool: reference/video-clipping.md [1/2] Description: # Video Clipping Comprehensive guide to creating video clips with Mux.
Tool: reference/video-clipping.md [2/2] Description: Security Considerations We strongly recommend using instant clipping alongside signed URLs. When using this feature without signed URLs, users can manipulate the manifest playback URL to expose parts of the media you want to keep hidden.
Malicious tool definition detected
Tool: reference/web-framework-integrations.md [1/3] Description: # Web Framework Integrations Comprehensive guide for integrating Mux video into popular web frameworks including Next.js, Remix, SvelteKit, Astro, and Laravel.
Tool: reference/web-framework-integrations.md [2/3] Description: so let's use an action export const action = async ({ request }: ActionFunctionArgs) => { if (request.method !== "POST") { return new Response("Method not allowed", { status: 405 }); } const body = await request.text(); // mux.webhooks.unwrap will validate that the given payload was sent by Mux and parse the payload.
Tool: reference/web-framework-integrations.md [3/3] Description: default: break; } return new Response(JSON.stringify({ message: 'ok' }), { headers: { 'Content-Type': 'application/json', }, }); }; ``` ### Playback Page **Basic Playback** - `src/pages/playback/[playbackId].astro`: ```astro --- import Layout from '../../layouts/Layout.astro'; import MuxPlayer from "@mux/mux-player-astro"; const { playbackId } = Astro.params; --- <Layout> <MuxPlayer playbackId={playbackId} metadata={{video_title: '
Malicious tool definition detected
Tool: reference/web-player-integrations.md [1/3] Description: # Web Player Integrations Comprehensive guide for integrating Mux Data with web-based video players including Video.js, HLS.js, Shaka Player, Dash.js, and other popular HTML5 players.
Tool: reference/web-player-integrations.md [2/3] Description: 120000 video_stream_type: '', // 'live' or 'on-demand' video_cdn: '' // ex: 'Fastly', 'Akamai' } }); ``` ### Passing in the Shaka Global The 3rd argument to `initShakaPlayerMux` is the `shaka` object.
Tool: reference/web-player-integrations.md [3/3] Description: the core JW Player JavaScript file --> <!-- Note that the KEY should be replaced with your JW Player account key --> <script src="https://content.jwplatform.com/libraries/KEY.js"></script> <script src="https://src.litix.io/jwplayer/4/jwplayer-mux.js"></script> ``` ### Initialization Be sure to call `initJWPlayerMux` immediately after initializing JW Player so that Mux can attach as soon as possible: ```js initJWPlayerMux(player, { deb
Malicious tool definition detected
Tool: reference/webhooks.md [1/3] Description: # Webhooks Reference Mux uses webhooks to notify your application when asynchronous events occur outside of an API request cycle. For example, you may want to update something on your end when an asset transitions from `processing` to `ready`, or when a live stream starts or ends. When these events happen, Mux makes a POST request to the URL you configure, allowing you to handle the event appropriately.
Tool: reference/webhooks.md [2/3] Description: a slate image from the `reconnect_slate_url` parameter value. | ### Upload Events | Event | Description | |-------|-------------| | `video.upload.asset_created` | An asset has been created from this upload. This is useful to know when a user of your application has finished uploading a file using a Direct Upload URL.
Tool: reference/webhooks.md [3/3] Description: func generateHmacSignature(webhookSecret, payload string) string { h := hmac.New(sha256.New, []byte(webhookSecret)) h.Write([]byte(payload)) return hex.EncodeToString(h.Sum(nil)) } func IsValidMuxSignature(req *http.Request, body []byte) error { muxSignature := req.Header.Get("Mux-Signature") if muxSignature == "" { return errors.New("no Mux-Signature in request header") } muxSignatureArr := strings.Split(muxSignature, ",") if len(muxSignatureArr) !