remotion-dev/remotion · error · Error
#EXT-X-PROGRAM-DATE-TIME directive must have a value
Error message
#EXT-X-PROGRAM-DATE-TIME directive must have a value
What it means
Thrown by parseM3uDirective() at parse-directive.ts:147 when a line matches #EXT-X-PROGRAM-DATE-TIME but has no value. This optional directive associates the first sample of a segment with an absolute date and time using ISO 8601 format. The parser stores the raw string without validation but requires it to be non-empty.
Source
Thrown at packages/media-parser/src/containers/m3u/parse-directive.ts:147
if (directive === '#EXT-X-MAP') {
if (!value) {
throw new Error('#EXT-X-MAP directive must have a value');
}
const p = parseM3uKeyValue(value);
if (!p.URI) {
throw new Error('EXT-X-MAP directive must have a URI');
}
return {
type: 'm3u-map',
value: p.URI,
};
}
if (directive === '#EXT-X-PROGRAM-DATE-TIME') {
if (!value) {
throw new Error('#EXT-X-PROGRAM-DATE-TIME directive must have a value');
}
// Store the raw ISO 8601 date-time string without validation.
// This directive associates media segments with absolute dates but
// doesn't affect parsing of tracks, dimensions, or other metadata.
return {
type: 'm3u-program-date-time',
dateTime: value,
};
}
throw new Error(`Unknown directive ${directive}. Value: ${value}`);
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Ensure the directive carries an ISO 8601 date-time: #EXT-X-PROGRAM-DATE-TIME:2024-01-01T00:00:00.000Z
- Remove the directive if absolute timestamps are not needed (it is optional per spec)
- Regenerate the playlist with a compliant packager
Example fix
// before #EXT-X-PROGRAM-DATE-TIME: // after #EXT-X-PROGRAM-DATE-TIME:2024-01-01T00:00:00.000Z
Defensive patterns
Strategy: validation
Validate before calling
// Pre-fetch and check EXT-X-PROGRAM-DATE-TIME 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-PROGRAM-DATE-TIME')) {
const colonIdx = trimmed.indexOf(':');
if (colonIdx === -1 || !trimmed.slice(colonIdx + 1).trim()) {
throw new Error('#EXT-X-PROGRAM-DATE-TIME is missing its value');
}
}
} Try / catch
try {
await parseMedia({src: url});
} catch (e) {
if (e instanceof Error && e.message.includes('EXT-X-PROGRAM-DATE-TIME')) {
// fix the value or remove the optional directive
}
throw e;
} Prevention
- Remove the optional #EXT-X-PROGRAM-DATE-TIME directive if absolute timestamps are not needed
- Otherwise ensure it carries an ISO 8601 date-time string
When it happens
Trigger: A playlist line '#EXT-X-PROGRAM-DATE-TIME' with no colon, or '#EXT-X-PROGRAM-DATE-TIME:' with an empty value.
Common situations: Corrupted playlist where the timestamp was removed; encoder bug producing an incomplete directive; hand-edited live playlists where the date-time was accidentally deleted.
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-PLAYLIST-TYPE. directive must have a value
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/6d3f290340c8aaf3.
Report an issue: GitHub.