Thread: [Fremantle Maemo5] HLS playback
View Single Post
Posts: 23 | Thanked: 69 times | Joined on Nov 2014
#3
Okay, some update on this.
Now I can play a live HLS stream with gstreamer/playbin2 (using hlsdemux).
I had to backport (mostly copy) a few things from more recent versions of gstreamer-plugins* to have it work :
- add hlsdemux in gst-plugins-bad
- add hls typefinds in gst-plugins-base
- add the QUERY_URI command to httpsoupsrc in gst-plugins-good

I also had to change gstmpegtsdemux rank to NONE and gstffmpeg rank to MARGINAL (as explained in my first post).
hlsdemux needed a tiny bit of adaptation to make it cooperate nicely with decodebin2 (gstreamer automagic decoding bin).

You can try it with the packages attached below. To install it, keep trace of the already installed gstreamer-* packages using
Code:
dpkg -l |grep gstreamer
and just "dpkg -i" the downloaded packages.
To revert back, "apt-get install --reinstall reinstall" (edit: for some unknown reason that does not seem to work ...) the packages (or remove for the packages that were not there in the first place).

To play a stream :
Code:
gst-launch playbin2 uri=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8
Note that gst-launch doesnt handle input focus properly with matchbox (Maemo window manager) so if you want to use it fullscreen you'll have to play with wmctrl :
Code:
wmctrl -b toggle,fullscreen -r gst-launch
For some reason dspvdec (the DSP video decoder in gstdsp) fails when changing variants inside a stream (from a low res to a higher res) with the following message :
Code:
handle_hdcodec_error: unsupported stream or invalid i/p params
So we won't be able to play variants (master) playlists for now, and you'll have to manually select the right version of your stream. Considering you won't be able to play the HD (or high profile) version of most streams you'd probably need to do this anyway.
I tested it with the HD codecs installed, so please tell me if result differs with stock codecs.

I could not get (Open)MediaPlayer to pass the HLS .m3u8 URI directly to gstreamer without parsing it as a playlist first, so HLS playback does not work with (Open)MediaPlayer for now.
I don't know whether the problem lies in (Open)MediaPlayer or MAFW yet.

Playback is much more stable than when using VLC to remux it (especially over wireless or when playing too complex h264 streams).

TODO :
- fix the MP/OMP/MAFW(?) issue
- fix dspvdec (erm ...) and/or find a proper way to select a specific stream variant. This could be using a special HLS application, or via a MAFW/OMP plugin (since we cannot fix MediaPlayer, I'd rather write a MAFW plugin, if possible).

Edit : I forgot to attach the packages
gstreamer-ffmpeg is too big to be attached with this message, so here it is :
http://muarf.org/~bencoh/maemo/gstre...emo3_armel.deb
For some reason I could not use "apt-get install --reinstall" to reinstall the original packages back, I get
"Reinstallation of gstreamer0.10-plugins-bad is not possible, it cannot be downloaded"
(same for the other packages, except for gstreamer-ffmpeg which comes from extras). I dont know if I have some issue with my apt settings, or if this is an issue with how nokia repositories are handled, but I have a mirror copy of downloads.maemo.nokia.com from which I downloaded it back, so I know it's supposed to be there.

Last edited by bencoh; 2015-01-03 at 23:54.
 

The Following User Says Thank You to bencoh For This Useful Post: