Slow stuttery playback performance for 4K UHD VP9 and H.265 / HEVC samples with unaccelerated CPU decoding
Currently, every ffmpeg-only video player (such as Celluloid) puts GStreamer video players (such as Clapper, Totem, etc.) to shame in terms of being able to smoothly play 4K H.265 / HEVC videos on older CPUs (such as my 2x4 cores Intel Xeon), even with playbin3. It happens on other machines as well (well, those that don't have hardware-accelerated H.265/VP9 decoding), not just @alatiera's favorite machine.
I am able to reproduce the issue on Fedora 39 with gst-play-1.0 --use-playbin3 the_filename
.
Samples
Use the 4K H.265 and VP9 24fps (and 60fps, if you want to be more taxing on the CPU) from:
- https://kodi.wiki/view/Samples (the "Exodus" 4K 24fps sample and "The Redwoods" 4K VP9 24fps sample)
- https://elecard.com/videos (those are 60fps)
I have also mirrored the samples I used, along with an additional private 4K H.265 24fps anime sample, in this folder.
Preliminary profiling
I did: dnf debuginfo-install gstreamer1* ffmpeg ffmpeg-free libavcodec-free libavutil-free pulseaudio pipewire mingw64-gstreamer1-plugins-base-debuginfo mingw32-gstreamer1-plugins-base-debuginfo libde265 x265 dav1d rust-rav1e libvpx
…and recorded these Sysprof 45 profiles on my desktop workstation running the Wayland version of GNOME 45.2:
Below are convenience screenshots from what I see in Sysprof.
H.265 (anime sample)
Also available: screenshot of the full flame graph including non-GSt (ffmpeg) parts
Call graph | Graphics/compositor marks | CPU usage |
---|---|---|
VP9 ("The Redwoods" sample)
Also available: screenshot of the full flame graph including non-GSt (ffmpeg) parts
Call graph | CPU usage |
---|---|
(also available: screenshot of the non-GSt parts of the calls graph) |
The hypothesis so far is that raw video conversions shouldn't happen in software there.