mpv icon indicating copy to clipboard operation
mpv copied to clipboard

In LAN mode, some MP4 playback is very choppy.

Open peerless2012 opened this issue 2 months ago • 12 comments

mpv Information

mpv v0.40.0-dev-g2e5e2938d Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Nov 10 2025 08:05:24
libplacebo version: v7.357.0
FFmpeg version: bebbdca
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Windows version: 11
- GPU model, driver and version: navida 2060 super
- Source of mpv: mpv-x86_64-pc-windows-msvc in nightly.link
- Latest known working version: no
- Issue started after the following happened: always

Reproduction Steps

Put the mp4 in my nas with http server, and play the url with mpv.

Expected Behavior

The playback should not choppy.

Actual Behavior

The playback is very choppy.

And the total cache time is always less than 1s.

If I remux the mp4 to mkv (use Mkvtoolnix), then the issue is gone.

Log File

output.txt

Sample Files

https://drive.google.com/file/d/1diN94Wx7kbbELmwKbAC6xWT678vqRzIy/view?usp=drive_link

I carefully read all instruction and confirm that I did the following:

  • [x] I tested with the latest mpv version to validate that the issue is not already fixed.
  • [x] I provided all required information including system and mpv version.
  • [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • [x] I attached the full, untruncated log file.
  • [x] I attached the backtrace in the case of a crash.

peerless2012 avatar Nov 12 '25 16:11 peerless2012

What if you add --cache to the command line?

kasper93 avatar Nov 12 '25 16:11 kasper93

This is the original file: .\mpv.exe --cache=yes --cache-secs=10 http://192.168.0.254/files/es-4K.mp4

Image

This is the remux file: .\mpv.exe --cache=yes --cache-secs=10 http://192.168.0.254/files/es-4K.mkv

Image

You can see the difference about Total Cache between these two file. But both file seems have much drop frames.

And both test on same device and network.

peerless2012 avatar Nov 12 '25 23:11 peerless2012

That's a high resolution and you're not using hardware decoding. Try adding hwdec=auto

Doofussy2 avatar Nov 13 '25 21:11 Doofussy2

.\mpv.exe --hwdec=auto --cache=yes --cache-secs=10 http://192.168.0.254/files/es-4K.mp4 Image

Still the same issue.

peerless2012 avatar Nov 14 '25 00:11 peerless2012

The cache doesn't appear to have been enabled.

Doofussy2 avatar Nov 14 '25 03:11 Doofussy2

I just streamed a little of it from your G Drive. My stats for the video differ from yours. Mine says the video 30fps but yours says 60fps. Mine is being downscaled.

Image

Doofussy2 avatar Nov 14 '25 04:11 Doofussy2

No dropped frames.

mpv --no-config --hwdec=auto --cache=yes --cache-secs=2 https://drive.google.com/file/d/1diN94Wx7kbbELmwKbAC6xWT678vqRzIy/view

Image

Doofussy2 avatar Nov 14 '25 04:11 Doofussy2

I think google is changing it when I stream

chrome player stats

Image

Doofussy2 avatar Nov 14 '25 04:11 Doofussy2

No dropped frames.

Your test is kind of useless, it's streaming at half the framerate, less than half the resolution and >20x less bandwidth. The video file doesn't get it's quality murdered when downloading it first.

I was able to reproduce the issue with or without hwdec on a 5700X and 6700XT, it's able to play fine in other players (Firefox/Edge/MPC-HC)

EDIT: I can reproduce without --cache but not when using cache=yes and a default profile and I could reproduce on my profile which was using cache=yes and demuxer-hysteresis-secs (can no longer reproduce with hysteresis commented out).

Jules-A avatar Nov 14 '25 04:11 Jules-A

This happened on android platform too, I use mpv-android, also have this issue. But other player (Mxplayer, Exoplayer) do not have this issue.

peerless2012 avatar Nov 14 '25 04:11 peerless2012

Ya, that's why I showed the chrome stats. I realized it was being modified. I wasn't able to download the file.

Doofussy2 avatar Nov 14 '25 04:11 Doofussy2

Ya, that's why I showed the chrome stats. I realized it was being modified. I wasn't able to download the file.

If I need to modify the share file access for others to download?

peerless2012 avatar Nov 14 '25 04:11 peerless2012