mix two video sources into one (side-by-side)

cancel
Showing results for 
Search instead for 
Did you mean: 

mix two video sources into one (side-by-side)

2,363 Views
vishvapathi
Contributor V

Hi All,

I am working on Displaying/streaming 2 UVC CAM's simultaneously. Below Command

gst-launch v4l2src device=/dev/video1 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox border-alpha=0 left=-320 ! videomixer name=mix ! ffmpegcolorspace ! autovideosink v4l2src device=/dev/video2 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox right=-320 ! mix.


Out of 2, /dev/video1 streams data but the second CAM /dev/video2 is ON after the command, but in my Display its pitch black.


Is this the correct way to stream multiple cams??

Kindly advice

DaianeAngolini

YuriMuhin_ng

shanmugamsundar

Labels (3)
0 Kudos
5 Replies

543 Views
vishvapathi
Contributor V

Hi,

For the Below Mixer command i am able to view only one video stream, the other CAM streams but in display its completely black.


$ gst-launch v4l2src device=/dev/video1 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, framerate=5/1, width=320, height=240 ! videobox border-alpha=0 left=-320 ! videomixer name=mix ! ffmpegcolorspace ! autovideosink sync=false v4l2src device=/dev/video2 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv,framerate=5/1,width=320, height=240 ! videobox right=-320 ! mix.          

Setting pipeline to PAUSED ...                                                 

MFW_GST_V4LSINK_PLUGIN 3.0.7 build on Feb 14 2014 12:47:14.                    

[--->FINALIZE v4l_sink                                                         

set color key                                                                  

MFW_GST_ISINK_PLUGIN 3.0.7 build on Feb 14 2014 12:47:47.                      

Pipeline is live and does not need PREROLL ...                                 

Setting pipeline to PLAYING ...                                                

New clock: GstSystemClock                                                      

WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src1: Got unexpecte.

Additional debug info:                                                         

gstv4l2src.c(914): gst_v4l2src_get_mmap (): /GstPipeline:pipeline0/GstV4l2Src:v1

hwbuf allocator zone(307200) created                                           

can not create threadmfw_gst_isink_setcaps:1489                                

VS0 created. in fmt[YUYV] win(0,0-640,240:640x240) out win(0,0-1024,768:1024x76)

set deinterlace mode 0                                                         

hwbuf allocator zone(614400) created                                           

hwbuf allocator zone(614400) destroied.                                        

hwbuf allocator zone(614400) created                                           

hwbuf allocator zone(614400) destroied.                                        

hwbuf allocator zone(614400) created                                           

hwbuf allocator zone(614400) destroied.   

Any pointers how to solve this?

LeonardoSandovalGonzalez

Tarek

0 Kudos

543 Views
vishvapathi
Contributor V

The Position of Displaying was wrong i guess.. after correcting it i am able to view both Camera streaming.

0 Kudos

543 Views
Tarek
Senior Contributor I

If you are using i.MX6 you should try the mfw_isink element. This element will do the scaling and positioning in hardware and save you a lot of CPU power. You can run 2 separate gstreamer pipelines each playing in a different position on the screen. Please see this post for how to use it.

Hope that helps.

0 Kudos

543 Views
daiane_angolini
NXP Employee
NXP Employee

I have never worked with videomixer before.

I think this kind of question is better replied in gstreamer community. Did you subscribe to gstreamer mailing list?

0 Kudos

543 Views
vishvapathi
Contributor V

No, I haven't...

0 Kudos