i am also trying to playback hw accelerated h264 videos but with no luck.
I am running PostmarketOS edge these days and I am able to run gst-launch-1.0 playbin uri=... without issues. Providing the -v flag shows that it’s using the v4l2slh264dec plugin. I am using GStreamer 1.22.3.
Perhaps you can try using Clapper on Flatpak instead? It should decode the video using hardware acceleration out of the box. You can see the GStreamer plugin used by pressing the video icon next to the seek bar.
I also get the same ffmpeg error when trying to play media with mpv, which results in an increase in heat and reduced battery life when comparing it with Clapper:
$ mpv --hwdec=auto h264.mp4
(+) Video --vid=1 (*) (h264 1280x720 24.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Failed to open VDPAU backend Error loading shared library libvdpau_nvidia.so: No such file or directory
[ffmpeg/video] h264_v4l2m2m: Could not find a valid device
[ffmpeg/video] h264_v4l2m2m: can't configure decoder
Could not open codec.
There is also a thread about H.265 playback which I didn’t manage to resolve yet: Librem 5 support H.265 on NXP i.MX8M