[Gst-launch-1.0] Using command line with 2 usb cameras

cancel
Showing results for 
Search instead for 
Did you mean: 

[Gst-launch-1.0] Using command line with 2 usb cameras

551 Views
Contributor II

Dear all.

I am Yongdeuk Park.

I want to test Video recording with 2 usb webcams.

When I use 1 usb webcam, I got a good result with following command:

'gst-launch-1.0 -e imxv4l2src device=/dev/video0 ! videoconvert ! queue ! vpuenc_h264 ! video/x-h264 ! mp4mux ! filesink location=/tmp/test_1.mp4'

Actually, I want to get a result with 2 usb webcams.

Following is my test log.

# device: imx6qsbresd board

# root@imx6qsabresd:~# uname -a
Linux imx6qsabresd 3.14.52+g91d84b0 #1 SMP PREEMPT Fri Apr 20 16:21:33 KST 2018 armv7l GNU/Linux

I need you guys' help.

Thanks,

BR.

Yongdeuk Park

Test log

//CMD#1 : gst-launch-1.0 -e imxv4l2src device=/dev/video0 ! videoconvert ! queue ! vpuenc_h264 ! video/x-h264 ! mp4mux ! filesink location=/tmp/test_1.mp4 &
//CMD#2 : gst-launch-1.0 -e imxv4l2src device=/dev/video3 ! videoconvert ! queue ! vpuenc_h264 ! video/x-h264 ! mp4mux ! filesink location=/tmp/test_2.mp4 &

//CMD#1 result
====== IMXV4L2SRC: 4.0.8 build on Apr 23 2018 10:17:42. ======
Setting pipeline to PAUSED ...
[INFO] Product Info: i.MX6Q/D/S
====== VPUENC: 4.0.8 build on Apr 23 2018 10:17:49. ======
wrapper: 1.0.62 (VPUWRAPPER_ARM_LINUX Build on Apr 23 2018 10:17:10)
vpulib: 5.4.32
firmware: 3.1.1.46070
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[INFO] ringBufferEnable 0, chromaInterleave 0, mapType 0, linear2TiledEnable 0

root@imx6qsabresd:/tmp# ps
PID TTY TIME CMD
847 ttymxc0 00:00:00 sh
1984 ttymxc0 00:00:01 gst-launch-1.0
1996 ttymxc0 00:00:00 ps

// then CMD#2 result
====== IMXV4L2SRC: 4.0.8 build on Apr 23 2018 10:17:42. ======
Setting pipeline to PAUSED ...
[INFO] Product Info: i.MX6Q/D/S
====== VPUENC: 4.0.8 build on Apr 23 2018 10:17:49. ======
wrapper: 1.0.62 (VPUWRAPPER_ARM_LINUX Build on Apr 23 2018 10:17:10)
vpulib: 5.4.32
firmware: 3.1.1.46070
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
uvcvideo: Failed to submit URB 0 (-28).
uvcvideo: Failed to submit URB 0 (-28).
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2Src:imxv4l2src0: Internal data flow error.
Additional debug info:
/media/hd1/ydpark/fsl-release-bsl-quad/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.4.5-r0/gstreamer-1.4.5/libs/gst/base/gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2Src:imxv4l2src0:
streaming task paused, reason error (-5)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...

root@imx6qsabresd:/tmp# ps
PID TTY TIME CMD
847 ttymxc0 00:00:00 sh
1984 ttymxc0 00:00:04 gst-launch-1.0
1997 ttymxc0 00:00:00 gst-launch-1.0
2008 ttymxc0 00:00:00 ps

// Final result
root@imx6qsabresd:/tmp# ls -al
total 888
drwxrwxrwt 2 root root 120 Jun 4 04:59 .
drwxrwxrwt 4 root root 80 Jun 4 00:42 ..
-rw-r--r-- 1 root root 0 Jun 4 00:42 .automount-mmcblk3p1
srwxrwxrwx 1 root root 0 Jun 4 00:42 oprofileui.socket
-rw-r--r-- 1 root root 909312 Jun 4 04:59 test_1.mp4
-rw-r--r-- 1 root root 0 Jun 4 04:59 test_2.mp4

2 Replies

92 Views
NXP TechSupport
NXP TechSupport

Hi Yongdeuk

seems gstreamer-imx used in the case, its issues also may be posted on
Issues · Freescale/gstreamer-imx · GitHub 

Alternatively one can try with nxp plugins, usage is described in Linux Guide found

in nxp linux documentation on

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

92 Views
Contributor II

Thanks for replying, Igor!

I did search for answer at Issues · Freescale/gstreamer-imx · GitHub . But I cannot find the solution.

Actually, a plugin name is different between my case and Github page. 

Can you explain more details to me?

I found that a boad what I used consists of 1 usb hub with 4 ports. 

In that case, Can I use only one gstreamer pipeline?

Thanks

BR

Yongdeuk Park

0 Kudos