{"record":{"id":"87271a920e596fb6","repo":"remotion-dev/remotion","slug":"no-streams-found","errorCode":null,"errorMessage":"No streams found","messagePattern":"No streams found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/media-parser/src/containers/m3u/select-stream.ts","lineNumber":72,"sourceCode":"\nexport const defaultSelectM3uAssociatedPlaylists: SelectM3uAssociatedPlaylistsFn =\n\t({associatedPlaylists}) => {\n\t\tif (associatedPlaylists.length === 1) {\n\t\t\treturn associatedPlaylists;\n\t\t}\n\n\t\treturn associatedPlaylists.filter((playlist) => playlist.default);\n\t};\n\nexport const selectStream = async ({\n\tstreams,\n\tfn,\n}: {\n\tstreams: M3uStream[];\n\tfn: SelectM3uStreamFn;\n}): Promise<M3uStream> => {\n\tif (streams.length < 1) {\n\t\tthrow new Error('No streams found');\n\t}\n\n\tconst selectedStreamId = await fn({streams});\n\tconst selectedStream = streams.find(\n\t\t(stream) => stream.id === selectedStreamId,\n\t);\n\n\tif (!selectedStream) {\n\t\tthrow new Error(`No stream with the id ${selectedStreamId} found`);\n\t}\n\n\treturn Promise.resolve(selectedStream);\n};\n\nexport const defaultSelectM3uStreamFn: SelectM3uStreamFn = ({streams}) => {\n\treturn Promise.resolve(streams[0].id);\n};\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media-parser/src/containers/m3u/select-stream.ts#L54-L90","documentation":"Thrown by `selectStream` when the `streams` array passed to it is empty — i.e., the HLS master playlist contained zero `#EXT-X-STREAM-INF` entries. Without at least one variant stream, there is nothing to select and play.","triggerScenarios":"Parsing an HLS master playlist (`.m3u8`) that has no `#EXT-X-STREAM-INF` directives at all, so the stream list passed to `selectStream` is empty. This can also happen if stream parsing logic finds no valid stream-inf entries due to parse failures earlier in the pipeline.","commonSituations":"Passing a media playlist (which lists segments, not streams) where a master playlist is expected. A malformed or empty master playlist. A playlist that only contains `#EXT-X-MEDIA` (audio/subtitle) entries but no video variants. A truncated or partially-served manifest.","solutions":["Verify the `.m3u8` file is a master playlist containing at least one `#EXT-X-STREAM-INF` line.","If the file is a media playlist (segment list), pass it directly rather than expecting stream selection.","Check that the server is serving the complete manifest and not truncating it.","Report the playlist at remotion.dev/report if it appears to be a valid master playlist with streams."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check that the manifest is a master playlist with streams\nasync function isMasterPlaylist(url: string): Promise<boolean> {\n  const res = await fetch(url);\n  const text = await res.text();\n  return text.includes('#EXT-X-STREAM-INF');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await parseMedia({src: 'https://example.com/master.m3u8'});\n} catch (e) {\n  if (e instanceof Error && e.message === 'No streams found') {\n    console.error('The M3U8 has no #EXT-X-STREAM-INF entries. Is this a media playlist?');\n  }\n  throw e;\n}","preventionTips":["Verify the M3U8 is a master playlist with at least one #EXT-X-STREAM-INF entry.","Do not pass media (segment-list) playlists where stream selection is expected.","Check that the server serves the complete manifest without truncation."],"tags":["hls","m3u8","empty-playlist","no-streams"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}