jc-kynesim / rpi-ffmpeg

FFmpeg work for RPI
Other
111 stars 27 forks source link

[SOLVED] v4l2m2m-copy works but v4l2m2m does not #71

Closed vanfanel closed 1 year ago

vanfanel commented 1 year ago

Hi there,

I have noticed that, with latest stable mpv and rpi-ffmpeg, I can play h264 videos using the v4l2m2m-copy hardware decoder but I can't play them using the v4l2m2m decoder:


Using hardware decoding (v4l2m2m).
AO: [alsa] 48000Hz stereo 2ch float
VO: [gpu] 1920x1040 drm_prime[yuv420p]
[vo/gpu/drmprime] unsupported DRM image format yuv420p
[vo/gpu] Initializing texture for hardware decoding failed.

I am on Wayland, with latest Pi kernel on aarch64 and latest stable MESA.

Any idea on what could be wrong here? I would really like to be able to use the v4l2m2m decoder instead of v4l2m2m-copy, because v4l2m2m uses haft the CPU compared to the -copy variant.

I have also tried building all recent branches in https://github.com/jc-kynesim/rpi-ffmpeg/branches/active with identical results.

Maybe v4l2m2m isn't mean to work on Wayland to begin with?

vanfanel commented 1 year ago

Answering to myself, and whoever finds the same problem:

The [yuv420p] format is only supported by the Vulkan backend in MPV, so to use the v4l2m2m decoder, MPV must be built with Vulkan support (passing the -Dvulkan=enabled meson parameter and installing the libplacebo dependency).