By sending the nvvideoconvert
directly to the nv3dsink
, just like deepstream_test_1.py, I get no jitter.
During the last days I have made several attempts:
A) Changed the encoder from H264 to H265: no improvement
B) With the encoder, I changed these properties:
idrinterval
: reduced from 256 to 15, I got a slight and marginal improvement
iframeinterval
: always keeping it lower than idrinterval, no improvement
bitrate
: when reducing it from 4,000,000 to 40,000 the resolution reduces a lot and it is difficult to assert that the jitter is gone because it is too much blur, but it may be gone …
C) Moreover, if I inspect nvgstplayer output, I see some metadata about the stream that is present at the original camera RTSP stream, and is not present at the RTSP stream produced by the pipeline. Those metadata is in bold at the following log:
ubuntu@ubuntu:~/EdgeServer$ nvgstplayer-1.0 -i rtsp://xxx:xxx@10.21.45.19:554
** (nvgstplayer-1.0:115944): WARNING **: 10:49:51.856: <bus_call:1310> failed to query duration in time
** Message: 10:49:54.129: <cb_newpad:2077> creating the pipe for “video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, pixel-aspect-ratio=(fraction)1/1, profile=(string)main, tier=(string)main, level=(string)4”
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 279
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 279
ubuntu@ubuntu:~/EdgeServer$ nvgstplayer-1.0 -i rtsp://10.21.45.31:8554/stream2
** (nvgstplayer-1.0:116496): WARNING **: 11:05:26.820: <bus_call:1310> failed to query duration in time
** Message: 11:05:35.251: <cb_newpad:2077> creating the pipe for “video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, width=(int)1920, height=(int)1080, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, profile=(string)main, tier=(string)main, level=(string)4”
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 279
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 279
D) Finnally, I used ffprobe
to get more information on the output stream, and it complains that PPS is out of range.
fmello@turing:~$ ffprobe -i rtsp://10.21.45.31:8554/stream2
ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[rtsp @ 0x587463228ec0] max delay reached. need to consume packet
[rtsp @ 0x587463228ec0] RTP: missed 28 packets
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[rtsp @ 0x587463228ec0] max delay reached. need to consume packet
[rtsp @ 0x587463228ec0] RTP: missed 11 packets
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[hevc @ 0x58746322e280] PPS id out of range: 0
Last message repeated 1 times
[hevc @ 0x58746322e280] Error parsing NAL unit #0.
[rtsp @ 0x587463228ec0] max delay reached. need to consume packet
[rtsp @ 0x587463228ec0] RTP: missed 68 packets
Input #0, rtsp, from ‘rtsp://10.21.45.31:8554/stream2’:
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 0.160000, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 12.50 tbr, 90k tbn, 90k tbc