Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. gstreamer uyvy camera stream not working on voxl2

gstreamer uyvy camera stream not working on voxl2

Scheduled Pinned Locked Moved Software Development
5 Posts 3 Posters 2.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Samuel LehmanS Offline
    Samuel LehmanS Offline
    Samuel Lehman
    Contributor
    wrote on last edited by
    #1

    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=8554
    
    

    on 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  ! autovideosink
    

    on 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?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cegeyer
      wrote on last edited by
      #2

      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=true
      

      I also have issues with decodebin receiving an h264 stream as it uses qtivdec to decode the h264 and outputs video/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
      
      Samuel LehmanS 1 Reply Last reply
      0
      • C cegeyer

        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=true
        

        I also have issues with decodebin receiving an h264 stream as it uses qtivdec to decode the h264 and outputs video/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
        
        Samuel LehmanS Offline
        Samuel LehmanS Offline
        Samuel Lehman
        Contributor
        wrote on last edited by
        #3

        @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 ...
        
        
        1 Reply Last reply
        0
        • C Offline
          C Offline
          cegeyer
          wrote on last edited by
          #4

          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 -X then running this gst-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 omxh264dec with avdec_h264 but it will then use CPU instead of GPU

          Alex KushleyevA 1 Reply Last reply
          0
          • C cegeyer

            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 -X then running this gst-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 omxh264dec with avdec_h264 but it will then use CPU instead of GPU

            Alex KushleyevA Offline
            Alex KushleyevA Offline
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by Alex Kushleyev
            #5

            @cegeyer

            Here 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 ! autovideosink
            

            This should pop up a window with the stream from the camera. Make sure voxl-camera-server is not running if you are testing one of the mipi cameras connected to voxl2.

            Alex

            1 Reply Last reply
            0

            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            ModalAI
            Categories Recent Tags ModalAI.com Docs
            © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups