htirtom
December 24, 2019, 6:47am
1
Hi,
I am trying to send Usb camera inference to Rtsp sink on Jetson Nano. Below pipeline works:
./test-launch "( v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! videoconvert ! nvvidconv ! video/x-raw(memory:NVMM), format=NV12 ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay config-interval=2 name=pay0 pt=96 )"
But, I would like to include NvInfer and NvOSD in the pipeline. I tried below pipeline without luck.
./test-launch "( v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! videoconvert ! nvvidconv ! video/x-raw(memory:NVMM), format=NV12 ! m.sink_0 nvstreammux name=m width=640 height=480 batch-size=1 live-source=1 batched-push-timeout=4000000 ! nvinfer config-file-path=dstest1_pgie_config.txt ! nvvidconv ! nvdsosd ! nvvidconv ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay config-interval=2 name=pay0 pt=96 )"
Could you please help me to construct the correct pipeline?
Best regards,
DaneLLL
December 24, 2019, 8:37am
2
Hi,
On DeepStream SDK, please use nvvideoconvert instead of nvvidconv plugin.
htirtom
December 24, 2019, 9:20am
3
Hi Danelll,
thank you very much for your quick reply.
Now, this pipeline works but there is around 2 seconds latency. Do you know what can I do to decrease latency?
./test-launch "( v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! videoconvert ! nvvideoconvert ! video/x-raw(memory:NVMM), format=NV12 ! m.sink_0 nvstreammux name=m width=640 height=480 batch-size=1 live-source=1 batched-push-timeout=4000000 ! nvinfer config-file-path=dstest1_pgie_config.txt ! video/x-raw(memory:NVMM), format=NV12 ! queue ! nvvideoconvert ! video/x-raw(memory:NVMM), format=RGBA ! nvdsosd ! nvvideoconvert ! video/x-raw, format=RGBA ! videoconvert ! video/x-raw, format=NV12 ! omxh264enc profile=baseline control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay config-interval=2 name=pay0 pt=96 )"
Best regards,
DaneLLL
December 25, 2019, 2:01am
4
Hi,
You may configure the follow properties in omxh264enc:
_ iframeinterval : Encoding Intra Frame occurance frequency
flags: readable, writable, changeable only in NULL or READY state
Unsigned Integer. Range: 0 - 4294967295 Default: 0
insert-sps-pps : Insert H.264 SPS, PPS at every IDR frame
flags: readable, writable
Boolean. Default: false
Also try to set ‘config-interval=-1’ in rtph264pay
_ config-interval : Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled, -1 = send with every IDR frame)
flags: readable, writable
Integer. Range: -1 - 3600 Default: 0
htirtom
December 26, 2019, 5:25am
5
Hi DaneLLL,
Thank you very much for your suggestions.
I tried several settings but latency did not improve. Anyway, it is not that big issue for me now.
Best regards,