Http Live Streaming

How to have smooth playback experience in playlists?

Let me explain the best practices for that. I hope it helps.

Improve WebRTC Playback Experience

ATTENTION: It does not make sense to play the stream with WebRTC because it’s already recorded file and there is no ultra low latency requirement. It make sense to play the stream with HLS. Just keep in mind that WebRTC playback uses more processing resources than the HLS. Even if you would like to decrease the amount of time to switch streams, please read the followings.

  1. Open the embedded player(/usr/local/antmedia/webapps/{YOUR_APP}/play.html)
    Find the genericCallback method and decrease the timeout value from 3000 to 1000 or even lower at the end of the genericCallback method. It’s exactly this line
  2. Decrease the key frame interval of the video. You can set to 1 seconds. Generally recommend value is 2 seconds. WebRTC needs key frame to start the play. If the key frame interval is 10 seconds(default in ffmpeg), player may wait up to 10 seconds to play.

Improve HLS Playback Experience

  1. Open the properties file of the application -> /usr/local/antmedia/webapps/{YOUR_APP}/WEB-INF/red5-web.properties
  2. Add the following property
    settings.hlsflags=delete_segments+append_list+omit_endlist
    Let me explain what it means.
    • delete_segments just deletes the segment files that is out of the list so that your disk will not get full.
    • append_list just adds the
      new segment files to the older m3u8 file so that player thinks that it’s just playing the same stream.
    • omit_endlist disables writing the
      EXT-X-ENDLIST to the end of the file so player thinks that new segments are in their way and it wait for them. It does not run
      stopping the stream.
  3. Disable deleting hls files on ended to not encounter any race condition. Continue editing the file /usr/local/antmedia/webapps/{YOUR_APP}/WEB-INF/red5-web.properties and replace the following line
    settings.deleteHLSFilesOnEnded=true with this one
    settings.deleteHLSFilesOnEnded=false
  4. Restart the Ant Media Server
    sudo service antmedia restart

antmedia.io

Where do I get mediastreamsegmenter for http live streaming?

My developer subscription had lapsed. Once renewed I could see the tool.

Is Youtube using HTTP Live Streaming?

Actually we never know what kind of streaming YouTube is using. But Apple will not reject if you are showing an YouTube video in your Application.

We can show YouTube videos using iFrame in UIWebView. It seems lot of application doing the same.









Reference : http://www.w3schools.com/html/html_youtube.asp

On Vimeo, does it make sense to use HTTP Live Streaming video file link if your video isn't live streaming?

It's a bit of a misnomer - HTTP Live Streaming (HLS) is just the name of the protocol and is not necessarily used for streaming of live content.

HLS is simply a method used for serving the best quality video file (pre-recorded/pre-saved) for the given viewing environment.

Apple's HLS documentation is found here: https://developer.apple.com/streaming/

incremental http live streaming

You could re-encode the required segments fairly easily -- there's no need to have the entire stream encoded before playing it (otherwise live events would be impossible). You have to be careful with the timestamps in the TS packets if you want it to be truly seamless. But what might be easiest is to use EXT-X-DISCONTINUITY markers around the re-created portions.

As for audio, there's no need to re-encode it. You should be able to just copy the encoded audio from one TS container to another. For example, if you're using ffmpeg, you would use -acodec copy to take it from the original ts.



Related Topics



Leave a reply



Submit