HTTP adaptive streaming

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

+6
source share
4 answers

I see them, but have not tested them. I would suggest that the amount of grief that they can cause at this early stage of HTTP Live Streaming will not be worth it. There are several resources available to use to try to solve problems 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: you may need to play with some X.264 settings to get the final product, and although it segments (a lot of work), it does not create a variant list. You can do it manually using notepad. it is not a big job.

If you want completely free, you have:

  • Coding: Handbrake, MeGui, whatever you want. Just follow Android encoding specifications. Use H264 and AAC. DO NOT use progressive download settings / presets. Use CBR not VBR and make sure the frame rate is constant, not variable. Choose a frame rate that can be easily used when multiplying, so you can ensure that the keyframe is in the segment.

  • Use Apples Free tools: mediafilesegment, variantplaylistcreator, etc. Mediafilesegmenter will ask you how big a segment you want. The default value is 10 seconds. In this case, you set the key frame of the decoder so that each segment starts with a key frame.

I will give two examples.

Example 1:

  • Segmentation Size: 10 seconds
  • Framerate: originally variable 29.97, 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 adaptation: every 2 seconds

Setting the keyframe 2 * 30 = 60 frames. Every fifth keyframe (5 * 60) leads a segment

Example 2:

  • Framerate: originally variable 23.97, encoding up to 24 fps constant
  • Segment size: 8 seconds
  • The key frame needed for the segment: 8 * 24 = 192
  • Recommended for adaptation 2 seconds = 2 * 24 = 48
  • Every fourth keyframe (4 * 48) leads a segment
+4
source

If you need an open source solution, you can do it with x264 and mp4box. The following command will be an example of how you can create one quality / presentation / presentation:

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 

The next step is that you multiplex the encoded content in mp4:

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

And then you create separate segments and a manifest:

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

Then you could create several other qualities and play them with one of the open source players like dash.js or a commercial player like Bitmovin player . You can also use commercial cloud services such as Bitmovin Cloud Encoding or zencoder for encoding .

+2
source
+1
source

Honestly, there is no easy solution to do all this at all, not to mention adaptive streaming. Definitely, there is no open source open source solution for encoding, segmenting, and delivering HTTP streaming (not to mention adaptive streaming with synchronized key frames).

0
source

Source: https://habr.com/ru/post/900892/


All Articles