-
Notifications
You must be signed in to change notification settings - Fork 337
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal data stream error when streaming from RTSP source. #193
Comments
Update: I tried a public RTSP url and it does not work either. rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov |
Came here looking for a solution for the same issue |
Hi, can you add
Then send us the log? |
Please find the attached logs with debug level 4. |
instead of |
No difference if I changed However, if I remove the entire |
can you try this pipeline?
|
Adding |
After some more testing, I found one more issue. After about 4 minutes viewing the live camera I get an error
|
Please find the attached logs with |
@msjoshi looking at the logs I see the following:
Closer to the end the following error is returned from the backend. I am still not sure yet why the media pipeline issues a frame timecode that's less. There is very little in the GST logs. Needs more investigation. |
The issue is that the frame rate is not stable, can you try adding frame rate setting in the capsfilter like this
Also, check your camera settings to make sure there is nothing making the frame rate unstable. |
Adding the frame rate in caps filter did not work. It fails instantly. See the logs below.
|
Looks more like a network issue |
The below works without frame rate caps filter. Randomly, I get the
|
@msjoshi as @chehefen mentioned, the original issue stems from the fact that your media pipeline is very "bursty" - it can produce hundreds of frames in a second and the frame timestamps are very close to each other. In this case, they fall within a millisecond which is the default timecode scale the SDK uses for MKV packaging which later causes the issue on the backend. I will let @chehefen comment if he can think of why the capsfilter didn't work or some sort of frame rate limiter. There are other remedies, you could potentially decrease the millisecond timecode scale to 100micros but that might have other consequences like limiting the fragment duration (MKV specification uses 16bit signed value to represent the relative timecodes of the frames). |
The following command worked.
However, it did not stabilize the frame rate. Below are the sample metrics.
It varies a lot but always in hundreds. |
Can you try this pipeline:
and let us know what fps you observe? |
With the above command, I'm observing an average of 24 frames/sec. I have attached the entire log of few seconds of video. |
@unicornss I see a My latest log shows the result when using |
Hi @msjoshi Sorry for the incorrect label; removed it now. From previous log:
|
Hi @msjoshi , If you dont mind, can you add Thanks |
I emailed the mkv file as requested. |
I sent the mkv file as requested couple weeks ago. Any update? |
can you try this pipeline?
Try to play with rtpjitterbuffer's mode. it can be either none, slave, buffer or synced. |
@msjoshi any update on this issue? |
@Raghava248 it seems like the issue you are referring to is not related to the issues highlighted in this topic. Do you mind posting this to a new issue? From the error it seems that you are missing h264parse element. Can you describe whether you are using install script and if it succeeds building all the open source dependencies including GStreamer plugins? |
This issue is un-related to the issue you are seeing. Please open a separate issue. By mixing multiple issues we lose track of the original issue. |
I tried different modes in I'm trying to understand why there is such a large difference between KVS metrics for frame rate and I must also mention that ever since I set the protocol in
Notice I'm ready to close this ticket as it has fixed one problem but I do have a latency issue with specific RTSP source. I'll open a new issue so it can be focussed on latency problem. |
@msjoshi while I am not an expert in the rtsp gstreamer plugins, I believe the reason for the observed frame rate is due to "burstiness" of the media pipeline. The KVS core calculates the metrics by adding some "inertia" by deploying EMA (Exponential Mean Averaging) which works really well for steady real-time encoder outputs but is thrown off by bursty sources. I believe that fpsdisplaysink smoothes out the source burstiness and this is the reason why you can see the metrics reflecting the observed FPS. |
Resolving this issue for now. Please create a new one as this thread got too long |
Note I was having the same issue as described here until I made this change: awslabs/amazon-kinesis-video-streams-producer-sdk-cpp#193
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment awslabs#193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment awslabs#193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment awslabs#193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment awslabs#193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment #193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment #193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang.
* Minor syntax fix .. is required for fetching files from parent dir ... without .. it throws error * Fix typo in readme * add free missing (#746) Co-authored-by: David D <david.desbiens@tentaq.com> * Update readme (#744) * Fix typo in readme * Update Readme Debug section: add solution to cmake error "could not find JNI" Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add instruction to set offline mode (#741) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Update README and travis.yml to acknowledge develop (#739) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Gstreamer RTSP Docs Update (#712) Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment #193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang. * free missing property (#767) Co-authored-by: David D <david.desbiens@tentaq.com> * Update gstkvssink.cpp * Added millisecond support to kvs_gstreamer_file_upload_sample + gstkvssink --------- Co-authored-by: Ketul shah <ketulshah1993@gmail.com> Co-authored-by: waikup83 <waikup@hotmail.com> Co-authored-by: David D <david.desbiens@tentaq.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: jdelapla <delaplan@amazon.com> Co-authored-by: Anton Vattay <3martini@gmail.com> Co-authored-by: bkneff <bkneff@amazon.com>
* Minor syntax fix .. is required for fetching files from parent dir ... without .. it throws error * Fix typo in readme * add free missing (#746) Co-authored-by: David D <david.desbiens@tentaq.com> * Update readme (#744) * Fix typo in readme * Update Readme Debug section: add solution to cmake error "could not find JNI" Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add instruction to set offline mode (#741) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Update README and travis.yml to acknowledge develop (#739) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Gstreamer RTSP Docs Update (#712) Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment #193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang. * free missing property (#767) Co-authored-by: David D <david.desbiens@tentaq.com> * Update gstkvssink.cpp * Added millisecond support to kvs_gstreamer_file_upload_sample + gstkvssink --------- Co-authored-by: Ketul shah <ketulshah1993@gmail.com> Co-authored-by: waikup83 <waikup@hotmail.com> Co-authored-by: David D <david.desbiens@tentaq.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: jdelapla <delaplan@amazon.com> Co-authored-by: Anton Vattay <3martini@gmail.com> Co-authored-by: bkneff <bkneff@amazon.com>
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I'm using the producer library in a Docker container to stream from RTSP source. The RTSP source is Amcrest cameras (model # AMNV20M8-4B-B).
I'm using the following startup script to trigger the stream.
There are 2 issues. It tries to receive UDP packets for 5 seconds and then switches to TCP. On my Mac, I have switched off firewall to ensure that's not a problem.
After it switches to TCP it gives warnings about could not transform video/x-h264 and eventually fails with internal data stream error.
Below are the logs after the pipeline starts playing.
The text was updated successfully, but these errors were encountered: