Problem with souphttpsrc

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with souphttpsrc

tobatrance
Hi. I want to include http streaming in my application. I'm using Gstreamer
1.8.3 and I'm running on ubuntu. The following pipeline is used:

souphttpsrc ! decodebin name=mux ! autovideosink mux. ! audioconvert !
alsasink

I want to stream from this source:
http://artelive-lh.akamaihd.net/i/artelive_de@393591/master.m3u8

It's working properly when using gst-play-1.0.

Nevertheless when using gst-launch-1.0 it plays for like 10 seconds and then
shuts down.

I embedded it into my application as well and it's working fine.

Actually I don't want to use the autovideosink but an appsink as I'm doing
some postprocessing with OpenGL and stuff before displaying the frames. Here
it's also quitting after about 10 seconds. I did some research and found out
that it's quitting when a new bitrate is negotiated. For the autovideosink
at this point the 'new-pad'-handler for decodebin is called which adds new
pads featuring the new bitrate which is not the case when using the appsink.
What seems as well strange, and is the case for both sinks, that in the caps
the framerate is specified with 0/1 which makes no sense at all.

Any recommendation what to do to get this working? Let me also know if you
need more information.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

Samuel Hurst
On 24/01/18 09:38, tobatrance wrote:
> souphttpsrc ! decodebin name=mux ! autovideosink mux. ! audioconvert !
> alsasink
>
> I want to stream from this source:
> http://artelive-lh.akamaihd.net/i/artelive_de@393591/master.m3u8

...

> Nevertheless when using gst-launch-1.0 it plays for like 10 seconds and then
> shuts down.

I can't access the resource linked (I'm guessing it's geolocked), but
given it's an m3u8 file and you mentioned streaming, I'm guessing it's a
HLS stream. Try adding hlsdemux between soup and your decodebin.


-Sam
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

tobatrance
Hey Sam,

thanks for your quick response. So I tried this pipeline now:

$ gst-launch-1.0 souphttpsrc is-live=true
location="http://artelive-lh.akamaihd.net/i/artelive_de@393591/master.m3u8"
! hlsdemux ! decodebin ! autovideosink

Difference was that gst-launch-1.0 shut itself down after about 10 secs but
didn't get stuck as without hlsdemux. Nevertheless it also shuts down after
10 secs. Here's the output that occurs when the pipeline is about to stop:

ERROR: from element /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0: Internal
data stream error.
Additional debug info:
gstadaptivedemux.c(2976): gst_adaptive_demux_stream_download_loop ():
/GstPipeline:pipeline0/GstHLSDemux:hlsdemux0:
stream stopped, reason not-linked
Execution ended after 0:00:09.635253408
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I will check how this works from within my app.

Any further recommendations?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

Tim Müller
In reply to this post by Samuel Hurst
On Wed, 2018-01-24 at 10:05 +0000, Samuel Hurst wrote:

> > Nevertheless when using gst-launch-1.0 it plays for like 10 seconds
> > and then shuts down.
>
> I can't access the resource linked (I'm guessing it's geolocked), but
> given it's an m3u8 file and you mentioned streaming, I'm guessing
> it's a HLS stream. Try adding hlsdemux between soup and your
> decodebin.

Don't think that will work. You need to use playbin or playbin3 to
properly handle the case where new pads appear on hlsdemux, e.g. when
it switches between bitrates.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

tobatrance
Thanks Tim,

this seems to work. Atleast in my test app. I'm creating a playbin element
and set it's videosink to an appsink. Will come back here if I encounter any
further issues.

Thanks!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: Problem with souphttpsrc

Maurer, Martin
In reply to this post by Samuel Hurst
http://artelive-lh.akamaihd.net/i/artelive_de@393591/master.m3u8

seems to have this content

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=296000,RESOLUTION=320x180,CODECS="avc1.66.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_5_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=296000,RESOLUTION=320x180,CODECS="avc1.66.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_5_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=578000,RESOLUTION=426x240,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_4_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=578000,RESOLUTION=426x240,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_4_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=928000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_3_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=928000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_3_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1628000,RESOLUTION=960x540,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_2_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1628000,RESOLUTION=960x540,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_2_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2960000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2960000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=96000,CODECS="mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_5_a-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=96000,CODECS="mp4a.40.2"
http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_5_a-b.m3u8?sd=10&rebase=on


-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Samuel Hurst
Gesendet: Mittwoch, 24. Januar 2018 11:06
An: [hidden email]
Betreff: Re: Problem with souphttpsrc

On 24/01/18 09:38, tobatrance wrote:
> souphttpsrc ! decodebin name=mux ! autovideosink mux. ! audioconvert !
> alsasink
>
> I want to stream from this source:
> http://artelive-lh.akamaihd.net/i/artelive_de@393591/master.m3u8

...

> Nevertheless when using gst-launch-1.0 it plays for like 10 seconds
> and then shuts down.

I can't access the resource linked (I'm guessing it's geolocked), but given it's an m3u8 file and you mentioned streaming, I'm guessing it's a HLS stream. Try adding hlsdemux between soup and your decodebin.


-Sam
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

tobatrance
In reply to this post by Tim Müller
I got one, so far, last question on this:

How can I determine if the bitrate of a pipeline changed?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with souphttpsrc

Michael MacIntosh
I could be wrong on this, but in my experience, the source element will
post a tag message on the pipeline bus.

Hope that helps!

Cheers,
Michael.


On 1/24/2018 5:19 AM, tobatrance wrote:

> I got one, so far, last question on this:
>
> How can I determine if the bitrate of a pipeline changed?
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel