{"record":{"id":"ca200cffb1569385","repo":"remotion-dev/remotion","slug":"live-media-cannot-be-transcribed","errorCode":null,"errorMessage":"Live media cannot be transcribed.","messagePattern":"Live media cannot be transcribed\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/Transcription/resample-media-to-16-khz.ts","lineNumber":48,"sourceCode":"\t}> = [];\n\n\ttry {\n\t\tonProgress(0);\n\t\tconst audioTracks = await input.getAudioTracks();\n\t\tconst primaryVideoTrack =\n\t\t\taudioStreamIndex === null ? await input.getPrimaryVideoTrack() : null;\n\t\tconst audioTrack =\n\t\t\taudioStreamIndex !== null\n\t\t\t\t? (audioTracks[audioStreamIndex] ?? null)\n\t\t\t\t: primaryVideoTrack\n\t\t\t\t\t? await primaryVideoTrack.getPrimaryPairableAudioTrack()\n\t\t\t\t\t: (audioTracks[0] ?? null);\n\t\tif (audioTrack === null) {\n\t\t\tthrow new Error('The selected media does not have an audio track.');\n\t\t}\n\n\t\tif (await audioTrack.isLive()) {\n\t\t\tthrow new Error('Live media cannot be transcribed.');\n\t\t}\n\n\t\tconst output = new Output({\n\t\t\tformat: new WavOutputFormat(),\n\t\t\ttarget: new NullTarget(),\n\t\t});\n\t\tconst conversion = await Conversion.init({\n\t\t\tinput,\n\t\t\toutput,\n\t\t\ttracks: 'all',\n\t\t\tvideo: {discard: true},\n\t\t\taudio: (track) => {\n\t\t\t\tif (track.id !== audioTrack.id) {\n\t\t\t\t\treturn {discard: true};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tcodec: 'pcm-f32',","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/Transcription/resample-media-to-16-khz.ts#L30-L66","documentation":"The transcription pipeline decodes the media offline into a 16kHz WAV for Whisper. Live streams (webcam capture, live HLS/DASH) cannot be decoded this way, so the function proactively rejects any audio track reporting isLive() === true.","triggerScenarios":"Attempting to transcribe a live media source — e.g. a MediaStream-backed track or live-streamed URL where audioTrack.isLive() resolves true.","commonSituations":"Pointing the transcription modal at a live stream URL or capture device instead of a recorded file; testing with a camera/microphone source.","solutions":["Use a recorded (non-live) media file as the transcription source.","Record the live stream to a file first, then transcribe the recording.","Choose a VOD rendition of the stream instead of the live manifest."],"exampleFix":"// before\naddCaptionJob({src: 'https://example.com/live/stream.m3u8'});\n// after\naddCaptionJob({src: '/recording.mp4'}); // recorded file","handlingStrategy":"validation","validationCode":"if (await audioTrack.isLive()) {\n  throw new Error('Cannot transcribe a live stream.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await transcribe(src);\n} catch (e) {\n  if (e.message === 'Live media cannot be transcribed.') {\n    alert('Please provide a recorded file instead of a live stream.');\n  }\n}","preventionTips":["Reject isLive() sources upstream.","Record live streams before transcription.","Use VOD URLs, not live manifests."],"tags":["audio","media","live-stream","transcription"],"backgroundTag":"unsupported-operation","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}