remotion-dev/remotion · error · Error
No stream found
Error message
No stream found
What it means
Thrown by processStreamBuffer at process-stream-buffers.ts:112 when getStreamForId returns null for the given programId. getStreamForId looks up the PID in the PMT's streams array, so a null result means the PID is not declared in the parsed PMT.
Source
Thrown at packages/media-parser/src/containers/transport-stream/process-stream-buffers.ts:112
onVideoTrack,
transportStream,
makeSamplesStartAtZero,
avcState,
}: {
streamBuffer: TransportStreamPacketBuffer;
programId: number;
structure: TransportStreamStructure;
sampleCallbacks: CallbacksState;
logLevel: MediaParserLogLevel;
onAudioTrack: MediaParserOnAudioTrack | null;
onVideoTrack: MediaParserOnVideoTrack | null;
transportStream: TransportStreamState;
makeSamplesStartAtZero: boolean;
avcState: AvcState;
}) => {
const stream = getStreamForId(structure, programId);
if (!stream) {
throw new Error('No stream found');
}
// 2 = ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream
if (stream.streamType === 2) {
throw new Error('H.262 video stream not supported');
}
// 27 = AVC / H.264 Video
if (stream.streamType === 27) {
await handleAvcPacket({
programId,
streamBuffer,
sampleCallbacks,
logLevel,
onVideoTrack,
offset: streamBuffer.offset,
transportStream,
makeSamplesStartAtZero,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Re-mux the file: ffmpeg -i in.ts -c copy out.ts to ensure PMT lists every PID.
- Filter to a single program before parsing (ffmpeg -i in.ts -map 0:p:123 -c copy out.ts).
- Verify with ffprobe that the PID is declared in the PMT.
- File a bug if the stream plays in ffprobe but fails here.
Defensive patterns
Strategy: validation
Validate before calling
// Verify every elementary PID is declared in the PMT
import {execSync} from 'node:child_process';
function pmtListsAllPids(src: string): boolean {
try { execSync(`ffprobe -v error -i "${src}" -t 5 -f null -`, {stdio: 'ignore'}); return true; } catch { return false; }
} Try / catch
try { await parseMedia({src}); }
catch (e) {
if (e instanceof Error && e.message === 'No stream found') {
// undeclared PID - re-mux to a single program
await runFfmpeg(['-i', src, '-map', '0:v:0', '-map', '0:a:0', '-c', 'copy', out]);
await parseMedia({src: out});
} else throw e;
} Prevention
- Filter multi-program transport streams to a single program before parsing.
- Re-mux with ffmpeg to normalize PMT declarations.
- Validate with ffprobe that all PIDs are declared.
When it happens
Trigger: processStreamBuffer calls getStreamForId(structure, programId) and throws on null. Triggered when a transport packet for an undeclared PID reaches processing (e.g. a PID added after the PMT, a private-stream PID, or corruption that rewrites the PID).
Common situations: PMT that does not list all carried PIDs; PID remapping mid-stream; corrupt packet headers; multi-program streams where the wrong program's PID is processed.
Related errors
- Does not PMT table with more than 1 entry, uncommon
- Invalid section length
- No PMT box found
- Unknown packet identifier
- Invalid table ID: ${tableId}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/7b3bc6387653d051.
Report an issue: GitHub.