2014-03-28 45 views
0

我目前正在嘗試從我的覆盆子pi流兩個並排的攝像頭。gstreamer並排流

我發現GStreamer的管道:

gst-launch v4l2src device=/dev/video1 ! videoscale ! ffmpegcolorspace ! \ 
video/x-raw-yuv, width=640, height=480 ! videobox border-alpha=0 left=-640 !\ 
videomixer name=mix ! ffmpegcolorspace ! jpegenc ! tcpserversink \ 
host=192.168.1.108 port=8080 sync=false v4l2src ! videoscale !\ 
ffmpegcolorspace ! video/x-raw-yuv, width=640, height=480 !\ 
videobox right=-640 ! mix. 

兩個攝像頭顯示,他們是活躍的光,但我只能看到右側。

有人可以幫助我嗎?

問候 卡斯滕

回答

0

我跑的線細,我的Linux機器,但只是作爲一種野生的猜測,想盡videomixer輸入墊之前加入queue元素。

0

我看到dev/video1,但沒有dev/video2,或者更確切地說dev/video0可能想在你的v4l2src中指定它。

而且我跟你類似流水線的麻煩,這個工作對我來說:

gst-launch-0.10 v4l2src device=/dev/video1 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox border-alpha=0 ! videomixer name=mixme ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=sbs-3d-video.mov v4l2src device=/dev/video0 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox left=-320 ! mixme. 

對不起,您的版本了GStreamer:

gst-launch v4l2src device=/dev/video1 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox border-alpha=0 ! videomixer name=mixme ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=sbs-3d-video.mov v4l2src device=/dev/video0 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, width=320, height=240 ! videobox left=-320 ! mixme.