[FFmpeg-user] Playback issues with HLS on Android

Andrew Sinclair ajsinclair at gmail.com
Mon May 13 11:02:53 CEST 2013


Hi All,

Sorry to pipe in late but after spending a lot of time recently on Android
I can tell you there is no simple answer for HLS to work consistently
across all devices. The underlying issue is that every hardware variation
has a different video decoder chip and by nature this means that they all
have slightly different video players compiled which are then called via
JNI from the Android application layer.

Now while many of these players are deriviatives of ffmpeg/ffplay they are
often from way old versions.

Best bet is to only go with a single bitrate if you want it to work
reasonably well as multi bitrate will vary massively from device to device.
If you really want good Android support you need to go with a custom media
player and you can launch these via a webpage using an intent or just embed
them in an app.

For maximum compatibility I have also found that some Android devices don't
like a lot of variation between what they get in the playlists and what
they see in the segments so you should force keyframes so that the segment
doesn't have chop on where the next I frame comes. I have been using a
wrapper around ffmpeg to generate the keyframe string
https://gist.github.com/sinkers/5567058  though should time permit I would
like to get this into the ffmpeg codebase.

However if anyone was to map which variations of HLS work and don't work on
the many many devices it would be quite useful!

Regards,
Andrew


On 13 May 2013 15:14, Fing Cmo <fingcmo at gmail.com> wrote:

> Walter,
>
> Just to correct and add to the test list.
> I tested your HLS test page on the following devices on their Chrome
> browsers.
> Latest official OS/Firmware versions as of today.
>
> Galaxy Note 2 -------------------- 1st AND 4th video play (No Flash).
> Google Nexus 4 (Phone) ----- 1st AND 4th video play (No Flash).
> Google Nexus 7 (Tablet) ----- 1st AND 4th video play (No Flash).
> iPhone 4 --------------------------- All 4 HTML5 videos play (No Flash).
> iPhone 5 --------------------------- All 4 HTML5 videos play (No Flash).
> Google TV (Vizio VAP430) - ALL 5 videos play including the flash one.
>
> Note that for Google TV, it plays in spite of your disclaimer:
>
> "*Note:* AddType application/vnd.apple.mpegurl m3u8 #Does not work on
> Android
>
> So apparently it works on that Android :)
>
> Thanks,
> FC.
> ...........................
>
>
> On Sat, May 11, 2013 at 12:14 AM, Walter Ebert <lists at walterebert.com
> >wrote:
>
> > > If you don't mind, can you provide the ffmpeg commands you used to
> > > generate the video segments?
> >
> > The commands are on Bitbucket:
> > https://bitbucket.org/walterebert/ffmpeg-hls/src
> >
> > > Do the exact segments play on iDevices as well?
> > > I guess I can test those later on iPhone :)
> >
> > The segments play on iOS devices. Although there is a problem on older
> > devices with a resolution of 480x360 pixels (and iOS 4.2):
> > - The first video can be started, but actually does not play because it
> > contains higher resolution streams.
> > - The 2nd and 3rd video cannot be started.
> > - The 4th video with the 480x270.m3u8 stream play just fine.
> >
> > I would have expected that the device would automatically select the
> > highest resolution it can play.
> >
> > On iPad the videos play without any problems. iPad 1 cannot play full HD
> > (1920x1080) or higher. That is why the highest resolution on test page
> > is 1280x720 pixels.
> >
> > >> I looked at your test page and found that your 3rd example has a typo
> in
> > >> the mime type: appplication/vnd.apple.mpegURL
> > >>
> > >> It should be application/vnd.apple.mpegURL
> > >>
> > >> (Note your mistaken triple "p")
> >
> > Thanks Timothy for catching that. I corrected the MIME type.
> >
> > Cheers,
> > Walter
> >
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list