HLS(HTTP Live Streaming)学习和探讨

Introduction

HTTP Live Streaming lets you send audio and video over HTTP from an ordinary web server for playback on iOS-based devices—including iPhone, iPad, iPod touch, and Apple TV—and on desktop computers (Mac OS X). HTTP Live Streaming supports both live broadcasts and prerecorded content (video on demand). HTTP Live Streaming supports multiple alternate streams at different bit rates, and the client software can switch streams intelligently as network bandwidth changes. HTTP Live Streaming also provides for media encryption and user authentication over HTTPS, allowing publishers to protect their work.

Send live and on‐demand audio and video to iPhone, iPad, Mac, Apple TV, and PC with HTTP Live Streaming (HLS) technology from Apple. Using the same protocol that powers the web, HLS lets you deploy content using ordinary web servers and content delivery networks. HLS is designed for reliability and dynamically adapts to network conditions by optimizing playback for the available speed of wired and wireless connections.

Points

Resources

Session Types

The HTTP Live Streaming protocol supports two types of sessions: events (live broadcasts) and video on demand (VOD).

VOD Sessions

For VOD sessions, media files are available representing the entire duration of the presentation. The index file is static and contains a complete list of all files created since the beginning of the presentation. This kind of session allows the client full access to the entire program.

VOD can also be used to deliver “canned” media. HTTP Live Streaming offers advantages over progressive download for VOD, such as support for media encryption and dynamic switching between streams of different data rates in response to changing connection speeds. (QuickTime also supports multiple-data-rate movies using progressive download, but QuickTime movies do not support dynamically switching between data rates in mid-movie.)

Live Sessions

Live sessions (events) can be presented as a complete record of an event, or as a sliding window with a limited time range the user can seek within.

For live sessions, as new media files are created and made available, the index file is updated. The new index file lists the new media files. Older media files can be removed from the index and discarded, presenting a moving window into a continuous stream—this type of session is suitable for continuous broadcasts. Alternatively, the index can simply add new media files to the existing list—this type of session can be easily converted to VOD after the event completes.

It is possible to create a live broadcast of an event that is instantly available for video on demand. To convert a live broadcast to VOD, do not remove the old media files from the server or delete their URLs from the index file; instead, add an #EXT-X-ENDLIST tag to the index when the event ends. This allows clients to join the broadcast late and still see the entire event. It also allows an event to be archived for rebroadcast with no additional time or effort.

If your playlist contains an EXT-X-PLAYLIST-TYPE tag, you should also change the value from EVENT to VOD.

Notes

HLS isn't supported by all the clients you listed. It is supported by iPad and android >= 3.0, but not supported by IE9 or Chrome. For HLS, you need a MPEG2TS with MPEG4-AVC(h.264) and AAC as the video and audio codecs. The ts stream needs to be segmented with a tool like this.

You might want to look into providing just a progressive stream instead of HLS. That should be supported by html5 in IE9 and Chrome. As for video format, you'll need and MPEG4 container with AVC(h.264) and AAC.

References

Gift

巴黎酒店初学者 - 来自法国的浪漫爱情虐心剧

  • 迅雷下载

ed2k://|file|%E5%B7%B4%E9%BB%8E%E9%85%92%E5%BA%97%E5%88%9D%E5%AD%A6%E8%80%85.BD1280%E8%B6%85%E6%B8%85%E6%84%8F%E5%A4%A7%E5%88%A9%E8%AF%AD%E4%B8%AD%E5%AD%97.mp4|2809922872|C9180C8A89D4F772CA63618777AF73EB|h=J7SDUK7CEPYFMGDTAHVCBVPB3VUW6DA2|/

  • 在线播放

【BD蓝光1080P高清英语中字】【巴黎酒店初学者】【剧情/爱情】【2016】【法国】

posted @ 2016-08-31 18:37  Mgtv-UWP  阅读(1012)  评论(0编辑  收藏  举报