http adaptive streaming

I see them but haven't tested them. I would suggest that the amount of grief they would cause at this early stage of HTTP Live Streaming would not be worth it. There are few available resources for you to use to try to solve issues with it.

If you want to go cheap you can try:

$50: Apple Compressor. Encodes and segments all in one if you have a MAC

$25: Markelsoft HLS Segmenter: However you may need to play with some X.264 settings to get the final product and, while it segments (the big job) it does not create the variantplaylist. You can do this manually using notepad. it's not a big job.

If you want completely free you have:

  1. Encoding: Handbrake, MeGui, whatever you want. Just follow Android encoding specs. Use H264 and AAC. Do NOT use progressive download settings/presets. Use CBR not VBR and ensure your framerate is constant not variable. Select a framerate that can be used easily in a multiplication so you can ensure keyframe location in the segment.

  2. Use Apples Free tools: mediafilesegment, variantplaylistcreator, etc. Mediafilesegmenter will ask you how large a segment you want. Default is 10 seconds. With that you set the decoder keyframe to ensure each segment starts with a keyframe.

I'll give two examples.

Example 1:

  • Segmentation size: 10 seconds
  • Framerate: originally 29.97 variable, encode to 30 fps constant
  • Keyframe distance in frames: 30 x 10 seconds = 300 frames. You need a keyframe every 300 frames.
  • Recommended keyframes for adaptive: every 2 seconds

Keyframe setting 2 * 30 = 60 frames. Every 5th keyframe (5 * 60) leads a segment

Example 2:

  • Framerate: originally 23.97 variable, encode to 24 fps constant
  • Segment Size: 8 seconds
  • Keyframe required for segment: 8 * 24 = 192
  • Recommended for adaptive 2 seconds = 2 * 24 = 48
  • Every 4th keyframe (4 * 48) leads a segment

If you want an open source solution you could do this with x264 and mp4box. The following command would be an example how you can create one single quality/representation/rendition:

x264 --output intermediate_2400k.264 --fps 24 --preset slow --bitrate 2400 --vbv-maxrate 4800 --vbv-bufsize 9600 --min-keyint 48 --keyint 48 --scenecut 0 --no-scenecut --pass 1 --video-filter "resize:width=1280,height=720" inputvideo.mkv

Next step would be that you multiplex the encoded content into mp4:

MP4Box -add intermediate.264 -fps 24 output_2400k.mp4

And then you create the individual segments and the manifest:

MP4Box -dash 4000 -frag 4000 -rap -segment-name segment_ output_2400k.mp4

You could then create several other qualities and play them with one of the open source player like dash.js.