Hi,
I’m working on a digital signage player (Qt5/QML, Wayland, GStreamer 1.24, Debian Trixie, kernel 6.6) on a Raspberry Pi 3B. I’m using this pipeline for H.264 hardware decoding:
filesrc → qtdemux → h264parse → v4l2h264dec → queue → waylandsink
Works perfectly for a single video. The problem comes during video-to-video transitions in a playlist: I need to have a second pipeline ready (in PAUSED state) while the first is still PLAYING, then switch between them.
When I try to open a second v4l2h264dec instance while the first is alive, it fails — so I currently serialize access with a static mutex, which introduces a visible freeze (~50–70ms) between videos.
My tests with fakesink (to isolate the decoder question):
# Terminal 1
gst-launch-1.0 filesrc location=video1.mp4 ! qtdemux ! h264parse ! v4l2h264dec ! fakesink sync=false &
# Terminal 2 (a few seconds later)
gst-launch-1.0 filesrc location=video2.mp4 ! qtdemux ! h264parse ! v4l2h264dec ! fakesink sync=false
Terminal 2 fails with Cannot allocate memory on the V4L2 buffer allocation.
Questions:
-
Is this a hard hardware limit on Pi3 (one decoder instance only), or is there a kernel/V4L2 config to enable concurrent instances?
-
I found a forum thread where someone resolved a similar issue after reflashing and recompiling — but couldn’t identify the exact fix. Has anyone reproduced this?
-
Would
PAUSEDstate on the first pipeline release the V4L2/CMA buffers, allowing the second pipeline to open/dev/video10?
Hardware: Pi 3B · Debian Trixie · kernel 6.6 · GStreamer 1.24 · Wayland
Thanks