http adaptive streaming
Asked Answered
C

4

6

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?

Comines answered 6/11, 2011 at 16:49 Comment(0)
T
4

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
Thumb answered 30/5, 2012 at 17:15 Comment(0)
X
2

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.

Xylophagous answered 19/12, 2016 at 12:25 Comment(0)
B
1

OSMF player: http://www.osmf.com/

Batchelor answered 6/8, 2012 at 1:9 Comment(0)
F
0

To be honest there is no simple solution to do all of that at all, not mentioning adaptive streaming. Definitely there is no all-in-one open source solution to do encoding, segmenting and delivering of HTTP streaming (not mentioning adaptive streaming with synchronized keyframes).

Frae answered 9/4, 2012 at 1:10 Comment(1)
And believe me, open source video apps are not worth the time, except X264 which can be used for some things, but very high expertise is required.Frae

© 2022 - 2024 — McMap. All rights reserved.