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 771754 - Got EOS from element "playbin0" ( for slow network connections )
Got EOS from element "playbin0" ( for slow network connections )
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.8.3
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-21 08:46 UTC by gnome.vrb
Modified: 2018-01-12 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
export GST_DEBUG=2,soup*:9 (288.38 KB, text/plain)
2016-09-21 15:21 UTC, gnome.vrb
Details
Wireshark streaming conversation of mplayer / gst-launch / vlc (69.95 KB, image/png)
2016-09-22 03:11 UTC, gnome.vrb
Details

Description gnome.vrb 2016-09-21 08:46:51 UTC
Steps to reproduce:

1. Reduce link speed as below:

root@unstable:~# wondershaper eth0 100 512

2. Run gst-launch on internet radio url:

dev@unstable:~/Music$ gst-launch-1.0  playbin buffer-duration=20000000000 uri=http://s4.streammonster.com:8888/stream 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Prerolled, waiting for buffering to finish...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstPulseSinkClock
Buffering, setting pipeline to PAUSED ...
Done buffering, setting pipeline to PLAYING ...
Got EOS from element "playbin0".
Execution ended after 0:01:23.338472890
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Here, the radio station was playing for a while, and gst-launch-1.0 exited with "Got EOS from element playbin0", as above.
Comment 1 Sebastian Dröge (slomo) 2016-09-21 14:10:47 UTC
Please get a debug log with GST_DEBUG=2,soup*:9 and attach it here, thanks!
Comment 2 gnome.vrb 2016-09-21 15:21:27 UTC
Created attachment 336007 [details]
export GST_DEBUG=2,soup*:9
Comment 3 Sebastian Dröge (slomo) 2016-09-21 15:31:12 UTC
This looks like the server just closed the connection at some point. Not much we can do about that, and because of how HTTP works we also can't distinguish this reliable from the server closing the connection because the stream is actually finished.
Comment 4 gnome.vrb 2016-09-21 15:50:19 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> This looks like the server just closed the connection at some point. Not
> much we can do about that, and because of how HTTP works we also can't
> distinguish this reliable from the server closing the connection because the
> stream is actually finished.

Ok. 

Is there any way to make the server not close the connection, unless we tell it to do so ( or a reasonable amount of idle time has passed ( say, 1 minute ) ?
Comment 5 Sebastian Dröge (slomo) 2016-09-21 15:51:56 UTC
That's for the server to decide, if you can configure the server yourself then you can adjust this.
Comment 6 gnome.vrb 2016-09-21 16:27:39 UTC
(In reply to Sebastian Dröge (slomo) from comment #5)
> That's for the server to decide, if you can configure the server yourself
> then you can adjust this.

Ok.

Is there a way ( streaming gobject property ) to tell gstreamer to keep playing as long as possible, if possible. Meaning: if the http server closes the connection, open a new connection and keep streaming. This property can be off by default.
Comment 7 gnome.vrb 2016-09-22 03:11:21 UTC
Created attachment 336043 [details]
Wireshark streaming conversation of mplayer / gst-launch / vlc

I just did a quick experiment ( not sure if it helps ).

The attachment shows TCP conversations happening on port 8888 ( radio station ), for the following 5 commands:

M1: mplayer http://s4.streammonster.com:8888/stream
M2: mplayer http://s4.streammonster.com:8888/stream ( same as M1 )

G1: gst-launch-1.0 playbin uri=http://s4.streammonster.com:8888/stream
G2: gst-launch-1.0 playbin uri=http://s4.streammonster.com:8888/stream ( same as G1 )

V1: vlc http://s4.streammonster.com:8888/stream

TCP conversations in attachment:

Line 1 -> M1 ( mplayer exits )
Line 2 -> M2 ( mplayer exits )

Line 3 -> G1 ( gst-launch exits )
Line 4 -> G2 ( gst-launch exits )

Line 5,6,7,8 -> V1 ( vlc keeps playing )

Here, vlc seems to keep playing without exiting. The number of conversations for vlc is 4, since I closed vlc after a few minutes of playing.
Comment 8 gnome.vrb 2016-09-22 03:14:37 UTC
Wireshark tcpdump is 8M. So, I'll just paste the vlc conversation here. Will split and attach the capture, if required.

VLC - TCP stream 1:
-------------------

GET /stream HTTP/1.1
GET /stream HTTP/1.1
Host: s4.streammonster.com:8888
User-Agent: VLC/2.2.4 LibVLC/2.2.4
Range: bytes=0-
Connection: close
Icy-MetaData: 1

HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: audio/mpeg
icy-br:128
ice-audio-info: bitrate=128
icy-description:Global Swing Broadcast and all that Jazz...
icy-genre:Swing
icy-name:Global Swing Broadcast
icy-pub:0
icy-url:http://www.gsb.fm
Server: Icecast 2.4.0-kh2
Cache-Control: no-cache, no-store
Pragma: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
Access-Control-Allow-Methods: GET, OPTIONS, HEAD
Connection: Close
Expires: Mon, 26 Jul 1997 05:00:00 GMT
icy-metaint:16000

VLC - TCP stream 2:
-------------------

GET /stream HTTP/1.1
GET /stream HTTP/1.1
Host: s4.streammonster.com:8888
User-Agent: VLC/2.2.4 LibVLC/2.2.4
Range: bytes=1263626-
Connection: close
Icy-MetaData: 1

HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: audio/mpeg
icy-br:128
ice-audio-info: bitrate=128
icy-description:Global Swing Broadcast and all that Jazz...
icy-genre:Swing
icy-name:Global Swing Broadcast
icy-pub:0
icy-url:http://www.gsb.fm
Server: Icecast 2.4.0-kh2
Cache-Control: no-cache, no-store
Pragma: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
Access-Control-Allow-Methods: GET, OPTIONS, HEAD
Connection: Close
Expires: Mon, 26 Jul 1997 05:00:00 GMT
icy-metaint:16000

VLC - TCP stream 3:
-------------------

GET /stream HTTP/1.1
GET /stream HTTP/1.1
Host: s4.streammonster.com:8888
User-Agent: VLC/2.2.4 LibVLC/2.2.4
Range: bytes=2166850-
Connection: close
Icy-MetaData: 1

HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: audio/mpeg
icy-br:128
ice-audio-info: bitrate=128
icy-description:Global Swing Broadcast and all that Jazz...
icy-genre:Swing
icy-name:Global Swing Broadcast
icy-pub:0
icy-url:http://www.gsb.fm
Server: Icecast 2.4.0-kh2
Cache-Control: no-cache, no-store
Pragma: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
Access-Control-Allow-Methods: GET, OPTIONS, HEAD
Connection: Close
Expires: Mon, 26 Jul 1997 05:00:00 GMT
icy-metaint:16000

VLC - TCP stream 4:
-------------------

GET /stream HTTP/1.1
GET /stream HTTP/1.1
Host: s4.streammonster.com:8888
User-Agent: VLC/2.2.4 LibVLC/2.2.4
Range: bytes=3399811-
Connection: close
Icy-MetaData: 1

HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: audio/mpeg
icy-br:128
ice-audio-info: bitrate=128
icy-description:Global Swing Broadcast and all that Jazz...
icy-genre:Swing
icy-name:Global Swing Broadcast
icy-pub:0
icy-url:http://www.gsb.fm
Server: Icecast 2.4.0-kh2
Cache-Control: no-cache, no-store
Pragma: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
Access-Control-Allow-Methods: GET, OPTIONS, HEAD
Connection: Close
Expires: Mon, 26 Jul 1997 05:00:00 GMT
icy-metaint:16000
Comment 9 Sebastian Dröge (slomo) 2016-09-22 13:58:01 UTC
It would make sense for souphttpsrc to retry the connection (and seek to the previous position) when it gets disconnected, yes. This should however be implemented already, so question is why this doesn't trigger here.

Someone would have to debug this in more detail, together with the code of souphttpsrc.
Comment 10 Edward Hervey 2017-11-10 09:29:01 UTC
I think souphttpsrc now does that. Can you try with latest gstreamer ?
Comment 11 Tim-Philipp Müller 2018-01-12 12:14:12 UTC
Closing since it should be implemented nowadays. Please re-open if it's still a problem with recent versions of GStreamer, thanks!