Deepstream-app h.265 rtsp out "Error Parsing NAL unit with ffplay"

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) : Jetson Nano
• DeepStream Version 6.0.1
• JetPack Version (valid for Jetson only) (4.6.4-b39)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) h265 encoging issue
• 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)
Just use a sink with rtsp out with source as h.265 and rtsp out as h.265 and use rtsp out with ffplay
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

ffplay rtsp://192.168.55.1:8555/ds-test

[hevc @ 0x7e24440062c0] PPS id out of range: 00KB sq= 0B f=0/0
Last message repeated 1 times
[hevc @ 0x7e24440062c0] Error parsing NAL unit #0.
[hevc @ 0x7e24440062c0] PPS id out of range: 00KB sq= 0B f=0/0
Last message repeated 1 times
[hevc @ 0x7e24440062c0] Error parsing NAL unit #0.
Input #0, rtsp, from ‘rtsp://192.168.55.1:8555/ds-test’: 0B f=0/0
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 0.066800, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 30 fps, 30 tbr, 90k tbn, 90k tbc

=> NOTE: ffplay with source rtsp from IP camera works fine (192.168.144.25:8554/main.264)

thanks for the sharing! does this error information happen every time? if using filesink(record to the ocal file), does this error still happen?

I dont see the error on deepstream-app console. The errors are coming from ffplay command.

Btw, is there a reference solution / sample, config which works with h.265 rtsp out which I can refer to?
What direction i should go to debug this issue.

please check if it is the network issue or opensource gst-rtsp-server or encoding issue.

  1. to rule out the network issue, you can play the rtsp on the rtsp server machine.
  2. please check if it is encoding issue, if using filesink(record to the local file), does this error still happen?
  3. or you need to check opensource gst-rtsp-server.

the ffplay is on the machine connected with jetson via usb cable.
a host and jetson are in the 192.168.55.x network.

could you share the deepstream-app configuration file? please check if it is encoding issue, if using filesink(record to the local file), does this error still happen playing by ffplay?

[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay
type=4
#1=h264 2=h265
codec=2
encoder type 0=Hardware 1=Software
enc-type=0
sync=0
#bitrate=5000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0

set below properties in case of RTSPStreaming

rtsp-port=8555
udp-port=5400

can i use filesink and rtsp together?

you can enable sink1 to use filesink. please refer to /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt.

I created 2 sinks, one for rtsp and other for file both using h265. File was created. rtsp with ffplay showed same errors. Am I missing something?

you can use “ctrl +c” to close the application, then use ffplay to play the local file. please check if using ffplay to play the local file also output the same errors.

No errors on ffplay local file.
I copied 1.mp4 (from jetson) on the same machine (host) (192.168.55.100) on which i was doing ffplay, so it was same ffplay in both cases

ffplay 1.mp4

ffplay version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2003-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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘1.mp4’:B sq= 0B f=0/0
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2024-04-23T08:01:49.000000Z
Duration: 00:00:26.83, start: 0.000000, bitrate: 1484 kb/s
Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 1920x1080, 1483 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 3k tbn, 3k tbc (default)
Metadata:
creation_time : 2024-04-23T08:01:49.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]

mj@mjmsibox:~$ ffplay rtsp://192.168.55.1:8555/ds-test

[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x7801380be780] PPS id out of range: 0
[hevc @ 0x7801380be780] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 0
[hevc @ 0x7801381e2c00] PPS id out of range: 0
[hevc @ 0x7801381e2c00] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x7801381f3180] PPS id out of range: 0
[hevc @ 0x7801381f3180] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x780138203740] PPS id out of range: 0
[hevc @ 0x780138203740] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 0
[hevc @ 0x780138213d40] PPS id out of range: 0
[hevc @ 0x780138213d40] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x780138224340] PPS id out of range: 0
[hevc @ 0x780138224340] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x780138234d00] PPS id out of range: 0
[hevc @ 0x780138234d00] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 0
[hevc @ 0x780138245680] PPS id out of range: 0
[hevc @ 0x780138245680] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 00KB sq= 0B f=0/0
[hevc @ 0x7801382560c0] PPS id out of range: 0
[hevc @ 0x7801382560c0] Error parsing NAL unit #0.
[NULL @ 0x7801380062c0] PPS id out of range: 0
[hevc @ 0x780138266a80] PPS id out of range: 0
[hevc @ 0x780138266a80] Error parsing NAL unit #0.
^Cmj@mjmsibox:~$ ^C fd= 0 aq= 0KB vq= 8KB sq= 0B f=0/0

using gst-launch to play, I can’t reproduce this issue. here is my test command-line:

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8654/ds-test !  rtph265depay ! h265parse ! nvv4l2decoder  ! fakesink

here is my log: log.txt (937 Bytes)
using ffplay to play on rtsp server machine, I can reproduce this issue. using VLC to play on client, this issue can’t be reproduced. so it is ffplay 's issue.

yes gst-launch is better.
But there is a substantial lag in it.
If I run gst-launch on jetson nano to save to a mp4, will it take gpu / cpu.
There is a substantial lag of few seconds due to this

recording mp4 and rtsp out are parallel by Gstramer tee. you can disable sink1 to stop mp4 recording.

Yes i have disabled that sink. Now I am sending the rtsp from deepstream to my rtsp server on AWS.
gst-launch 265 is slower as compared to ffmpeg (when doing h.264) (-v copy).

  • Can deepstream directly send to an external rtsp, so gst-launch can be avoided, possibly?

There is no update from you for a period, assuming this is not an issue any more. Hence we are closing this topic. If need further support, please open a new one. Thanks.
currently deepstream-app can suuport this kinds of sink 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvdrmvideosink 6=MsgConvBroker directly. deepstream-app code is opensource, you can customize it. creating sink code is in \opt\nvidia\deepstream\deepstream-6.4\sources\apps\apps-common\src\deepstream_sink_bin.c. please refer to the command-line in this link.

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