How to handle if RTSP url is invalid or it got disrupted in between?

I am attaching 3 minutes log while using nvurisrcbin
log.txt (7.4 MB)

thanks for the update. there is no Gstreamer debug log.

  1. please do “export GST_DEBUG=6” first, then start the command. 20 seconds are enough. the log will include “DEBUG” word.
  2. noticing uridecodebin is fine. please also provide the uridecodebin 's working log. I will compare the two logs.
  1. export GST_DEBUG=6

  2. nvurisrcbin


    log_nvurisrcbin.txt (1.7 MB)

  3. uridecodebin


    log_uridecodebin.txt (1.0 MB)

there is no plugin debug log .
please use gst-launch-1.0 -v nvurisrcbin uri=rtsp://admin:123456@192.168.99.93 rtsp-reconnect-interval=5 ! nveglglessink >log_nvurisrcbin.txt 2>log_nvurisrcbin.txt
and
gst-launch-1.0 -v uridecodebin uri=rtsp://admin:123456@192.168.99.93 rtsp-reconnect-interval=5 ! nveglglessink >log_uridecodebin.txt 2>log_uridecodebin.txt

log_nvurisrcbin.log (36.9 MB)
log_uridecodebin.log (47.0 MB)

did you execute export and gst-launch in the same shell terminal? did you see this kind of Gstreamer plugin log in the shell terminal?


I can’t find any gstreamer printing in your log. the format is “time DEBUG/LOG plugin log”.

I am sorry, i uploaded the wrong file, i have updated the log file

after comparing the two logs, there is decoding issue when using nvurisrcbin.


we can see there is no decoding output because of no “gst_video_decoder_prepare_finish_frame” printing.
will continue to check.

1 Like

sorry for the late reply. I tested nvurisrcbin with a valid url.
gst-launch-1.0 -v nvurisrcbin uri=rtsp://xx ! nveglglessink will show output video. gst-launch-1.0 -v nvurisrcbin uri=rtsp://xx rtsp-reconnect-interval=5 ! nveglglessink will not show output video and reconnect again and again.
1.log (41.6 KB)
It seems different from your results.

5 seconds is too short for my valid rtsp url. gst-launch-1.0 -v nvurisrcbin uri=rtsp://xx rtsp-reconnect-interval=20 ! nveglglessink can show the output video.

The behaviour is still the same on my computer, I am getting a window with a black screen (no video streaming). Could that be a problem with the GPU or driver?

GPU : NVIDIA GeForce GTX 1080 Ti
Driver Version: 535.104.05
CUDA Version: 12.2

last time you made a recording output.ts, can you try the decoding by this command “gst-launch-1.0 nvurisrcbin uri=file:///home/rec/output.ts ! nveglglessink”?

yes, it is working

I checked the two again. In log_nvurisrcbin.txt, if searching Gstreamer “gst_v4l2_video_dec_loop”, there is only “Allocate output buffer” and “Leaving output thread: eos”


but in log_uridecodebin.txt, there is another “Process output buffer” printing.

  1. from the log log_nvurisrcbin.txt, the app hung before “Process output buffer”. the data will not be sent to decode.
  2. is it a physical camera or virtual camera? what is the device model? can we access that camera?

after checking log_nvurisrcbin.txt again, there is error printing, which is calling low level error. please refer to gstreamer code.

Line 154974: 0:00:23.102151392 e[336m  329e[00m 0x7f5bbc006180 e[37mDEBUG  e[00m e[00m       v4l2allocator gstv4l2allocator.c:1539:gst_v4l2_allocator_dqbuf:<nvv4l2decoder0:pool:src:allocator>e[00m **broken pipe signals last buffer**

can this “nvurisrcbin black screen” issue reproduce every time?