remotion-dev/remotion · error · Error
#EXT-X-PLAYLIST-TYPE. directive must have a value
Error message
#EXT-X-PLAYLIST-TYPE. directive must have a value
What it means
Thrown by parseM3uDirective() at parse-directive.ts:70 when a line matches #EXT-X-PLAYLIST-TYPE but has no value. This optional directive indicates whether the playlist is EVENT or VOD. (Note: the error message contains a stray period — '#EXT-X-PLAYLIST-TYPE. directive...' — which is a typo in the source.) The parser requires a value to store as playlistType.
Source
Thrown at packages/media-parser/src/containers/m3u/parse-directive.ts:70
if (!value) {
throw new Error('EXTINF has no value');
}
return {
type: 'm3u-extinf',
value: parseFloat(value),
};
}
if (directive === '#EXT-X-ENDLIST') {
return {
type: 'm3u-endlist',
};
}
if (directive === '#EXT-X-PLAYLIST-TYPE') {
if (!value) {
throw new Error('#EXT-X-PLAYLIST-TYPE. directive must have a value');
}
return {
type: 'm3u-playlist-type',
playlistType: value,
};
}
if (directive === '#EXT-X-MEDIA-SEQUENCE') {
if (!value) {
throw new Error('#EXT-X-MEDIA-SEQUENCE directive must have a value');
}
return {
type: 'm3u-media-sequence',
value: Number(value),
};
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure the directive specifies EVENT or VOD: #EXT-X-PLAYLIST-TYPE:VOD
- Remove the directive entirely if the playlist type is not important (it is optional per spec)
- Regenerate the playlist with a compliant packager
Example fix
// before #EXT-X-PLAYLIST-TYPE: // after #EXT-X-PLAYLIST-TYPE:VOD
Defensive patterns
Strategy: validation
Validate before calling
// Pre-fetch and check EXT-X-PLAYLIST-TYPE has a value
const text = await (await fetch(url)).text();
for (const line of text.split('\n')) {
const trimmed = line.trim();
if (trimmed.startsWith('#EXT-X-PLAYLIST-TYPE')) {
const colonIdx = trimmed.indexOf(':');
if (colonIdx === -1 || !trimmed.slice(colonIdx + 1).trim()) {
throw new Error('#EXT-X-PLAYLIST-TYPE is missing its value');
}
}
} Try / catch
try {
await parseMedia({src: url});
} catch (e) {
if (e instanceof Error && e.message.includes('EXT-X-PLAYLIST-TYPE')) {
// fix the value or remove the optional directive
}
throw e;
} Prevention
- Remove the optional #EXT-X-PLAYLIST-TYPE directive if you do not need it
- Otherwise ensure it specifies EVENT or VOD
When it happens
Trigger: A playlist line '#EXT-X-PLAYLIST-TYPE' with no colon, or '#EXT-X-PLAYLIST-TYPE:' with an empty value.
Common situations: Hand-edited playlist where the type value was accidentally deleted; encoder or packager bug producing an incomplete directive; malformed playlist from a CDN.
Related errors
- EXT-X-VERSION directive must have a value
- EXT-X-MEDIA directive must have a value
- EXT-X-TARGETDURATION directive must have a value
- EXTINF has no value
- #EXT-X-MEDIA-SEQUENCE directive must have a value
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/cb0554ebcfcb259f.
Report an issue: GitHub.