mpv Information
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 9.0 (runtime 9.0.1)
FFmpeg library versions:
libavcodec 63.1.100 (runtime 63.1.101)
libavdevice 63.1.100 (runtime 63.1.101)
libavfilter 12.1.100 (runtime 12.1.101)
libavformat 63.1.100 (runtime 63.1.101)
libavutil 61.1.100 (runtime 61.1.101)
libswresample 7.1.100 (runtime 7.1.101)
libswscale 10.1.100 (runtime 10.1.101)
Other Information
- macOS version: macOS 26.6.2 (25G83)
- Source of mpv: Homebrew, though master exhibits the same behavior
- Latest known working version: N/A
- Issue started after the following happened: Upgrade of ffmpeg to 9.0.1
Note that ffmpeg 9.0.1 contains the following change which causes the issue: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23750
However I don't know whether this is a bug in ffmpeg or a bug in mpv exposed by this change.
This is also closely linked to using the latest version 8.5.0 of [streamlink](https://github.com/streamlink/streamlink), though it seems unlikely to me that streamlink causes the issue.
Reproduction Steps
The issue happens when playing a Twitch stream that uses Twitch Enhanced Broadcasting using streamlink in low latency mode and passing data to mpv through stdin (the default).
Example command:
streamlink https://www.twitch.tv/cohhcarnage best --twitch-low-latency --player-verbose --player mpv --player-args '--no-config'
This command will fork a mpv process like this:
mpv --force-media-title=https://www.twitch.tv/cohhcarnage --no-config -
Then it feeds data from the segments located in the EXT-X-TWITCH-PREFETCH tags of the m3u8 playlist provided by Twitch, as they are being downloaded.
Note: This requires both using low latency mode (--twitch-low-latency) and passing data through stdin (e.g. using a named pipe by using the --player-fifo streamlink argument does not exhibit the issue)
Expected Behavior
The stream plays properly until it ends or the player is exited.
Actual Behavior
After a relatively short time (less than a minute), the player closes after displaying an error like this:
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: trun sample count 7 exceeds the -97 samples the input can hold
[lavf] error reading packet: Invalid data found when processing input.
Exiting... (End of file)
Log File
Output from running:
streamlink https://www.twitch.tv/cohhcarnage best --twitch-low-latency --player-verbose --player mpv --player-args '--no-config --gpu-debug --log-file=output.txt'
output.txt
Sample Files
I cannot supply a reproducible media file as this concerns streaming (and the error may be linked to network latency), but other streamers on which this fails include: https://www.twitch.tv/patty, https://www.twitch.tv/whiskeyding0.
I carefully read all instruction and confirm that I did the following:
mpv Information
Other Information
Reproduction Steps
The issue happens when playing a Twitch stream that uses Twitch Enhanced Broadcasting using streamlink in low latency mode and passing data to mpv through stdin (the default).
Example command:
This command will fork a mpv process like this:
Then it feeds data from the segments located in the
EXT-X-TWITCH-PREFETCHtags of the m3u8 playlist provided by Twitch, as they are being downloaded.Note: This requires both using low latency mode (
--twitch-low-latency) and passing data through stdin (e.g. using a named pipe by using the--player-fifostreamlink argument does not exhibit the issue)Expected Behavior
The stream plays properly until it ends or the player is exited.
Actual Behavior
After a relatively short time (less than a minute), the player closes after displaying an error like this:
Log File
Output from running:
output.txt
Sample Files
I cannot supply a reproducible media file as this concerns streaming (and the error may be linked to network latency), but other streamers on which this fails include:
https://www.twitch.tv/patty,https://www.twitch.tv/whiskeyding0.I carefully read all instruction and confirm that I did the following:
--log-file=output.txt.