HLS streaming on Android

16,053

Solution 1

Finally we have made our own player with use of the FFMPEG libraries and now we are integrating there also HW decoding with use of the stagefright (http://freepine.blogspot.cz/2010/01/overview-of-stagefrighter-player.html).

BR STeN

Solution 2

You may find the http://vov.io/vitamio/ libraries very useful. They allow you to use HLS feeds (I've tested and use the library in production apps).

One thing to note however, don't try testing on an Emulator device, as it will not work, you will need a real device for your testing.

Hope that helps.

Warm Regards,

Shabbir

-- EDIT --

Just editing this answer to let people know that the Vitamio url has changed - and also now you don't need to download a separate "helper app" from the PlayStore or the vov.io website - you can now just incorporate everything from the downloads/instructions they provide.

The new site is http://vitamio.org/

Solution 3

MPEG TS is there in the codebase since 2.3 ( Gingerbread ) but it is not advertised. Actually HLS is supported in the 2.3 release but you need a small fix to enable it. You need to prefix httplive to the streams and make a small fix in the code to accept it.

Vibgyor

Share:
16,053
STeN
Author by

STeN

Smartphones/SmartTVs/HbbTV and NFC technology is my experience and background as developer and application architect for more then 10 years. @PetrMazanec

Updated on June 15, 2022

Comments

  • STeN
    STeN about 2 years

    The HLS is supported on Android since version 3.0. Until the Honeycomb the H.264 and AAC was supported, but there was only RTSP streaming protocol. The HLS and MPEG-2 TS not (see here) were not supported.

    Porting the ffmpeg to the Android platform could be a solution for that (LGPL sources ara available). I am however looking for a ready made solution with SDK, customizable HLS player, etc. There is one here, but I would like to know if you do not know about other solutions.

    Thanks STEN

  • STeN
    STeN over 12 years
    Hi, did you use their solution 'as is' or you purchased the sources and integrate the library into application? How is he FFMPEG performance on low end devices? Can you share the HLS sterem parameters?
  • Jason
    Jason over 12 years
    Vibgyor -what is the small fix in in the code that you need to make?
  • shabbirh
    shabbirh about 12 years
    I used their solution as is - it's perfectly usable - however, I am considering the option where I purchase their sources so that I can have everything integrated into my app as a single .apk. I've tested it on an HTC Wildfire which from my understanding is a "low-end" device and performance is fine - the beauty of Vitamio is that they have multiple binary offerings depending on the target device - and this is installed and set-up the first time the user uses your app with the vitamin library. The parameters I don't have handy, but it's just use the HLS url - I'll try to dig out my code.
  • idlethread
    idlethread about 12 years
    Do you mean you need a fix in the Android code to get it to work? That is something we can't really do on all the devices out in the market. But if there were a way to include that code inside your app somehow, that would be very interesting indeed.