0

I have the following pipeline:

gst-launch-1.0 v4l2src device=/dev/video0 ! 'image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1' ! jpegdec ! videoconvert ! fbdevsink sync=False

works as expected, it simply uses a USB capture card (https://www.amazon.ca/gp/product/B087C3NG9W) to stream data from the source to the monitor. Only problem with this pipeline is that the captured footage is choppy. I believe this happens because this pipeline doesn't use the hardware accelrators on the RPI for jpeg decoding and instead use the CPU. So I believe this pipeline:

gst-launch-1.0 v4l2src device=/dev/video0 ! 'image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1' ! v4l2jpegdec ! videoconvert ! fbdevsink sync=False 

The problem is:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' does not support 2:0:0:0 colorimetry
Additional debug info:
../sys/v4l2/gstv4l2object.c(4038): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device wants 2:4:5:1 colorimetry
Execution ended after 0:00:00.012490082
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...

so I tried

gst-launch-1.0 v4l2src device=/dev/video0 ! 'image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1' ! omxmjpegdec ! videoconvert ! fbdevsink sync=False 

which resulted on not having gst-omx installed on the RPI. Tried installing it but it looks like its no longer supported.

Note I am using a RPI 4, 4GB and:

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

My questions are:

  • Any suggestions on how to speed up such pipeline ?
  • If the RPI 4 isn't the hardware to use, any suggestions for better alternatives ?

1 Answer 1

0

Try adding jpegparse in the pipeline before v4l2jpegdec. If you want to encode with v4l2h264enc afterwards, videoconvert (or v4l2convert) is not required in between.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jul 23, 2022 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.