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
The flatpak contains some custom-built gstreamer but it turns out the version shipped by Debian is sufficient, given you have above environment variable set. Thanks to @flowy for finding the variable in the docs: Hardware acceleration Ā· Rafostar/clapper Wiki Ā· GitHub
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.
Is URI opening supported on the packaged version of Clapper? I havenāt been able to get it to work. When I try to open a URL I get the following error printed if running Clapper from a terminal:
(com.github.rafostar.Clapper:4697): Clapper-CRITICAL **: 20:51:19.129: Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3-0/GstURISourceBin:urisourcebin0/GstSoupHTTPSrc:souphttpsrc0: GStreamer encountered a general stream error.
Internal data stream error.
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3-0/GstURISourceBin:urisourcebin0/GstSoupHTTPSrc:souphttpsrc0:
streaming stopped, reason not-linked (-1)
This happens both with and without using GST_CLAPPER_USE_PLAYBIN3=1.
Iām curious as to why that is? The bug still seems to be present even now as Iām getting the exact same error as @Jt0 was with an up to date system and the latest clapper package still in Jan 2023.
Is this a gstreamer issue thatās patched over in the flatpak? Or an issue with clapper itself?