GStreamer: Multiple webcam sources, Picture in Picture to mux on a Jetson Nano, then to be used as a pipeline with belabox

Viewed 21

GStreamer: Multiple webcam sources, Picture in Picture to mux on a Jetson Nano, then to be used as a pipeline with belabox >> belabox.net

I'm currently trying to pull two different usb webcams into a pipeline and create a Picture-in-Picture composite, but I keep getting an error like this:

GStreamer Error: gstreamer error from v4l2src1

This is the current pipeline I'm working on that doesn't work;

v4l2src device=/dev/video0 ! image/jpeg,width=1920,height=1080,framerate=60/1 ! nvvidconv ! queue ! comp.sink_0 !
v4l2src device=/dev/video1 ! image/jpeg,width=800,height=448,framerate=60/1 ! videobox left=-4 right=-4 top=-4 bottom=-4 ! nvvidconv ! queue ! comp.sink_1 !

nvcompositor name=comp sink_0::width=1920 sink_0::height=1080 sink_1::width=640 sink_1::height=360 sink_1::xpos=1266 sink_1::ypos=706 sink_1::zorder=2 ! 'video/x-raw(memory:NVMM),format=RGBA,pixel-aspect-ratio=1/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' !
queue ! identity name=v_delay signal-handoffs=TRUE !

nvv4l2decoder mjpeg=1 enable-max-performance=true ! nvvidconv !
textoverlay text='' valignment=top halignment=right font-desc="Monospace, 5" name=overlay ! queue !

nvvidconv interpolation-method=5 !
nvv4l2h265enc control-rate=1 qp-range="28,50:0,38:0,50" iframeinterval=60 preset-level=4 maxperf-enable=true EnableTwopassCBR=true insert-sps-pps=true name=venc_bps !
h265parse config-interval=-1 ! queue max-size-time=10000000000 max-size-buffers=1000 max-size-bytes=41943040 ! mux.

alsasrc device=hw:2 ! identity name=a_delay signal-handoffs=TRUE ! volume volume=1.0 !
audioconvert ! opusenc bitrate=320000 ! opusparse ! queue max-size-time=10000000000 max-size-buffers=1000 ! mux.

mpegtsmux name=mux !
appsink name=appsink

Please note; I have two separate pipelines that can use each webcam, so I know the cameras work and can be used, I just need them to be in the same pipeline have a picture-in-picture composite and work in the belabox environment.

For reference this is a working usb webcam pipeline that works with belabox:

v4l2src device=/dev/video0 ! image/jpeg,width=1920,height=1080,framerate=60/1 !
identity name=v_delay signal-handoffs=TRUE !
nvv4l2decoder mjpeg=1 enable-max-performance=true ! nvvidconv !
textoverlay text='' valignment=top halignment=right font-desc="Monospace, 5" name=overlay ! queue !
nvvidconv interpolation-method=5 !
nvv4l2h265enc control-rate=1 qp-range="28,50:0,38:0,50" iframeinterval=60 preset-level=4 maxperf-enable=true EnableTwopassCBR=true insert-sps-pps=true name=venc_bps !
h265parse config-interval=-1 ! queue max-size-time=10000000000 max-size-buffers=1000 max-size-bytes=41943040 ! mux.
alsasrc device=hw:2 ! identity name=a_delay signal-handoffs=TRUE ! volume volume=1.0 !
audioconvert ! voaacenc bitrate=128000 ! aacparse ! queue max-size-time=10000000000 max-size-buffers=1000 ! mux.
mpegtsmux name=mux !
appsink name=appsink

Any Ideas?

0 Answers
Related