{"record":{"id":"eddf1114ebc9fdd9","repo":"remotion-dev/remotion","slug":"extinf-has-no-value","errorCode":null,"errorMessage":"EXTINF has no value","messagePattern":"EXTINF has no value","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/containers/m3u/parse-directive.ts","lineNumber":53,"sourceCode":"\t\tconst parsed = parseM3uMediaDirective(value);\n\n\t\treturn parsed;\n\t}\n\n\tif (directive === '#EXT-X-TARGETDURATION') {\n\t\tif (!value) {\n\t\t\tthrow new Error('EXT-X-TARGETDURATION directive must have a value');\n\t\t}\n\n\t\treturn {\n\t\t\ttype: 'm3u-target-duration',\n\t\t\tduration: parseFloat(value),\n\t\t};\n\t}\n\n\tif (directive === '#EXTINF') {\n\t\tif (!value) {\n\t\t\tthrow new Error('EXTINF has no value');\n\t\t}\n\n\t\treturn {\n\t\t\ttype: 'm3u-extinf',\n\t\t\tvalue: parseFloat(value),\n\t\t};\n\t}\n\n\tif (directive === '#EXT-X-ENDLIST') {\n\t\treturn {\n\t\t\ttype: 'm3u-endlist',\n\t\t};\n\t}\n\n\tif (directive === '#EXT-X-PLAYLIST-TYPE') {\n\t\tif (!value) {\n\t\t\tthrow new Error('#EXT-X-PLAYLIST-TYPE. directive must have a value');\n\t\t}","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/containers/m3u/parse-directive.ts#L35-L71","documentation":"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().","triggerScenarios":"A playlist line '#EXTINF' with no colon, or '#EXTINF:' with an empty duration value — the segment duration is missing.","commonSituations":"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.","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"],"exampleFix":"// before\n#EXTINF:\nsegment0.ts\n\n// after\n#EXTINF:10.0,\nsegment0.ts","handlingStrategy":"validation","validationCode":"// Pre-fetch and check every EXTINF has a duration\nconst text = await (await fetch(url)).text();\nfor (const line of text.split('\\n')) {\n  const trimmed = line.trim();\n  if (trimmed.startsWith('#EXTINF')) {\n    const colonIdx = trimmed.indexOf(':');\n    const val = colonIdx === -1 ? '' : trimmed.slice(colonIdx + 1).split(',')[0];\n    if (!val || isNaN(Number(val))) {\n      throw new Error('#EXTINF is missing its duration value');\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await parseMedia({src: url});\n} catch (e) {\n  if (e instanceof Error && e.message === 'EXTINF has no value') {\n    // fix the malformed EXTINF line or regenerate the playlist\n  }\n  throw e;\n}","preventionTips":["Verify media playlists are fully received (no truncation) before parsing","Use a compliant packager to avoid malformed EXTINF entries"],"tags":["hls","m3u8","directive","extinf","malformed"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}