After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705355 - RTSP pipeline freezes when set to a resume after a pause (PLAYING->PAUSED->PLAYING), with Jitterbuffer in Buffering Mode
RTSP pipeline freezes when set to a resume after a pause (PLAYING->PAUSED->PL...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.1.3
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-02 14:30 UTC by vfugro
Modified: 2018-11-03 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test application for RTSP (4.54 KB, text/x-c)
2013-08-22 12:09 UTC, vfugro
Details

Description vfugro 2013-08-02 14:30:58 UTC
The RTP timestamp gap induced (nearly equal to the time the server/source has spent in PAUSED state), currently makes the jitter-buffer completely reset itself. This leads to freezing of the pipeline, due to the RTP-TS difference (equal to the time spent in PAUSED state) between the first RTP packet received after the the source/server has been set to PLAYING and the packet that was last received during the PAUSED state. This leads to a huge gap (TS discontinuity) between the first outgoing buffer from the jitter-buffer post-PAUSED (PLAYING before PAUSED) state and the last buffer that was sent pre-PAUSED (PLAYING after PAUSED) state. This leads to a long halt at the sink depending upon the time spent in PAUSED state . i.e long freeze of the pipeline.
Comment 1 Sebastian Dröge (slomo) 2013-08-20 14:22:22 UTC
Can you provide a testcase for this?
Comment 2 vfugro 2013-08-21 15:59:27 UTC
I tested this with a local darwin server.

The server puts a gap in the RTP timestamps when resumed from PAUSED state, nearly equal to the time spent in PAUSED state.

This makes jitterbuffer treat this as RTP jump and reset the skew by calling the function rtp_jitter_buffer_reset_skew(), leading to the output frames' PTS start
from zero all over again, and getting dropped by the sink. 
Maybe sending a new segment event here might help 
(since the base_time and friends are set to -1). Haven't tried that.

Instead, if I use rtp_jitter_buffer_resync(), this issue is resolved. But then, we need to know if the RTP jump is because the server was paused by the client or a genuine one. 
The server does send a RTCP packet with newer RTP/NTP values, after it is resumed.
But I guess the RTP timestamp, currently observed in the SR from last RTCP packet is not used when inserting the new incoming RTP packet is put in the queue, plus
we also need to make sure that the first RTCP packet must be processed before the first RTP packet after a resume.
Comment 3 vfugro 2013-08-22 10:47:47 UTC
This issue is not observed for mobile youtube RTSP links, because it doesn't insert any RTP TS gaps when resumed after PAUSE.

Do let me know if you need anything else from my side.
Comment 4 Sebastian Dröge (slomo) 2013-08-22 10:59:59 UTC
Anything to be able to reproduce this problem would be useful :)
Comment 5 vfugro 2013-08-22 12:09:00 UTC
Created attachment 252723 [details]
test application for RTSP

The app mandates the RTSP URL to have both audio  and video.
Comment 6 vfugro 2013-08-22 12:11:41 UTC
Comment on attachment 252723 [details]
test application for RTSP

The app is  very minimal (no error/return val handling

To run:
./test <rtsp url>

Once up:
'p' followed by 'enter' key  to pause
'r' followed by 'enter' key  to resume
Comment 7 Sebastian Dröge (slomo) 2013-08-22 13:04:34 UTC
The problem is more to find a stream that allows to reproduce this :)
Comment 8 vfugro 2013-08-22 14:25:30 UTC
Well, I don't think it is stream specific as such(I could be wrong though)
It will depend on the server like the darwin server I am using. Unfortunately, it is local setup here. :(.
Comment 9 vfugro 2013-08-23 09:39:25 UTC
Going through the code accordingly (as mentioned in comment 2), should suffice right? I mean, it would be easy imagine such a situation. OR will need a darwin setup at your end too.
Comment 10 Tobias Mueller 2014-01-09 14:11:24 UTC
Given that there are no public sources to reproduce this bug, is it still considered a problem that needs to be fixed? If so, I'd set to NEW. Otherwise, WONTFIX or NOTABUG seems appropriate.
Comment 11 jihae 2015-07-21 13:25:12 UTC
hello.
it's same as current problem which I'm facing with.
I'm using gstreamer v1.5.2 relase.



[The reproduce step]

1)copy a mp4 file into 'gst-rtsp-server-1.5.2/examples/'.
2)run gst-rtsp-server-1.5.2/examples$ ./test-mp4 ./rtsp_video.mp4
 stream ready at rtsp://127.0.0.1:8554/test
3)I used the uri "rtsp://127.0.0.1:8554/test" as rtsp streaming uri.
4)modify gst/rtsp/gstrtspsrc. make 'buffer-mode' set to "BUFFER_MODE_BUFFER(buffering mode)", build& install.
5)gst-launch-1.0 playbin uri="rtsp://127.0.0.1:8554/test" video-sink="navseek ! xvimagesink"


I filed a bug also as below.
https://bugzilla.gnome.org/show_bug.cgi?id=752531
Comment 12 jihae 2015-07-21 13:32:07 UTC
oops, not same. silmilar with https://bugzilla.gnome.org/show_bug.cgi?id=752531
Comment 13 Vivia Nikolaidou 2018-05-06 11:02:39 UTC
Is this still an issue with latest GStreamer release?
Comment 14 GStreamer system administrator 2018-11-03 14:49:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/88.