remotion-dev/remotion · error · Error
Only supporting non-scrambled streams
Error message
Only supporting non-scrambled streams
What it means
Thrown at parse-pes.ts:33 when the PES_scrambling_control field (2 bits) is anything other than 0b00. Non-zero values mean the PES payload is scrambled (encrypted) with a conditional-access system. The library deliberately does not implement descrambling.
Source
Thrown at packages/media-parser/src/containers/transport-stream/parse-pes.ts:33
iterator: BufferIterator;
offset: number;
}) => {
const ident = iterator.getUint24();
if (ident !== 0x000001) {
throw new Error(`Unexpected PES packet start code: ${ident.toString(16)}`);
}
const streamId = iterator.getUint8();
iterator.getUint16(); // PES packet length, is most of the time 0, so useless
iterator.startReadingBits();
const markerBits = iterator.getBits(2);
if (markerBits !== 0b10) {
throw new Error(`Invalid marker bits: ${markerBits}`);
}
const scrambled = iterator.getBits(2);
if (scrambled !== 0b00) {
throw new Error(`Only supporting non-scrambled streams`);
}
const priority = iterator.getBits(1);
iterator.getBits(1); // data alignment indicator
iterator.getBits(1); // copy right
iterator.getBits(1); // original or copy
const ptsPresent = iterator.getBits(1);
const dtsPresent = iterator.getBits(1);
if (!ptsPresent && dtsPresent) {
throw new Error(
`DTS is present but not PTS, this is not allowed in the spec`,
);
}
iterator.getBits(1); // escr flag
iterator.getBits(1); // es rate flag
iterator.getBits(1); // dsm trick mode flag
iterator.getBits(1); // additional copy info flagView on GitHub (pinned to 78fe4bb3fd)
Solutions
- Obtain a non-encrypted version of the source stream.
- Descramble the stream with an authorized tool (e.g. tsdec for DVB-CSA) before parsing.
- If you control the encoder, ensure PES_scrambling_control is left at 00.
- Detect encrypted streams upstream and surface a 'content protected' message to users.
Defensive patterns
Strategy: validation
Validate before calling
// Detect scrambled streams upstream
import {execSync} from 'node:child_process';
function isScrambled(src: string): boolean {
try {
const out = execSync(`ffprobe -v error -show_entries stream_flags=scrambled -of json "${src}"`).toString();
return JSON.parse(out).streams?.some((s: any) => s.flags?.includes('scrambled')) ?? false;
} catch { return false; }
} Try / catch
try { await parseMedia({src}); }
catch (e) { if (e instanceof Error && e.message === 'Only supporting non-scrambled streams') { throw new UserError('This stream is encrypted and cannot be parsed.'); } else throw e; } Prevention
- Reject encrypted sources before parsing.
- Descramble with an authorized tool if you have the rights.
- Surface a clear 'encrypted content' error to end users.
When it happens
Trigger: parsePes reads getBits(2) into 'scrambled' and throws if it is not 0b00. Triggered by encrypted broadcast streams (DVB-CSA, ATSC DES), pay-TV captures, or content-protected streams where PES_scrambling_control has been set.
Common situations: Recordings from encrypted satellite/cable/IPTV feeds; copy-protected content; streams captured from set-top boxes without descrambling; misconfigured encoders that erroneously set the scrambling bits.
Related errors
- Unexpected PES packet start code: ${ident.toString(16)}
- Invalid marker bits: ${markerBits}
- DTS is present but not PTS, this is not allowed in the spec
- PTS is required
- Invalid PTS marker bits: ${fourBits}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/cc8018da5a88f596.
Report an issue: GitHub.