Record multiple rtsp stream and concatenate

I want to replicate this command below which record multiple rtsp stream and concatenate them but without using the module nvcompositor.
Is it possible ?
Thanks

gst-launch-1.0 -e nvcompositor name=mix background-w=2560 background-h=1440
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1280 sink_0::height=720
sink_1::xpos=1280 sink_1::ypos=0 sink_1::width=1280 sink_1::height=720
sink_2::xpos=0 sink_2::ypos=720 sink_2::width=1280 sink_2::height=720
sink_3::xpos=1280 sink_3::ypos=720 sink_3::width=1280 sink_3::height=720
! ‘video/x-raw(memory:NVMM),format=RGBA’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc insert-vui=1 profile=2 ! h264parse ! matroskamux ! filesink location=test.mkv sync=false
rtspsrc location=rtsp://127.0.0.1:8554/test ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! nvv4l2decoder ! ‘video/x-raw(memory:NVMM),format=NV12’ ! queue ! mix.sink_0
rtspsrc location=rtsp://127.0.0.1:8554/test ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! nvv4l2decoder ! ‘video/x-raw(memory:NVMM),format=NV12’ ! queue ! mix.sink_1
rtspsrc location=rtsp://127.0.0.1:8554/test ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! nvv4l2decoder ! ‘video/x-raw(memory:NVMM),format=NV12’ ! queue ! mix.sink_2
rtspsrc location=rtsp://127.0.0.1:8554/test ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! nvv4l2decoder ! ‘video/x-raw(memory:NVMM),format=NV12’ ! queue ! mix.sink_3

Hi,
Would like to confirm the request. Do you mean you would like to encode each RTSP source into individual file? In the command there are 4 sources, and you would like to have 4 individual video files?

@DaneLLL
In fact I would like to do the same behaviour as the previous command but on a google coral. (get 1 file from the 4 cameras). There is no more Jetson Xavier so I switch to Coral.
The problem is that nvcompositor is not supported on coral.
Do you know an alternative ?
Thanks

Hi,
The plugin is available on Jetson platforms. It uses hardware converter. On other platforms you may try the software converter: compositor
Or check with the vendor if there is hardware engine supporting it.

I try with the compositor like this :

gst-launch-1.0 compositor name=cp sink_1::xpos=1280 sink_2::ypos=720 sink_3::xpos=1280 sink_4::ypos=720 ! filesink location=out.mp4 sync=false
rtspsrc location=rtsp://192.168.2.201:554/1/h264major ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=1280,height=720 ! cp.sink_1
rtspsrc location=rtsp://192.168.2.202:554/1/h264major ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=1280,height=720 ! cp.sink_2
rtspsrc location=rtsp://192.168.2.203:554/1/h264major ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=1280,height=720 ! cp.sink_3
rtspsrc location=rtsp://192.168.2.204:554/1/h264major ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=1280,height=720 ! cp.sink_4

But I get this error

GStreamer-CRITICAL **: 09:17:02.886: gst_structure_set: assertion ‘IS_MUTABLE (structure) || field == NULL’ failed

Sorry for the late response, is this still an issue to support? Thanks

Yes please !

Hi,
There are four sources and suggest you construct the pipeline one by one. Have one source working, and try two sources, and then 3 sources, 4 sources.

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