Accessing original filenames in a HLS stream

Andoni Morales ylatuya at gmail.com
Tue Jun 17 02:37:55 PDT 2014


2014-06-16 13:22 GMT+02:00 Lajos Okos <lajos.okos at gmail.com>:

> Dear Community,
>
>
>
> I have a very simple gstreamer 1.2.3 pipeline with souphttpsrc ! hlsdemux
> ! multifilesink to record a live HLS stream to disk. My goal would be to
> save the TS fragments with their original filenames, as they appear in the
> playlist.m3u8 file. Unfortunately I didn’t find a way to do that. I see
> from the logs, that for each fragment download there is a new souphttpsrc
> element created, but I cannot connect any handlers to the bus of the
> pipeline to capture these events. Not even the state changes of these
> souphttpsrc elements are published on the bus. There seem to be a kind of a
> private bus maintained in gsturidownloader.c  in parallel with the
> pipeline’s main bus that handles these messages.
>
>
>
> Is there a way to extract the original TS filenames from hlsdemux before
> buffers are passed to multifilesink and written to disk?
>
>
>
> Thanks for any advices!
>
>
>

Using hlsdemux for caching HLS streams is probably not a good idea. The
demuxer can decide to change the active based on network condition so you
won't be able to capture the original source and it's also hard to find the
boundaries of each fragment and even harder to find the source filename.

For caching HLS the simplest solution is to parse the m3u8 playlists and
download the files, which is trivial even for live sources.

Cheers,
Andoni




>  Best Regards,
>
> Lajos
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140617/8f3d44ca/attachment.html>


More information about the gstreamer-devel mailing list