Hi,
I have below two pipelines working properly but separately. I need to run them together but the sources are same
gst-launch-1.0 -e v4l2src device=/dev/video1 ! queue ! ‘video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! comp.sink_0 v4l2src device=/dev/video0 ! queue ! ‘video/x-raw, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! comp.sink_1 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=960 sink_0::height=540 sink_1::xpos=960 sink_1::ypos=0 sink_1::width=960 sink_1::height=540 ! nvvidconv ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! h264parse ! mux. pulsesrc device=“alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo” ! ‘audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=44100, channels=(int)2’ ! queue ! audioconvert ! voaacenc ! aacparse ! mpegtsmux name=mux ! filesink location=“pip3.ts”
gst-launch-1.0 -e v4l2src device=/dev/video1 ! queue ! ‘video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! comp.sink_0 v4l2src device=/dev/video0 ! queue ! ‘video/x-raw, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! comp.sink_1 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=1500 sink_1::ypos=800 sink_1::width=320 sink_1::height=240 ! nvvidconv ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! h264parse ! mux. pulsesrc device=“alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo” ! ‘audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=44100, channels=(int)2’ ! queue ! audioconvert ! voaacenc ! aacparse ! mpegtsmux name=mux ! filesink location=“pip2.ts”
Now I need to run these two pipelines at the same time ans make 2 different files. How can I combine these using the tee element.
Or is there any other method using the nvcompositor and save 2 files separately?
One file must have the videos picture in picture
Other file must have the videos side by side