gstreamer uyvy camera stream not working on voxl2
-
Hello, I have been trying to use gstreamer to stream video from a usb camera that outputs uyvy but I have been unsuccessful. I am connected to the same network as the voxl2 and I am interacting with it through ssh. Running the following command
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,format=UYVY ! videoconvert ! x264enc ! rtph264pay name=pay0 ! udpsink host=192.168.0.149 port=8554on the voxl2 and
gst-launch-1.0 udpsrc port=8554 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosinkon my host machine results in the gstreamer on the voxl2 doing nothing and then eventually crashing.
$ gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,format=UYVY ! videoconvert ! x264enc ! rtph264pay name=pay0 ! udpsink host=192.168.0.149 port=8554 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock Redistribute latency... # it waits here for some time ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not read from resource. Additional debug info: gstv4l2bufferpool.c(1040): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: poll error 1: Invalid argument (22) Execution ended after 0:08:31.639262049 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...However when I run the same commands on my host machine it works. Does anyone know of a way to get this working?
-
Try to run this command on the VOXL-2 and see if it outputs anything when streaming from the host to make sure you actually are getting data into the VOXL:
gst-launch-1.0 udpsrc port=8554 num-buffers=1 ! fakesink dump=trueI also have issues with
decodebinreceiving an h264 stream as it usesqtivdecto decode the h264 and outputsvideo/x-raw(memory:GBM)which I have issues working with. You can try this pipeline to use a different decoder:gst-launch-1.0 udpsrc port=8554 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! autovideosink sync=false -
Try to run this command on the VOXL-2 and see if it outputs anything when streaming from the host to make sure you actually are getting data into the VOXL:
gst-launch-1.0 udpsrc port=8554 num-buffers=1 ! fakesink dump=trueI also have issues with
decodebinreceiving an h264 stream as it usesqtivdecto decode the h264 and outputsvideo/x-raw(memory:GBM)which I have issues working with. You can try this pipeline to use a different decoder:gst-launch-1.0 udpsrc port=8554 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! autovideosink sync=false@cegeyer when streaming from the host to the voxl using the command you suggested I get
voxl2:~$ gst-launch-1.0 udpsrc port=8554 num-buffers=1 ! fakesink dump=true Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock 00000000 (0x7fa0004e80): 80 60 6f 28 47 41 41 80 bc 30 17 35 09 30 .`o(GAA..0.5.0 Got EOS from element "pipeline0". Execution ended after 0:00:00.034007066 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...I assume this means I am able to get data into the voxl. When running the second command I get this
voxl2:~$ gst-launch-1.0 udpsrc port=8554 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! autovideosink sync=false Setting pipeline to PAUSED ... gbm_create_device(156): Info: backend name is: msm_drm Pipeline is live and does not need PREROLL ... WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0: Could not initialise Xv output Additional debug info: xvimagesink.c(1773): gst_xv_image_sink_open (): /GstXvImageSink:autovideosink0-actual-sink-xvimage: Could not open display (null) Setting pipeline to PLAYING ... New clock: GstSystemClock gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm gbm_create_device(156): Info: backend name is: msm_drm ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: GStreamer encountered a general supporting library error. Additional debug info: ../../gst-omx-1.14.4/omx/gstomxvideodec.c(1819): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: OpenMAX component in error state Hardware (0x80001009) Execution ended after 0:00:07.897981343 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... -
How are you logged into the VOXL to get the window? I was able to get it by running
ssh -X root@<VOXL IP>from a Linxu host were I was logged in with a display. I don't have any peripheral to get a display directly from the VOXL.You can test my method by connecting to the VOXL via
ssh -Xthen running thisgst-launch-1.0 videotestsrc ! autovideosink. You should see a window pop up with a test pattern.Hopefully that fixes the issue, if not, you can try to switch
omxh264decwithavdec_h264but it will then use CPU instead of GPU -
How are you logged into the VOXL to get the window? I was able to get it by running
ssh -X root@<VOXL IP>from a Linxu host were I was logged in with a display. I don't have any peripheral to get a display directly from the VOXL.You can test my method by connecting to the VOXL via
ssh -Xthen running thisgst-launch-1.0 videotestsrc ! autovideosink. You should see a window pop up with a test pattern.Hopefully that fixes the issue, if not, you can try to switch
omxh264decwithavdec_h264but it will then use CPU instead of GPUHere is a command to stream video from VOXL2 camera via ssh X forwading. FPS may be limited due to bandwidth (perhaps this is the command you meant in your reference above).
ssh -X root@<voxl-ip> gst-launch-1.0 qtiqmmfsrc camera=0 ! "video/x-raw, width=1280,height=720,framerate=30/1" ! autovideoconvert ! autovideosinkThis should pop up a window with the stream from the camera. Make sure
voxl-camera-serveris not running if you are testing one of the mipi cameras connected to voxl2.Alex
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login