{"record":{"id":"bc4da31cebab2daa","repo":"remotion-dev/remotion","slug":"streams-with-unix-timestamps-are-not-currently-sup-bc4da3","errorCode":null,"errorMessage":"Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: ${src}","messagePattern":"Streams with UNIX timestamps are not currently supported by Remotion\\. Sorry! Source: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-utils/src/use-windowed-audio-data.ts","lineNumber":144,"sourceCode":"\n\t\t\ttry {\n\t\t\t\tconst durationInSeconds = await input.computeDuration();\n\n\t\t\t\tconst audioTrack = await input.getPrimaryAudioTrack();\n\n\t\t\t\tif (!audioTrack) {\n\t\t\t\t\tthrow new Error('No audio track found');\n\t\t\t\t}\n\n\t\t\t\tif (await audioTrack.isLive()) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Live streams are not currently supported by Remotion. Sorry! Source: ' +\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (await audioTrack.isRelativeToUnixEpoch()) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: ' +\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst canDecode = await audioTrack.canDecode();\n\n\t\t\t\tif (!canDecode) {\n\t\t\t\t\tthrow new Error('Audio track cannot be decoded');\n\t\t\t\t}\n\n\t\t\t\tif (channelIndex >= audioTrack.numberOfChannels || channelIndex < 0) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Invalid channel index ${channelIndex} for audio with ${audioTrack.numberOfChannels} channels`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst numberOfChannels = await audioTrack.getNumberOfChannels();","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-utils/src/use-windowed-audio-data.ts#L126-L162","documentation":"Thrown inside useWindowedAudioData() when mediabunny reports the source uses absolute UNIX-epoch timestamps (audioTrack.isRelativeToUnixEpoch() === true, line 143-148). Remotion schedules audio on a timeline relative to composition frame 0; epoch-anchored timestamps (common in some RTMP/production captures and SCTE-35 marked streams) cannot be mapped onto that timeline deterministically, so they are rejected. The src is included in the message.","triggerScenarios":"Loading RTMP captures, certain MPEG-TS streams with PCR/PTS anchored to wall-clock, SCTE-35 timestamped broadcast captures, or production recorder outputs that write absolute timestamps rather than zero-based PTS.","commonSituations":"Re-using broadcast ingestion media inside a Remotion composition; pulling a transport stream recorded by a live switcher; mixing media from NLE exports (zero-based) with field-captured media (epoch-based).","solutions":["Re-mux the asset so PTS is zero-based: ffmpeg -i in.ts -c copy -avoid_negative_ts make_zero out.mp4.","Re-encode from the original with a normal timeline (ffmpeg -i in.ts -c:a aac -c:v libx264 out.mp4).","Source a clean export from your NLE/editor instead of the raw capture.","If you need epoch timestamps for live-event replay, preprocess the stream offline before handing it to Remotion."],"exampleFix":"// before (broadcast capture with UNIX PTS -> rejected)\nuseWindowedAudioData({src: staticFile('capture.ts'), ...});\n\n// after (zero-base the timeline first)\n// ffmpeg -i capture.ts -c copy -avoid_negative_ts make_zero capture-clean.mp4\nuseWindowedAudioData({src: staticFile('capture-clean.mp4'), ...});","handlingStrategy":"validation","validationCode":"// Pre-process the asset so PTS is zero-based before handing it to Remotion\nimport {execSync} from 'child_process';\n\nfunction ensureZeroBasedTimestamps(inputFile: string, outputFile: string) {\n  execSync(`ffmpeg -y -i ${inputFile} -c copy -avoid_negative_ts make_zero ${outputFile}`);\n}\n\n// Or detect before rendering:\nasync function usesUnixEpochTimestamps(src: string): Promise<boolean> {\n  const {Input} = await import('mediabunny');\n  const input = new Input({source: src});\n  try {\n    const track = await input.getPrimaryAudioTrack();\n    return track ? await track.isRelativeToUnixEpoch() : false;\n  } finally {\n    input.dispose();\n  }\n}","typeGuard":"// (Same shape as usesUnixEpochTimestamps above; returns boolean)","tryCatchPattern":"// Forwarded to cancelRender(); wrap an ErrorBoundary and fall back to a re-muxed asset:\n// <ErrorBoundary fallback={<Waveform src={staticFile('clean.mp4')} ... />}>\n//   <WindowedWaveform src={rawCapture} ... />\n// </ErrorBoundary>","preventionTips":["Avoid feeding raw broadcast/ingestion captures directly to Remotion.","Re-mux with -avoid_negative_ts make_zero or re-encode to ensure a zero-based timeline.","Prefer NLE/editor exports over field-captured transport streams.","Probe new asset sources once and cache the 'is epoch-based' flag to avoid re-rendering surprises."],"tags":["audio","unsupported-format","mediabunny","render-failure","timestamps"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}