Android HLS Streaming & Encoding, Getting Android & iOS video together

Here is a ‘how to’ overview of some best practices for HLS streaming transcoding to Android and iOS without needing to do it twice.

Keep in mind that there are a lot more transcoding / encoding toggles that you can screw it up with, so take it easy with ffmpeg or any other decent encoding software.

Below these recommendations are some know issues with HLS and Android versions. It’s generic, feel free to adjust the bitrates. The size / screen res is right. 

Stream #1

bitrate: 200k

size: 416×234

profile: baseline

Stream #2

bitrate: 400k

size: 480×270

profile: baseline

Stream #3


size: 640×360

profile: baseline

Stream #4

bitrate: 1500k

size: 640×360

profile: baseline

Stream #5

bitrate: 2600k

size: 960×540

profile: main

Stream #6

bitrate: 4000k

size: 1280×720

profile: main

Stream #7

bitrate: 6000k

size: 1280×720

profile: main

Some Tips:

1. If you want your app in iTunes, you’ll also need to add an audio only AAC stream at 64kbps

2. The easiest way to support Android HLS streaming or other non-iOS platforms is to offer a fallback RTSP stream. The main advantage to using an RTSP is that there is no need for Flash or any special client configuration. For example, if you use the JW Player for video playback, setting the player’s fallback to false will cause an RTSP stream to be loaded instead of an HLS M3U8 stream. This technique works great with the Wowza Media Server and is compatible with Android 2.3, 4.0 and 4.2 via the OS’ native player.

Known Issues with HLS to Android:

Android 4.0 (Ice Cream Sandwich)

  • VOD streams do not seek
  • Aspect ratios are not detected and cause image deformation
  • Fullscreen causes videos to restart from the beginning

Android 4.1+ (Jelly Bean)

  • Aspect ratio issue is fixed, but seek is still unavailable
  • Chrome does not understand HLS leading to broken mimetype detection
  • Taking video fullscreen causes devices to throw an error and stop.

Android 4.4+ (Kit Kat)

  • 4.4 updates the platform’s HTTP Live Streaming (HLS) support to a superset of version 7 of the HLS specification*


4 karma points