Forums - qtiqmmfsrc not found

6 posts / 0 new
Last post
qtiqmmfsrc not found
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Mon, 2021-09-06 07:55

Hello,

I am trying to get the isp camera images with GStreamer into an OpenCV application.

When trying to run:

gst-launch-1.0 -e qtiqmmfsrc name=qmmf qmmf.video_0 ! video/x-h264,format=NV12,width=3840,height=2160,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux1.mp4" qmmf.video_1 ! video/x-h264,format=NV12,width=640,height=480,framerate=30/1 ! h264parse config-interval=1 ! mpegtsmux name=muxer ! queue ! tcpserversink port=8900 host=127.0.0.1 qmmf.video_2 ! "video/x-raw(memory:GBM),format=NV12,width=1920,height=1080,framerate=30/1" ! waylandsink sync=false fullscreen=true enable-last-sample=false

as per the example: https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-refere...

I am getting the following error:

WARNING: erroneous pipeline: no element "qtiqmmfsrc"

The same happens when I try running:

export XDG_RUNTIME_DIR=/usr/bin/weston_socket && gst-launch-1.0 qtiqmmfsrc ! video/x-raw, format=NV12, width=1280, height=720, framerate=30/1, camera=0 ! qtimlesnpe config=/data/misc/camera/mle_snpe.config postprocessing=detection ! queue ! qtioverlay ! waylandsink x=960 y=0 width=960 height=540 async=true sync=false enable-last-sample=false

Why would this be and how can I get GStreamer to read the isp camera feeds into an OpenCV application?

Thanks in advance,

  • Up0
  • Down0
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Mon, 2021-09-06 08:37

I realised the above could be due to it being run from an adb shell console. I tried copying the command onto the weston termianl (it was painful to write everything bit by bit, so let me know if there is an alternative) and after running:

gst-launch-1.0 -e qtiqmmfsrc name=qmmf ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux3.mp4"

I get the following error:

gbm_create_device(156): Info: backend name is: msm_drm

(gst-launch-1.0:3786): GStreamer-CRITICAL **: 15:30:54:646: gst_element_make_from_uri: assertion 'gst_uri_is_valid(uri)' failed

WARNING: erroneous pipeline: could not parse caps "video/x- h264.format=NV12, width=1920, height=1080, framerate=30/1"

How can I get the above to work?

Thanks

  • Up0
  • Down0
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Tue, 2021-09-07 08:02

I am now getting:

WARNING: erroneous pipeline: no element "location"

  • Up0
  • Down0
Mayur
Join Date: 26 Feb 21
Posts: 16
Posted: Tue, 2021-09-07 23:05

Hi 22imonreal, 

The  command is working fine, you can run this shell (not on weston), you need to set XDG_RUNTIME_DIR variable to weston then you can run any command on shell 

gst-launch-1.0 -e qtiqmmfsrc name=qmmf ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux3.mp4"

ex:- 

Run the following command in terminal 

export XDG_RUNTIME_DIR=/dev/socket/weston
mkdir -p /dev/socket/weston
/usr/bin/weston --tty=1 --idle-time=0
Run following command in other terminal 
export XDG_RUNTIME_DIR=/dev/socket/weston
gst-launch-1.0 -e qtiqmmfsrc name=qmmf ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux1.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux2.mp4" qmmf. ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1 ! h264parse ! mp4mux ! queue ! filesink location="/data/mux3.mp4"
#you can run gstreamer command here

Hope this resolve your issue,

Thanks & regards,

Mayur 

 

  • Up0
  • Down0
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Wed, 2021-09-08 03:24

The above worked, thank you very much!

  • Up0
  • Down0
22imonreal
Join Date: 10 Feb 21
Posts: 80
Posted: Thu, 2021-09-09 09:30

Okay, so now, I tried following this: https://developer.qualcomm.com/qualcomm-robotics-rb5-kit/software-refere...

to do the following:

1. stream on ip
2. save video
3. display on waylandsink
4. save frames

And I came up with the following command:
 

Quote:
export XDG_RUNTIME_DIR=/dev/socket/weston gst-launch-1.0 -e qtiqmmfsrc name=qmmf \ qmmf.video_0 \ ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1\ ! h264parse config-interval=1 \ ! mpegtsmux name=muxer \ ! queue \ ! tcpserversink port=8900 host=192.168.1.104 \ qmmf.video_1 \ ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 \ ! videoconvert \ ! jpegenc \ ! queue \ ! filesink location='/data/input/raw/gstreamer/ims/last_frame.jpg' \ qmmf.video_2 \ ! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1\ ! h264parse \ ! mp4mux \ ! queue \ ! filesink location="/data/input/raw/gstreamer/video/video.mp4" \ qmmf.video_3 \ ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1, camera=0 \ ! waylandsink fullscreen=true async=true sync=false

Which yields the following error:

Quote:
gbm_create_device(156): Info: backend name is: msm_drm Setting pipeline to PAUSED ... gbm_create_device(156): Info: backend name is: msm_drm Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... ERROR: pipeline doesn't want to play. Setting pipeline to NULL ... Freeing pipeline ... (gst-launch-1.0:15660): GStreamer-CRITICAL **: 16:12:49.457: Trying to dispose element pipeline0, but it is in PAUSED instead of the NULL state. You need to explicitly set elements to the NULL state before dropping the final reference, to allow them to clean up. This problem may also be caused by a refcounting bug in the application or some element.

 

If I run the commands separately, they work.

For example:



export XDG_RUNTIME_DIR=/dev/socket/weston
gst-launch-1.0 -e qtiqmmfsrc name=qmmf  \
qmmf.video_0 \
! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1\
! h264parse config-interval=1 \
! mpegtsmux name=muxer \
! queue \
! tcpserversink port=8900 host=192.168.1.104

works. And

 

export XDG_RUNTIME_DIR=/dev/socket/weston
gst-launch-1.0 -e qtiqmmfsrc name=qmmf  \
qmmf.video_1 \
! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 \
! videoconvert \
! jpegenc \
! queue \
! filesink location='/data/input/raw/gstreamer/ims/last_frame.jpg' \
qmmf.video_2 \
! video/x-h264,format=NV12,width=1920,height=1080,framerate=30/1\
! h264parse \
! mp4mux \
! queue \
! filesink location="/data/input/raw/gstreamer/video/video.mp4" \
qmmf.video_3 \
! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1, camera=0 \
! waylandsink fullscreen=true async=true sync=false

also works. Both work separately, but if I run the streaming command with any of the others, it fails.

How could I make all work together?

Thanks in advance, I'm finally making a lot of progress thanks to your help!

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.