remotion-dev/remotion · error · Error
EXT-X-VERSION directive must have a value
Error message
EXT-X-VERSION directive must have a value
What it means
Thrown by parseM3uDirective() at parse-directive.ts:15 when a line is identified as #EXT-X-VERSION but has no value after the colon separator. Per RFC 8216 the #EXT-X-VERSION directive is optional but if present must carry a numeric protocol version. The parser splits on the first colon; if none exists or the value after it is empty/falsy, it throws.
Source
Thrown at packages/media-parser/src/containers/m3u/parse-directive.ts:15
import {
parseM3uKeyValue,
parseM3uMediaDirective,
} from './parse-m3u-media-directive';
import {parseStreamInf} from './parse-stream-inf';
import type {M3uBox} from './types';
export const parseM3uDirective = (str: string): M3uBox => {
const firstColon = str.indexOf(':');
const directive = (firstColon === -1 ? str : str.slice(0, firstColon)).trim();
const value = firstColon === -1 ? null : str.slice(firstColon + 1);
if (directive === '#EXT-X-VERSION') {
if (!value) {
throw new Error('EXT-X-VERSION directive must have a value');
}
return {
type: 'm3u-version',
version: value,
};
}
if (directive === '#EXT-X-INDEPENDENT-SEGMENTS') {
return {
type: 'm3u-independent-segments',
};
}
if (directive === '#EXT-X-MEDIA') {
if (!value) {
throw new Error('EXT-X-MEDIA directive must have a value');
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure the directive includes a numeric version: #EXT-X-VERSION:3
- Regenerate the playlist with a compliant HLS packager (FFmpeg, MediaConvert, Shaka)
- Fix the line manually if editing the playlist source
Example fix
// before #EXT-X-VERSION // after #EXT-X-VERSION:3
Defensive patterns
Strategy: validation
Validate before calling
// Pre-fetch the m3u8 and check #EXT-X-VERSION has a value
const text = await (await fetch(url)).text();
for (const line of text.split('\n')) {
if (line.trim() === '#EXT-X-VERSION' || line.trim() === '#EXT-X-VERSION:') {
throw new Error('#EXT-X-VERSION is missing its numeric value');
}
} Try / catch
try {
await parseMedia({src: url});
} catch (e) {
if (e instanceof Error && e.message.includes('EXT-X-VERSION')) {
// fix the playlist source or regenerate with a compliant packager
}
throw e;
} Prevention
- Use a compliant HLS packager (FFmpeg, MediaConvert, Shaka) to generate playlists
- Validate generated playlists with an HLS conformance checker before deployment
When it happens
Trigger: A playlist line '#EXT-X-VERSION' with no colon and version number, or '#EXT-X-VERSION:' with an empty value after the colon.
Common situations: Hand-edited m3u8 files where the version number was accidentally deleted; corrupted manifest from a buggy encoder or packager; playlist truncated right after the directive name.
Related errors
- EXT-X-MEDIA directive must have a value
- EXT-X-TARGETDURATION directive must have a value
- EXTINF has no value
- #EXT-X-PLAYLIST-TYPE. directive must have a 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/d2375009e38504de.
Report an issue: GitHub.