Deepstream exits when video source gets disconnected

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
Deepstream 5.1
• TensorRT Version
TensorRT 7.2
• NVIDIA GPU Driver Version (valid for GPU only)
Driver Version 515
• Issue Type( questions, new requirements, bugs)
Bugs

I have a problem while running Deepstream and reading video source from camera. Currently I’m running Deepstream 5.1 in Docker and when camera stream disconnects for some seconds Deepstream crashes aswell. Error from docker:

ERROR from source: Internal Server Error
Debug info: gstsouphttpsrc.c(1433): gst_soup_http_src_parse_status (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstURIDecodeBin:src_elem/GstSoupHTTPSrc:source:
Internal Server Error (500), URL: http://192.168.16.204:8000/camera/mjpeg, Redirect to: (NULL)
ERROR from source: Internal data stream error.
Debug info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstURIDecodeBin:src_elem/GstSoupHTTPSrc:source:
streaming stopped, reason error (-5)
ERROR from typefindelement0: Stream doesn't contain enough data.
Debug info: gsttypefindelement.c(996): gst_type_find_element_chain_do_typefinding (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstURIDecodeBin:src_elem/GstTypeFindElement:typefindelement0:
Can't typefind stream
Quitting
App run failed

My config.txt:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=30

[tiled-display]
enable=0
rows=1
columns=1
width=640
height=480
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=2
uri=http://192.168.16.204:8000/camera/mjpeg
num-sources=1
gpu-id=0
cudadec-memtype=0
roi=782:290:328:317


[sink0]
enable=1
type=1
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=1


[osd]
enable=1
gpu-id=0
border-width=2
text-size=20
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=416
height=416
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
batch-size=1
gie-unique-id=1
process-mode=1
nvbuf-memory-type=0
config-file=config_infer_primary.txt

[secondary-gie0]
enable=1
process-mode=2
gpu-id=0
batch-size=1
gie-unique-id=2
operate-on-gie-id=1
operate-on-class-ids=0;
config-file=config_infer_picklist.txt

As you can notice I’m reading video source as:

type=2
uri=http://192.168.16.204:8000/camera/mjpeg

I have also tried the same thing with USB camera and disconnecting it from my computer, deepstream crashes the same way.

My question is - are there any settings that I could set in config.txt that would try reconnecting to video stream and deepstream wouldn’t exit?

  1. how did you disconnect the source? unplug the rtsp camera or USB camera?
  2. could you try this issue on ds6.2? thanks.
  3. can you narrow down it? is it a gstreamer issue or a deepstream issue?

Thank you for some ideas @fanzh. To answer your questions:

  1. When network is unstable http://192.168.16.204:8000/camera/mjpeg gets disconnected and doesn’t work, but when network is stable again it connects again and everything works while viewing it from for e.g. browser. While testing it with USB camera - yes I unplug it from USB port completely.
  2. I cannot test it currently with DS 6.2 unfortunately
  3. When I launch gst-launch-1.0 uridecodebin uri='http://192.168.16.204:8000/camera/mjpeg' I get this error, it won’t even start:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'source': gst.soup.session=context, session=(GstSoupSession)NULL;
Pipeline is PREROLLED ...
Prerolled, waiting for buffering to finish...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
streaming stopped, reason not-linked (-1)
Execution ended after 0:00:00.056895924
Setting pipeline to NULL ...
Freeing pipeline ...

Unless I’m using wrong command to run gstreamer

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

  1. it is not rtsp source, “type=2” is a file source, can you see the rendering video at the start? could you provide a whole log?
  2. can you use “gst-discoverer-1.0 http://xx” or “ffprobe http://xx” to analyze the source? can you use “gst-launch-1.0 uridecodebin uri=http://xx ! nvvideoconvert ! autovideosink” to play the source? is there any error?

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