Has anyone had success using Clapper for video playback? The flatpak works pretty much out of the box on the Pinephone, but when I download a video with yt-dlp (resulting in a .webm file), run Clapper, and try to open the video file, I get the following error:
(com.github.rafostar.Clapper:2): Clapper-CRITICAL **: 01:35:36.931: Error from element /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/v4l2slvp9dec:v4l2slvp9dec0: GStreamer encountered a general resource error.
Could not enable the decoder driver.
../subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codecvp9dec.c(510): gst_v4l2_codec_vp9_dec_negotiate (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/v4l2slvp9dec:v4l2slvp9dec0:
VIDIOC_STREAMON(SINK) failed: Cannot allocate memory
Edit: I’ve made some progress. I uninstalled the flatpak and built Clapper from source. Not sure if that changed anything, but what may have changed is I installed libgtk-4-media-gstreamer and libgtk-4-bin. Now when I try to open the video file, this is the output:
(com.github.rafostar.Clapper:9173): Clapper-CRITICAL **: 02:42:41.878: Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/v4l2slvp9dec:v4l2slvp9dec0: No space left on the resource.
Not enough memory to allocate source buffers.
../sys/v4l2codecs/gstv4l2codecvp9dec.c(562): gst_v4l2_codec_vp9_dec_decide_allocation (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3-0/GstDecodebin3:decodebin3-0/v4l2slvp9dec:v4l2slvp9dec0
The video file is pretty big (2.1 GiB) so I tried a smaller one (111 MiB) and playback works just fine with playbin3 enabled. I wonder if there’s a way to get it to play the larger video, but for now this is a start.
Edit 2: Playback works “just fine” 90% of the time, but doing other things like changing the volume while the video is playing will cause artifacts. I was able to get the larger video to play by forcing yt-dlp to download at 1080p instead of the default 4k, bringing the file size down to a much more reasonable ~300 MiB.
Yeah! I’ve had a lot of success with Clapper. I use it almost every night!
On the newer Debian’ised Reform sysimagev3- the flatpak just works for me, without tweaks. Even very high bitrate streams e.g. ~30GB 1080p Bluray remuxes, or 1080p60fps Youtube videos- in both of those cases, CPU decoding simply would not work. Clapper can play those smoothly with hardware accel. I’ve actually had more success than with mpv.
I think one of your issues is vp9? I don’t know if the decoder is missing in hardware, or somewhere in the software stack - but I’ve only had success with h264. Instruct yt-dlp to ignore vp9.
Also, not sure if this matters, but make sure your user is in all the relevant looking groups listed in /etc/group? (video, drm, blah blah. I can’t check right now as I don’t have access to my Reform)
Soon you will not need the flatpak anymore because I packaged clapper for Debian and uploaded it to unstable. It’s currently waiting in the NEW queue for ftp-master review: clapper - Debian NEW package overview
Yes, I think streaming is in Flatpak only for some reason. Won’t GST_CLAPPER_USE_PLAYBIN3=1 negatively impact Flatpak where this option is unnecessary? It is marked as experimental feature in settings after all.
IDK, but there seem to be a Clapper matrix chat channel. Maybe somebody can go and ask the dev?
Meh. Hardware accel on our systems won’t work without it. So I don’t care if it’s experimental or not- I need hardware accel. If I could use CPU decoding all the time I would, but that’s not possible for most of the (higher bitrate) streams I play.
Yes, by setting that environment variable we avoid having to build our own gstreamer version as well. There is nothing really stopping is from building our own gstreamer other than having the available person-power to maintain our custom gstreamer build. If there is anybody willing to maintain it, then I can help to make this happen and then we don’t need to use that environment variable.
With a recent enough reform-tools version you get hardware acceleration that way without Flatpak. If your reform-tools version is too old, set the GST_CLAPPER_USE_PLAYBIN3=1 environment variable for clapper.