Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuttering during playback with wayland and 23.976Hz or 24Hz refresh rates. #15597

Open
6 tasks done
adolfotregosa opened this issue Dec 30, 2024 · 2 comments
Open
6 tasks done
Labels

Comments

@adolfotregosa
Copy link

adolfotregosa commented Dec 30, 2024

mpv Information

mpv --version
mpv v0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Dec 30 2024 18:37:37
libplacebo version: v7.349.0
FFmpeg version: git-2024-12-27-5f38c82536
FFmpeg library versions:
   libavcodec      61.28.100
   libavdevice     61.4.100
   libavfilter     10.6.101
   libavformat     61.9.102
   libavutil       59.53.100
   libswresample   5.4.100
   libswscale      8.13.100

Other Information

- Linux version: CachyOS Linux
- Kernel Version: 6.13.0-rc4-1-cachyos-rc
- GPU Model: AMD iGPU M780
- Mesa/GPU Driver Version: Mesa 24.3.2-cachyos1.2
- Window Manager and Version: kde 6.2.4 
- Source of mpv: tried both stock cachyos ffmpeg+mpv and self compiled 0.39 + latest ffmpeg 
- Latest known working version: none 
- Issue started after the following happened: I don't know. This computer is new to me.

At 23.976Hz or 24Hz refresh rates, videos stutter randomly. However, at 120Hz, they don't. On X11, it's fine as far as I can tell perfect. Using my other computer on the same TV, which has an Nvidia card, I don't see this issue on either X11 or Wayland, so I'm leaning towards it being something related to the AMD (i)GPU + wayland. I’ve tried all the combinations I could think of with --hwdec, --gpu-api, --vo, --video-sync and --gpu-context without any success. The issue is only present in wayland.

Any suggestions ??

EDIT: At 120Hz using a 24Hz sample file so it's a multiple, stutters are there, just not as pronounced.
Now I'm really out of ideas lol.

EDIT2:
mpv FPS_test_1080p24_L4.1.mkv --hwdec=auto --vo=gpu-next --video-sync=display-resample --gpu-context=x11egl
At least at 120Hz, this combination helps tremendously, at 24Hz , still stutters.

EDIT3:
I've tested so far CachyOS, Manjaro and Nobara 41 both kde and gnome flavors. I also tested FFmpeg and MPV github master code. The video jumps always happen when TV refresh rate is set to match videos like 23.976Hz or 24Hz under wayland but not X11.

Reproduction Steps

The computer must be connected to a TV or monitor capable of switching the refresh rate to 23.976Hz or 24Hz and running wayland. I use the well-known mpv-kscreen-doctor.lua script to achieve this automatically. https://gitlab.com/smaniottonicola/mpv-kscreen-doctor
Play the sample file I attached and simply watch the moving bars. At some point they stutter/jump badly.

Expected Behavior

No stutters

Actual Behavior

stutters

Log File

output.txt

Sample Files

FPS_test_1080p23.976_L4.zip
FPS_test_1080p24_L4.zip

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

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • 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.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@aljus7
Copy link

aljus7 commented Jan 4, 2025

I had the same issues when I had KDE on my second computer. I think it's an issue with Plasma, since on Hyprland the playback is smooth as butter. I tried so hard to make MPV on Hyprland stutter, and I can't; even dragging windows around and messing with other stuff while playing does not make MPV stutter.

P.S.: I always use video-sync=display-resample with hardware decoding set to auto-safe and vo=gpu, also with interpolation turned on.

@adolfotregosa
Copy link
Author

adolfotregosa commented Jan 5, 2025

I had the same issues when I had KDE on my second computer. I think it's an issue with Plasma, since on Hyprland the playback is smooth as butter. I tried so hard to make MPV on Hyprland stutter, and I can't; even dragging windows around and messing with other stuff while playing does not make MPV stutter.

P.S.: I always use video-sync=display-resample with hardware decoding set to auto-safe and vo=gpu, also with interpolation turned on.

Thank you for the response.
I've been trying hard to find a solution. Today, I tested GNOME, and I experienced the same stutters, so it’s not related to Plasma.

Video-sync helps with smoothing the video but not with the large stutters; the video literally jumps. - - gpu-context=x11egl helps a lot but unfortunately does not fix the issue. When I manage to start X11 (this amd 7740 computer doesn’t like starting in X11), videos play fine at 23.976 and 24Hz. So, my conclusion is that it's related to Wayland. I guess I can try hyperland but that's not the objective because I only like kde.

@adolfotregosa adolfotregosa changed the title Stuttering during playback with plasma 6.2 + wayland and 23.976Hz or 24Hz refresh rates. Stuttering during playback with wayland and 23.976Hz or 24Hz refresh rates. Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants