remotion-dev/remotion · error · Error
EXTINF has no value
Error message
EXTINF has no value
What it means
Thrown by parseM3uDirective() at parse-directive.ts:53 when a line matches #EXTINF but has no value. Every #EXTINF directive must specify a decimal duration in seconds and optionally a title: #EXTINF:<duration>[,<title>]. The parser splits on the first colon; if no value follows, it throws before attempting parseFloat().
Source
Thrown at packages/media-parser/src/containers/m3u/parse-directive.ts:53
const parsed = parseM3uMediaDirective(value);
return parsed;
}
if (directive === '#EXT-X-TARGETDURATION') {
if (!value) {
throw new Error('EXT-X-TARGETDURATION directive must have a value');
}
return {
type: 'm3u-target-duration',
duration: parseFloat(value),
};
}
if (directive === '#EXTINF') {
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');
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure every #EXTINF line has a duration: #EXTINF:10.0,
- Check the playlist response was not truncated by the network
- Regenerate with a compliant packager if the encoder is producing malformed entries
Example fix
// before #EXTINF: segment0.ts // after #EXTINF:10.0, segment0.ts
Defensive patterns
Strategy: validation
Validate before calling
// Pre-fetch and check every EXTINF has a duration
const text = await (await fetch(url)).text();
for (const line of text.split('\n')) {
const trimmed = line.trim();
if (trimmed.startsWith('#EXTINF')) {
const colonIdx = trimmed.indexOf(':');
const val = colonIdx === -1 ? '' : trimmed.slice(colonIdx + 1).split(',')[0];
if (!val || isNaN(Number(val))) {
throw new Error('#EXTINF is missing its duration value');
}
}
} Try / catch
try {
await parseMedia({src: url});
} catch (e) {
if (e instanceof Error && e.message === 'EXTINF has no value') {
// fix the malformed EXTINF line or regenerate the playlist
}
throw e;
} Prevention
- Verify media playlists are fully received (no truncation) before parsing
- Use a compliant packager to avoid malformed EXTINF entries
When it happens
Trigger: A playlist line '#EXTINF' with no colon, or '#EXTINF:' with an empty duration value — the segment duration is missing.
Common situations: Truncated media playlist where the segment entry is cut off after the directive name; hand-edited playlist with a deleted duration value; encoder producing malformed segment entries.
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
- #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/eddf1114ebc9fdd9.
Report an issue: GitHub.