remotion-dev/remotion · error · Error
No PMT box found
Error message
No PMT box found
What it means
Thrown by findProgramMapTableOrThrow at traversal.ts:38 when findProgramMapOrNull returns null, i.e. structure.boxes has no box of type 'transport-stream-pmt-box'. The PMT box is produced by parsePmt; if it has not been encountered yet, every traversal that needs stream metadata fails.
Source
Thrown at packages/media-parser/src/containers/transport-stream/traversal.ts:38
export const findProgramMapOrNull = (structure: TransportStreamStructure) => {
const box = structure.boxes.find(
(b) => b.type === 'transport-stream-pmt-box',
);
if (!box) {
return null;
}
return box as TransportStreamPMTBox;
};
export const findProgramMapTableOrThrow = (
structure: TransportStreamStructure,
) => {
const box = findProgramMapOrNull(structure);
if (!box) {
throw new Error('No PMT box found');
}
return box;
};
export const getProgramForId = (
structure: TransportStreamStructure,
packetIdentifier: number,
): TransportStreamProgramAssociationTableEntry | null => {
const box = findProgramAssociationTableOrThrow(structure);
const entry = box.pat.find(
(e) => e.programMapIdentifier === packetIdentifier,
);
return entry ?? null;
};
export const getStreamForId = (
structure: TransportStreamStructure,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Re-mux the file: ffmpeg -i in.ts -c copy out.ts to regenerate the PMT.
- Verify with ffprobe that the PMT is present and references the expected PIDs.
- Ensure the input starts at the PAT/PMT and includes both before any elementary-stream packets.
- File a bug with a sample if the stream contains a PMT but the library does not detect it.
Defensive patterns
Strategy: validation
Validate before calling
// Confirm a PMT packet is present before parsing
import {execSync} from 'node:child_process';
function hasTransportStreamPmt(src: string): boolean {
try { execSync(`ffprobe -v error -i "${src}" -t 1 -f null -`, {stdio: 'ignore'}); return true; } catch { return false; }
} Try / catch
try { await parseMedia({src}); }
catch (e) {
if (e instanceof Error && e.message === 'No PMT box found') {
await runFfmpeg(['-i', src, '-c', 'copy', src + '.remux.ts']);
await parseMedia({src: src + '.remux.ts'});
} else throw e;
} Prevention
- Ensure .ts inputs include both PAT and PMT packets before elementary-stream packets.
- Re-mux with ffmpeg to regenerate PAT/PMT.
- Validate with ffprobe that the PMT is present.
When it happens
Trigger: findProgramMapTableOrThrow delegates to findProgramMapOrNull and throws on null. Triggered when traversal runs before the PMT packet has been parsed, when the stream has no PMT, or when the PMT PID declared by the PAT carries no section.
Common situations: Partial captures missing the PMT packet; corrupt streams where the PMT PID is wrong or carries no section; parser invoked before header packets are processed; non-conformant .ts files.
Related errors
- Does not PMT table with more than 1 entry, uncommon
- Invalid section length
- No stream found
- Invalid table ID: ${tableId}
- Invalid section length
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/3ff8d271e8e73471.
Report an issue: GitHub.