Error using v4l2sink when combining 2 camera streams
Jim Ruxton
jim.ruxton at gmail.com
Wed Feb 17 06:53:20 UTC 2021
If I want to send a video stream on /dev/video4 to a loopback device in
Ubuntu I can use :
./gst-launch-1.0 -v -m v4l2src device=/dev/video4 ! v4l2sink
device=/dev/video0
And the video on /dev/video4 can be seen with :
ffplay /dev/video0
I can merge 2 videos with:
*./gst-launch-1.0 v4l2src device=/dev/video4 ! videoscale ! queue !
videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640,
height=480! alpha alpha=1 ! videobox border-alpha=0 left=-640 !
compositor name=Mix ! videoconvert ! autovideosink v4l2src
device=/dev/video2 ! videoscale ! queue ! videoconvert ! video/x-raw,
format=YUY2, framerate=30/1, width=640, height=480! alpha alpha=1 !
videobox border-alpha=0 right=-640 ! Mix. And see the merged camera
videos on my monitor but I can't seem to send those merged videos to a
loopback device. For example if I try changing autovideosink to v4l2sink
device=/dev/video0: ***./gst-launch-1.0 v4l2src device=/dev/video4 ! videoscale !
videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640,
height=480! alpha alpha=1 ! videobox border-alpha=0 left=-640 !
videomixer name=Mix ! videoconvert ! **v***4l2sink
device=/dev/video0***sync=false v4l2src device=/dev/video2 ! videoscale
! videoconvert ! video/x-raw, format=YUY2, framerate=30/1, width=640,
height=480! alpha alpha=1 ! videobox border-alpha=0 right=-640 ! Mix. I
get the following result with no video output: Setting pipeline to
PAUSED ... Pipeline is live and does not need PREROLL ... Setting
pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element
/GstPipeline:pipeline0/GstV4l2Src:v4l2src1: Internal data stream error.
Additional debug info: gstbasesrc.c(3072): gst_base_src_loop ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src1: streaming stopped, reason
not-negotiated (-4) Execution ended after 0:00:00.381495593 Setting
pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to
NULL ... Freeing pipeline ... I have also tried not specifying a video
format as I have in my first example above but get the same error. Does
anyone know how I can send my merged stream to the loopback device?
Thanks Jim *
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210217/af38e1ae/attachment-0001.htm>
More information about the gstreamer-devel
mailing list