# RTSP streams working in deepstream, RTMP streams giving error: streaming stopped, reason not-linked (-1)

**URL:** <https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456>\
**Category:** DeepStream SDK\
**Tags:** python, docker, tensorrt, gstreamer, ubuntu, deepstream, cuda\
**Created:** [February 20, 2025, 10:02am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456 "2025-02-20T10:02:56Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 6:26am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/22 "2025-03-06T06:26:22Z")

</div>

@fanzh waiting for your response now.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 6, 2025, 6:39am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/23 "2025-03-06T06:39:57Z")

</div>

> [@sahil.ranmbail](#):
>
> - buffering… 0%

Noticing the data is buffering, can you see the output video after a while? On my side, after buffering to 100%, the video will come out.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 7:07am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/24 "2025-03-06T07:07:42Z")

</div>

yes, its working now:

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/a/f/f/aff1ac4eca5a4eef7b45b427d1bcb67d2aa7efd4.jpeg)

and now when i try to run this within the pipeline again, im getting this here:

i have provided you a small video, so you can have the idea what is happening here.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 7:08am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/25 "2025-03-06T07:08:25Z")

</div>

@fanzh waiting for your further guidance on this matter.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 7:24am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/26 "2025-03-06T07:24:51Z")

</div>

the pipeline is running fine but shutting down gracefully, seems like it is not considering it as live source, it just runs and save the results of inference on one frame only.

do i have to make some changes in the code to make the pipeline see it is the live source?

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 8:49am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/27 "2025-03-06T08:49:36Z")

</div>

@fanzh waiting for your guidance here

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 6, 2025, 8:55am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/28 "2025-03-06T08:55:36Z")

</div>

could you simplify the custom code to narrow this issue? for example, if using “source-\>nvstreammux-\>nveglglessink” pipeline, can you see the video? if using “source-\>nvstreammux-\>pgie-\>nveglglessink”, can you see the video?

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 9:36am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/29 "2025-03-06T09:36:56Z")

</div>

i think the pipeline is totally fine, the inference is happening but it is only happening for 1-single frame, like it is not taking the rtmp as the live source, and then the pipeline got stopped, it felt like rtmp is an image and it perform inference, pipeline stopped followed by saving the inference results.

i followed the logs and i see this error in the logs here:  
0:00:09.119477824 5119 0x5644f4865d70 WARN nvinfer gstnvinfer.cpp:2454:gst\_nvinfer\_output\_loop: error: Internal data stream error.  
0:00:09.119535513 5119 0x5644f4865d70 WARN nvinfer gstnvinfer.cpp:2454:gst\_nvinfer\_output\_loop: error: streaming stopped, reason error (-5)

how can i resolve this error here, i think that’s the reason its not working seamlessly.

@fanzh waiting for your reply now.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 6, 2025, 9:49am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/30 "2025-03-06T09:49:26Z")

</div>

from the log “nvinfer\_output\_loop: error: streaming stopped”, the app will end. Here are some steps to narrow down this issue.

1. Based on the orginal code, link nvstreammux to display\_sink. can the app run well?
2. if yes in the step1, Based on the orginal code, link pgie to display\_sink. can the app run well?

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 10:02am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/31 "2025-03-06T10:02:08Z")

</div>

@fanzh im not sure if i have to go through tough work here, because it is flawlessly working fine with rtsp and source file, if there was any issue with the linking it should have been also happen with rtsp and source file, so doing everything even i have tested the stream with this command:

gst-launch-1.0 uridecodebin uri=rtmp://localhost:1935/live/stream ! autovideosink

root@AAM-LAPTOP-027:/opt/nvidia/deepstream/deepstream-7.1/sources/deepstream\_python\_apps/Backup\_Deepstream\_Gaze\_Prediction# gst-launch-1.0 uridecodebin uri=rtmp://localhost:1935/live/stream ! autovideosink  
Setting pipeline to PAUSED …  
Pipeline is PREROLLING …  
Got context from element ‘autovideosink0-actual-sink-nveglgles’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;  
Setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Failed to query video capabilities: Inappropriate ioctl for device  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Done buffering, setting pipeline to PLAYING …  
Buffering, setting pipeline to PAUSED …  
Redistribute latency…  
Done buffering, setting pipeline to PLAYING …  
New clock: GstSystemClock  
3:39:59.2 / 99:99:99.

but the same link im using with the pipeline and then it is not working, just produce the results for a single frame only.

im very upset with this, as it is taking so much long and it should not be very exhausting to just change the source here, so kindly help me how to deal with it as quick as possible here.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 11:09am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/32 "2025-03-06T11:09:20Z")

</div>

> [@fanzh](#):
>
> if yes in the step1, Based on the original code, link pgie to display\_sink. can the app run well?

yes i have tried this and it is working fine with the rtmp streams, detecting face perfectly using pgie.

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/0/d/0/0d0b2c25c683cabc5f47dffcc4417bba97662505.jpeg)

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 6, 2025, 11:11am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/33 "2025-03-06T11:11:22Z")

</div>

@fanzh now this works but i need it to work in my existing pipeline which is the main work here, so kindly help me to set the rtmp in my main pipeline.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 7, 2025, 4:13am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/34 "2025-03-07T04:13:09Z")

</div>

hi @fanzh hope you are doing great. waiting for your response now.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 7, 2025, 8:40am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/35 "2025-03-07T08:40:50Z")

</div>

> [@sahil.ranmbail](#):
>
> yes i have tried this and it is working fine with the rtmp streams, detecting face perfectly using pgie.

it seems pgie works file. then you can add other plugins step by steps. for exmaple, can “pgie+tracker+sgie1+ nvosd + nveglglessink” work well?

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 7, 2025, 8:52am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/36 "2025-03-07T08:52:49Z")

</div>

i have solved the issue with removing the file sink branch, now the stream is working properly without saving the output video file, where as it was working with the rtsp streams.

the other issue here is that, how we can handle audio here, because i want the audio to processed as well and further the audio should be coming with rtsp out server as well, can you guide on this here?  
Thanks in advance.

@fanzh waiting for your guidance.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 7, 2025, 9:04am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/37 "2025-03-07T09:04:09Z")

</div>

could you share the detailed scenario and desired media pipeline? what is the auido used to do? do you want to do inference on audio? do you want to do inference on audio and video at the same time?  
please refer to audio inference sample \opt\nvidia\deepstream\deepstream\sources\apps\sample\_apps\deepstream-audio.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 7, 2025, 9:04am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/38 "2025-03-07T09:04:54Z")

</div>

seems the original issue is fixed. could you open a new topic for the new issue? Thanks!

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 7, 2025, 9:10am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/39 "2025-03-07T09:10:58Z")

</div>

no no, im working to get rtmp stream from livekit and will do inference on video calls of the persons in the video call, so there is no need to inference on audio or anything like that, i just want the audio to be same as it is in the video and should not be ignored, as for now the audio is just being skipped, i just want the audio to be there so when after inferencing i got the rtsp out stream, i should be able to see the results of output video with the audio as well, so it should make sense of the video calls.

so there is nothing with the audio inference, just wanted to be there as usual as it is.

@fanzh hope you got my point now

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [March 7, 2025, 9:17am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/40 "2025-03-07T09:17:26Z")

</div>

Currently, uridecodebin is used to receive, parse and decode video. if there are audio and video in the source. you may use rtmpsrc to receive source, and use to split video and audio. flvdemux usage would be out of DeepStream. please check the [doc](https://gstreamer.freedesktop.org/documentation/flv/flvdemux.html) and Gstreamer code.

---

<div class="post-metadata">

**Author:** ![sahil.ranmbail](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sahil.ranmbail](https://forums.developer.nvidia.com/u/sahil.ranmbail)\
**Post date:** [March 7, 2025, 9:23am UTC](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456/41 "2025-03-07T09:23:27Z")

</div>

ok thank you very much for the guidance.

[Previous page](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456.md?page=1)

[Next page](https://forums.developer.nvidia.com/t/rtsp-streams-working-in-deepstream-rtmp-streams-giving-error-streaming-stopped-reason-not-linked-1/324456.md?page=3)
