Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
- RTX 3090
- RTX 4090
• DeepStream Version
- deepstream:6.2-triton
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
- 525.85.12
- 535.54.03
• Issue Type( questions, new requirements, bugs)
- bugs
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
- see the following article
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
- see the following article
Hi All,
This is the follow up article of https://forums.developer.nvidia.com/t/deepstream-6-2-encoder-abnomral-behaviour/259258
I am using DS to
- take some rtsp
- run some model
- add some visualisation
- re encode it
- stream to rtsp server
- ffmpeg read the rtsp server and change the format to HLS for downstream web browser
I was using DS 6.1.1 (image: deepstream:6.1.1-triton) with Driver version 515.65.01 on RTX 3090 and everything work fine.
Recently I am upgrading my hardware to RTX 4090 since DS 6.2 support ADA. But the output RTSP stream can no longer be process by ffmpeg and change to HLS. RTX 3090 have the same problem with DS 6.2 as well.
To reproduce the result:
- Start rtsp server:
docker run --rm -it --network=host bluenviron/mediamtx:latest
- Start ds pipeline inside the container.
gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! nvvideoconvert ! nvv4l2h264enc ! rtspclientsink location=rtsp://localhost:8554/test
- change format using ffmpeg
ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/test -c:v copy -f hls test.m3u8
- test output hls stream
vlc ./test.m3u8
I tried on both RTX 3090, RTX 4090, and multiple driver following the support matrix. DS6.2 always fail, and DS6.1.1 works fine with RTX 3090. DS6.1.1 works fine with RTX 4090 as well, except some core fucntion, for example tracker, does not work using DS 6.1.1.
I change the encoder from nvv4l2h264enc
to x264enc
in DS 6.2 and everything works fine again.
gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! nvvideoconvert ! x264enc ! rtspclientsink location=rtsp://localhost:8554/test
ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/test -c:v copy -f hls test.m3u8
From the old post Fiona tried with RTX3090, but it actually didn’t work. ffmpeg did not output the correct segment and list for HLS, which can be observed from the last command line.
ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/test -c:v copy -f hls test.m3u8
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[rtsp @ 0x561ddfdb9780] decoding for stream 0 failed
Input #0, rtsp, from 'rtsp://localhost:8554/test':
Metadata:
title : Stream
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
[hls @ 0x561de0161300] Opening 'test0.ts' for writing
Output #0, hls, to 'test.m3u8':
Metadata:
title : Stream
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[hls @ 0x561de0161300] Opening 'test.m3u8.tmp' for writingte=N/A speed= 0x
**frame= 0 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x**
For successful conversion, ffmpeg will show correct frame, fps, etc. And output the segment (.ts) and list (.m3u8) successfully. Check the last command output
ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/test -c:v copy -f hls test.m3u8
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, rtsp, from 'rtsp://localhost:8554/test':
Metadata:
title : Stream
Duration: N/A, start: 1.593656, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
[hls @ 0x555df3f3ae80] Opening 'test0.ts' for writing
Output #0, hls, to 'test.m3u8':
Metadata:
title : Stream
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[hls @ 0x555df3f3ae80] Opening 'test.m3u8.tmp' for writingte=N/A speed=1.06x
**frame= 224 fps= 18 q=-1.0 Lsize=N/A time=00:00:13.06 bitrate=N/A speed=1.06x**
Since the it works by just changing from hardware deocoding to software decoding. I suspect the issue is related to the driver and encoder. Please kindly advice and it is urgent to get the RTX 4090 working with deepstream. Many Thanks!