Streaming multiple mjpeg in combined stream

Hi everyone,
I am running the following command currently to stream 3 MJPEG cameras side-by-side on one combined stream over tcp with the Jetson Orin Nano:

gst-launch-1.0 -vvv nvcompositor name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 \
sink_2::xpos=1280 sink_2::ypos=0 sink_2::width=640 sink_1::height=480 ! \
nvvidconv ! 'video/x-raw,width=1920,height=480,framerate=30/1,format=NV12' ! x264enc bitrate=1000 ! mpegtsmux ! tcpserversink host=0.0.0.0 port=5001 -e \
v4l2src device=/dev/video0 ! image/jpeg,format=MJPG, width=640, height=480, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! comp.sink_0 \
v4l2src device=/dev/video2 ! image/jpeg,format=MJPG, width=640, height=480, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! comp.sink_1 \
v4l2src device=/dev/video4 ! image/jpeg,format=MJPG, width=640, height=480, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! comp.sink_2

This accomplishes what I want, but the h264 encoding uses a lot of cpu resources. I just want to combine the 3 mjpeg streams together into one stream side by side without the h264 encoding. I feel I do not need to do the h264 encoding step, but I could not find another command to do so. If someone could point me in the correct direction for the correct gstreamer command to do this, that would be appreciated.

Thanks,
Devin

Hi,
The command looks optimal on Orin Nano. For further performance enhancement, please consider use Orin NX which has hardware encoder.

Hi DaneLLL,

That’s what I was assuming. New to working with video streaming and gstreamer so just wanted to double check.

Thanks for quick response,
Devin

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.