Search code examples
libvlchttp-streaming

http adaptive streaming


Is there any open source streaming solution supports Http Adaptive Streaming? Based on my research VLC is not supporting adaptive streaming. I am not sure about Darwin Streaming Server. Any ideas?


Solution

  • 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