Setup:
- Xavier AGX
- Jetpack Version 4.5
- Deepstream Version 5.0.1
Hi,
My project requires multiple camera sources which need to be composited, encoded and then saved/streamed. For this, I realised I can use nvstreammux and nvmultistreamtiler. To test the pipeline, I tried the following:
gst-launch-1.0 nvstreammux name=nvmux batch-size=3 width=1920 height=1080 live-source=true \
nvv4l2camerasrc device=/dev/video0 bufapi-version=true ! "video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1" ! nvmux.sink_0 \
nvv4l2camerasrc device=/dev/video1 bufapi-version=true ! "video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1" ! nvmux.sink_1 \
nvv4l2camerasrc device=/dev/video2 bufapi-version=true ! "video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1" ! nvmux.sink_2 \
nvmux.src ! nvmultistreamtiler columns=3 rows=1 width=5760 height=1080 ! nvvideoconvert ! nvv4l2h265enc maxperf-enable=true ! h265parse ! qtmux ! filesink location=test.mp4 -e
This does not generate any playable streams. The pipeline gets stuck with no error messages and when I try to end it using Ctrl+C., the following message is shown and the pipeline remains stuck until I kill the process.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
I tried the same idea with just one camera using the following pipeline:
gst-launch-1.0 nvstreammux name=nvmux batch-size=1 width=1920 height=1080 live-source=true \
nvv4l2camerasrc device=/dev/video0 bufapi-version=true ! "video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1" ! nvmux.sink_0 \
nvmux.src ! nvmultistreamtiler columns=1 rows=1 width=1920 height=1080 ! nvvideoconvert ! nvv4l2h265enc maxperf-enable=true ! h265parse ! qtmux ! filesink location=test.mp4 async=false -e
But this also gives me the same problem. No error message, the pipeline is just stuck.
If I try to avoid the nvstreammux and nvmultistreamtiler completely, and test out a simple pipeline for saving one video, it works. This is the pipeline that works:
gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 bufapi-version=true ! "video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080, framerate=30/1" ! nvv4l2h265enc maxperf-enable=true ! h265parse ! qtmux ! filesink location=test.mp4 -e
I am not able to figure out why the nvmultistreamtiler output cannot be encoded and saved. I would appreciate any help.