mpv
mpv copied to clipboard
Can't seek byterange MP4 HLS stream
Important Information
Provide following Information:
- mpv version:
0.37.0
- macOS Version:
13.6.2
- Source of the mpv binary or bundle: Homebrew formula
Reproduction steps
Try to reproduce your issue with --no-config first. If it isn't reproducible with --no-config try to first find out which option or script causes your issue.
Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differs from your own.
- Run
mpv --no-config "https://framatube.org/static/streaming-playlists/hls/66fcff64-d8f9-49c1-8deb-011b115786de/73451ad8-d30e-4beb-aa92-3dba23ba07c8-720.m3u8"
- Notice skipping ahead to cached parts of the video works fine
- Skip to a part of the video that isn't cached
- Notice MPV freezes
- Notice the errors (shown below)
- Notice MPV crashes
Expected behavior
Video plays
Actual behavior
Video freezes and errors are logged:
[ffmpeg] NULL: Invalid NAL unit size (-20372128 > 35).
[ffmpeg] NULL: missing picture in access unit with size 39
MPV then crashes
Log file
Sample files
https://framatube.org/static/streaming-playlists/hls/66fcff64-d8f9-49c1-8deb-011b115786de/73451ad8-d30e-4beb-aa92-3dba23ba07c8-720.m3u8
Extra context
The example video is from #10029 as I'm not able to share the video I found the issue with, but it doesn't seem to be a duplicate of that issue. Based on experiments, this seems to only happen with playlists that use byte ranges on a single MP4 file. This might be caused by the boundaries not being in ideal places but I don't know much about how MP4 files work. VLC can play these streams as expected but prints errors like mp4: Fragment sequence discontinuity detected 677 != 0
. It looks like VLC might download the previous chunk to get the data it needs to play the actual timestamp skipped to but I'm unsure.