Apple Http Live Streaming
|
|
Bookmark Apple Http Live Streaming |
About Apple Http Live StreamingHere you can find all about Apple Http Live Streaming like tools and other informations. For example: example, white paper, ietf.
Apple Http Live Streaming manual (user guide) is ready to download for free.
On the bottom of page users can write a review. If you own a Apple Http Live Streaming please write about it to help other people. [ Report abuse or wrong photo | Share your Apple Http Live Streaming photo ]
Manual
Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Download
(English)Apple Http Live Streaming - Overview, size: 547 KB |
Apple Http Live Streaming
Video review
Apple HTTP live streaming and Caringo content storage
User reviews and opinions
| hamdan |
10:26am on Wednesday, June 23rd, 2010 ![]() |
| You can get a Nano or Touch for around a third of the price and still get Music, Podcasts, Apps, Clip, FM Radio and Camera. Overpriced content consumption table. Very responsive touch screen, high res screen Content Consumption only. Not great value for money. No camera. | |
| Acnerabble |
8:15am on Tuesday, May 18th, 2010 ![]() |
| Bought the 16G WiFi for my wife. She enjoys playing games, surfing the web, reading books, reading email and catching up on her Soaps at ABC.com. | |
| roadbike |
9:35am on Sunday, March 14th, 2010 ![]() |
| PROS: OS, look, Awesomeness ITs great, and the idea is well along with the OS its a Mac downsized. its size is a bit big Awesome game player, and has replaced my laptop but I do not have to need for business and so I do not know about how those work. Great for traveling,... | |
Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.
Documents

HTTP Live Streaming Overview
Networking, Internet, & Web
2010-11-15
Apple Inc. 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the following exceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apples copyright notice. The Apple logo is a trademark of Apple Inc. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled computers. Apple Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 App Store is a service mark of Apple Inc. Apple, the Apple logo, iPhone, iPod, iPod touch, Leopard, Mac, Mac OS, QuickTime, Safari, and Snow Leopard are trademarks of Apple Inc., registered in the United States and other countries. iPad is a trademark of Apple Inc. DEC is a trademark of Digital Equipment Corporation. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. Intel and Intel Core are registered trademarks of Intel Corportation or its subsidiaries in the United States and other countries.
Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED AS IS, AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.
Contents
Introduction
Introduction 7
Organization of This Document 8 See Also 8
Chapter 1
HTTP Streaming Architecture 9
Overview 9 Server Components 10 Media Encoder 10 Stream Segmenter 11 File Segmenter 12 Media Segment Files 12 Distribution Components 12 Client Component 13
Chapter 2
Using HTTP Live Streaming 15
Download the Tools 15 Media Stream Segmenter 15 Media File Segmenter 15 Media Stream Validator 15 Varient Playlist Creator 16 Metadata Tag Generator 16 Session Types 16 Content Protection 16 Caching and Delivery Protocols 17 Stream Alternates 17 Video Over Cellular Networks 18 Requirements for Apps 18 Failover Protection 19 Adding Metadata 19 Sample Streams 20
Chapter 3
Frequently Asked Questions 23 Document Revision History 29
2010-11-15 | 2010 Apple Inc. All Rights Reserved.
CONTENTS
Figures
Figure 1-1 A basic configuration 10
Figure 2-1 Stream alternates 18
FIGURES
INTRODUCTION
If you are interested in any of the following:
Streaming audio or video to iPhone, iPad, or iPod touch Streaming live events without special server software Sending video on demand with encryption and authentication
you should read this document. HTTP Live Streaming lets you send audio and video over HTTP from an ordinary web server for playback on iPhone, iPad, iPod touch, and desktop computers. 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. All devices running iOS 3.0 and later include built-in client software. A video placeholder is displayed when Safari encounters an <OBJECT> or <EMBED> tag with the URL of an HTTP Live stream. The full-screen media player is launched when the user touches the video placeholder. HTTP Live streams can also be played in native iPhone or iPad apps using the media player framework. Additionally, Safari is able to play HTTP Live streams natively on iPad, within a webpage, as part of a <video> element. Important: iPhone and iPad apps that send large amounts of audio or video data over cellular networks are required to use HTTP Live Streaming. On Mac OS X, version 10.6 and later, QuickTime can play HTTP Live Streams. The QuickTime plug-in allows you to embed streams in websites using the <OBJECT> or <EMBED> tags, and Safari can play HTTP Live streams natively within the <VIDEO> element. Developers can also use the QTKit framework to create desktop applications that play HTTP Live Streams. Because it uses HTTP, this kind of streaming is automatically supported by nearly all edge servers, media distributors, caching systems, routers, and firewalls. Note: Many existing streaming services require specialized servers to distribute content to end users. These servers require specialized skills to set up and maintain, and in a large-scale deployment this can be costly. HTTP Live Streaming avoids this by using standard HTTP to deliver the media. Additionally, HTTP Live Streaming is designed to work seamlessly in conjunction with media distribution networks for large scale operations. The HTTP Live Streaming specification is an IETF Internet-Draft.
Note: This document was formerly titled iPhone Streaming Media Guide for Web Developers.
Organization of This Document
This document contains three chapters:
HTTP Streaming Architecture (page 9)how the technology works, what formats are supported, what you need on the server, and what clients are available. Using HTTP Live Streaming (page 15)how to set up live broadcast or video on demand sessions, how to implement encryption and authentication, and how to set up alternate bandwidth streams. Links to sample streams are included. Frequently Asked Questions (page 23)common questions about HTTP Live Streaming, and their answers: format details, tips, where to go for support, and so on.
See Also
Designing Web Content for iPhonehow to design web content for iPhone. Best Practices for Creating and Deploying HTTP Live Streaming Media for the iPhone and iPadstep by step guidance in setting up a server and network for HTTP Live Streaming. HTTP Live Streaming protocolthe IETF Internet-Draft of the HTTP Live Streaming specification. Para
CHAPTER 1
HTTP Streaming Architecture
HTTP Live Streaming allows you to send live or prerecorded audio and video from an ordinary web server to any device running iOS 3.0 or later (including iPad), or any computer with QuickTime X or later installed, with support for encryption and authentication.
Overview
Conceptually, HTTP Live Streaming consists of three parts: the server component, the distribution component, and the client software. The server component is responsible for taking input streams of media and encoding them digitally, encapsulating them in a format suitable for delivery, and preparing the encapsulated media for distribution. The distribution component consists of standard web servers. They are responsible for accepting client requests and delivering prepared media and associated resources to the client. For large-scale distribution, edge networks or other content delivery networks can also be used. The client software is responsible for determining the appropriate media to request, downloading those resources, and then reassembling them so that the media can be presented to the user in a continuous stream. Client software is included on iOS 3.0 and later and computers with QuickTime X or later installed. In a typical configuration, a hardware encoder takes audio-video input, encodes it as MPEG-4 audio and video, and outputs it in an MPEG-2 Transport Stream, which is then broken into a series of short media files by a software stream segmenter. These files are placed on a web server. The segmenter also creates and maintains an index file containing a list of the media files. The URL of the index file is published on the web server. Client software reads the index, then requests the listed media files in order and displays them without any pauses or gaps between segments. An example of a simple HTTP streaming configuration is shown in A basic configuration.
#EXTM3U #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:10 #EXTINF:10, http://media.example.com/segment1.ts #EXTINF:10, http://media.example.com/segment2.ts #EXTINF:10, http://media.example.com/segment3.ts #EXT-X-ENDLIST
The index file may also contain URLs for encryption key files or alternate index files for different bandwidths. For details of the index file format, see the IETF Internet-Draft of the HTTP Live Streaming specification.
File Segmenter
If you already have a media file encoded using supported codecs, you can use a file segmenter to encapsulate it in an MPEG stream and break it into segments of equal length (if the file is already encapsulated in an MPEG-2 transport stream, the file segmenter omits this step). The file segmenter allows you to use a library of existing audio and video files for video on demand via HTTP Live Streaming. It performs the same tasks as the media segmenter, but it takes files as input instead of streams.
Media Segment Files
The media segment files are normally produced by the stream segmenter, based on input from the encoder, and consist of a series of.ts files containing segments of an MPEG-2 Transport Stream carrying H.264 video and AAC audio. For an audio-only broadcast, the segmenter can produce MPEG elementary audio streams containing either AAC audio with ADTS headers or MP3 audio. Alternatively, it is possible to create the.M3U8 file and the media segment files independently, provided they conform the published specification. For audio-only broadcasts, for example, you could create an.M38U file using a text editor, listing a series of existing.MP3 files.
Distribution Components
The distribution system is a web server or a web caching system that delivers the media files and index files to the client over HTTP. No custom server modules are required to deliver the content, and typically very little configuration is needed on the web server. Recommended configuration is typically limited to specifying MIME-type associations for.M3U8 files and.ts files. File extension MIME type
application/x-mpegURL or vnd.apple.mpegURL video/MP2T
Tuning time-to-live (TTL) values for.M3U8 files may also be necessary to achieve desired caching behavior for downstream web caches, as these files are frequently overwritten, and the latest version should be downloaded for each request.
Client Component
The client software begins by fetching the index file, based on a URL identifying the stream. The index file in turn specifies the location of the available media files, decryption keys, and any alternate streams available. For the selected stream, the client downloads each available media file in sequence. Each file contains a consecutive segment of the stream. Once it has a sufficient amount of data downloaded, the client begins presenting the reassembled stream to the user. The client is responsible for fetching any decryption keys, authenticating or presenting a user interface to allow authentication, and decrypting media files as needed. This process continues until the client encounters the #EXT-X-ENDLIST tag in the index file. If no #EXT-X-ENDLIST tag is encountered, the index file is part of an ongoing broadcast. The client loads a new version of the index file periodically. The client looks for new media files and encryption keys in the updated index and adds these URLs to its queue.
CHAPTER 2
Using HTTP Live Streaming
Download the Tools
There are several tools available that can help you set up an HTTP Live Streaming service. The tools include a media stream segmenter, a media file segmenter, a stream validator, and a variant playlist generator. The tools are included with Mac OS X, version 10.6 (Snow Leopard) and later. They can be found in the /usr/bin/ directory. This directory is hidden from the finder, but is accessible from the Terminal application. The tools are frequently updated, so you should download the current version of the HTTP Live Streaming Tools from the Apple Developer website. You can access them if you are a member of either the iPhone or Mac Developer Program. One way to navigate to the tools is to log onto connect.apple.com, then click either iPhone or QuickTime under the Downloads heading.
Media Stream Segmenter
The mediastreamsegmenter command-line tool takes an MPEG-2 transport stream as an input and produces a series of equal-length files from it, suitable for use in HTTP Live Streaming. It can also generate index files, encrypt the media, produce encryption keys, optimize the files by reducing overhead, and create the necessary files for automatically generating multiple stream alternates. For details, type man mediastreamsegmenter from the terminal window.
Media File Segmenter
The mediafilesegmenter command-line tool takes an encoded media file as an input, wraps it in an MPEG-2 transport stream (unless it is already encapsulated in one), and produces a series of equal-length files from it, suitable for use in HTTP Live Streaming. The file stream segmenter behaves very much like the media stream segmenter, but it works on existing files instead of streams coming from an encoder. For details, type man mediafilesegmenter from the terminal window.
Media Stream Validator
The mediastreamvalidator command-line tool examines the index files, stream alternates, and media segment files on a server and tests to determine whether they will work with HTTP Live Streaming clients. For details, type man mediastreamvalidator from the terminal window.
Varient Playlist Creator
The variantplaylistcreator command-line tool creates index files, or playlists, for alternate streams from the output of the media stream segmenter (the media stream segmenter must be invoked with the -generate-variant-info argument to produce the required output for the playlist creator). For details, type man varientplaylistcreator from the terminal window.
Metadata Tag Generator
The id3taggenerator command-line tool generates ID3 metadata tags. These tags can either be written to a file or inserted into outgoing stream segments. For details, see Adding Metadata (page 19).
Session Types
The HTTP Live Streaming protocol supports live broadcast sessions and video on demand (VOD) sessions. For live sessions, as new media files are created and made available the index file is updated. The new index file includes the new media files; older files are typically removed. The updated index file presents a moving window into a continuous stream. This type of session is suitable for continuous broadcasts. 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. 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, and add an #EXT-X-ENDLIST tag to the index when the broadcast 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. VOD can also be used to deliver canned media. It is typically more efficient to deliver such media as a single QuickTime movie or MPEG-4 file, but HTTP Live Streaming offers some advantages, 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.)
Content Protection
Media files containing stream segments may be individually encrypted. When encryption is employed, references to the corresponding key files appear in the index file so that the client can retrieve the keys for decryption. When a key file is listed in the index file, the key file contains a cipher key that must be used to decrypt subsequent media files listed in the index file. Currently HTTP Live Streaming supports AES-128 encryption using 16-octet keys. The format of the key file is a packed array of these 16 octets in binary format.
The media stream segmenter available from Apple provides encryption and supports three modes for configuring encryption. The first mode allows you to specify a path to an existing key file on disk. In this mode the segmenter inserts the URL of the existing key file in the index file. It encrypts all media files using this key. The second mode instructs the segmenter to generate a random key file, save it in a specified location, and reference it in the index file. All media files are encrypted using this randomly generated key. The third mode instructs the segmenter to generate a random key file, save it in a specified location, reference it in the index file, and then regenerate and reference a new key file every n files. This mode is referred to as key rotation. Each group of n files is encrypted using a different key. Note: All media files may be encrypted using the same key, or new keys may be required at intervals. The theoretical limit is one key per media file, but because each media key adds a file request and transfer to the overhead for presenting the following media segments, changing to a new key periodically is less likely to impact system performance than changing keys for each segment. You can serve key files using either HTTP or HTTPS. You may also choose to protect the delivery of the key files using your own session-based authentication scheme.
Caching and Delivery Protocols
HTTPS is commonly used to deliver key files. It may also be used to deliver the content files and index files, but this is not recommended when scalability is important, since HTTPS requests often bypass web server caches, causing all content requests to be routed through your server and defeating the purpose of edge network distribution systems. For this very reason, however, it is important to make sure that any content delivery network you use understands that the.M3U8 index files are not to be cached for longer than one media segment duration.
Stream Alternates
Index files may reference alternate streams of content. References can be used to support delivery of multiple streams of the same content with varying quality levels for different bandwidths or devices. HTTP Live Streaming supports switching between streams dynamically if the available bandwidth changes. The client software uses heuristics to determine appropriate times to switch between the alternates. Currently, these heuristics are based on recent trends in measured network throughput. The index file points to alternate streams of media by including a specially tagged list of other index files, as illustrated in Figure 2-1
Figure 2-1
Stream alternates
Alternate-A Index file
Alternate-B Index file
Alternate-C Index file
Note that the client may choose to change to an alternate stream at any time, such as when a mobile device enters or leaves a WiFi hotspot. All alternates should use identical audio to allow smooth transitions among streams.
Video Over Cellular Networks
When you send video to a mobile device such as iPhone or iPad, the clients Internet connection may move to or from a cellular network at any time. HTTP Live Streaming allows the client to choose among stream alternates dynamically as the network bandwidth changes, providing the best stream as the device moves between cellular and WiFi connections, for example, or between 3G and EDGE connections. This is a significant advantage over progressive download. It is strongly recommended that you use HTTP Live Streaming to deliver video to all cellular-capable devices, even for video on demand, so that your viewers have the best experience possible under changing conditions. In addition, you should provide cellular-capable clients an alternate stream at 64 Kbps or less for slower data connections. If you cannot provide video of acceptable quality at 64 Kbps or lower, you should provide an audio-only stream, or audio with a still image.
Requirements for Apps
Warning: Apps submitted for distribution in the App Store must conform to these requirements.
If your app delivers video over cellular networks, and the video exceeds either 10 minutes duration or 5 MB of data in a five minute period, you are required to use HTTP Live Streaming. (Progressive download may be used for smaller clips.)
If your app uses HTTP Live Streaming over cellular networks, you are required to provide at least one stream at 64 Kbps or lower bandwidth (the low-bandwidth stream may be audio-only or audio with a still image). These requirements apply to apps submitted for distribution in the App Store for use on Apple products. Non-compliant apps may be rejected or removed, at the discretion of Apple.
Failover Protection
If your playlist contains alternate streams, they can not only operate as bandwidth or device alternates, but as failure fallbacks. Starting with iOS 3.1, if the client is unable to reload the index file for a stream (due to a 404 error, for example), the client attempts to switch to an alternate stream. In the event of an index load failure on one stream, the client chooses the highest bandwidth alternate stream that the network connection supports. If there are multiple alternates at the same bandwidth, the client chooses among them in the order listed in the playlist. You can use this feature to provide redundant streams that will allow media to reach clients even in the event of severe local failures, such as a server crashing or a content distributor node going down. To implement failover protection, create a stream, or multiple alternate bandwidth streams, and generate a playlist file as you normally would. Then create a parallel stream, or set of streams, on a separate server or content distribution service. Add the list of backup streams to the playlist file, so that the backup stream at each bandwidth is listed after the primary stream. For example, if the primary stream comes from server ALPHA, and the backup stream is on server BETA, your playlist file might look something like this:
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000 http://ALPHA.mycompany.com/lo/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000 http://BETA.mycompany.com/lo/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000 http://ALPHA.mycompany.com/md/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000 http://BETA.mycompany.com/md/prog_index.m3u8
Note that the backup streams are intermixed with the primary streams in the playlist, with the backup at each bandwidth listed after the primary for that bandwidth. You are not limited to a single backup stream set. In the example above, ALPHA and BETA could be followed by GAMMA, for instance. Similarly, you need not provide a complete parallel set of streams. You could provide a single low-bandwidth stream on a backup server, for example.
Adding Metadata
You can add various kinds of metadata to media stream segments. For example, you can add the album art, artists name, and song title to an audio stream. As another example, you could add the current batters name and statistics to video of a baseball game. Metadata can be a file in ID3 format or an image file (JPEG or PNG).
If an audio-only stream includes an image as metadata, the Apple client software automatically displays it. Currently, the only metadata that is automatically displayed by the Apple-supplied client software is a still image accompanying an audio-only stream. If you are writing your own client software, however, using either MPMoviePlayerController or AVPlayerItem, you can access streamed metadata using the timedMetaData property. You can add metadata by specifying a metadata file in the -F command line option to either the stream segmenter or the file segmenter. Metadata specified this way is automatically inserted into every media segment. You can also add timed metadata, which is inserted into a media stream at a given time offset. Timed metadata can optionally be inserted into all segments after a given time. To add timed metadata to a live stream, use the id3taggenerator tool, with its output set to the stream segmenter. The tool generates ID3 metadata and passes it the stream segmenter for inclusion in the outbound stream. The tag generator can be run from a shell script, for example, to insert metadata at the desired time, or at desired intervals. New timed metadata automatically replaces any existing metadata. Once metadata has been inserted into a media segment, it is persistent. If a live broadcast is re-purposed as video on demand, for example, it retains any metadata inserted during the original broadcast. Adding timed metadata to a stream created using the file segmenter is slightly more complicated. 1. First, generate the metadata samples. You can generate ID3 metadata using the id3taggenerator command-line tool, with the output set to file. Next, create a metadata macro filea text file in which each line contains the time to insert the metadata, the type of metadata, and the path and filename of a metadata file. For example, the following metadata macro file would insert a picture at 1.2 seconds into the stream, then an ID3 tag at 10 seconds:
1.2 picture /meta/images/picture.jpg 10 id3 /meta/id3/title.id3
Finally, specify the metadata macro file by name when you invoke the media file segmenter, using the -M command line option.
For additional details, see the man pages for mediastreamsegmenter, mediafilesegmenter, and id3taggenerator.
Sample Streams
There are a series of HTTP streams available for testing on Apples developer site. These examples show proper formatting of HTML to embed streams,.M3U8 files to index the streams, and.ts media segment files. The streams can be accessed at the following URLs:
http://devimages.apple.com/iphone/samples/bipbopgear1.html
http://devimages.apple.com/iphone/samples/bipbopgear2.html http://devimages.apple.com/iphone/samples/bipbopgear3.html http://devimages.apple.com/iphone/samples/bipbopgear4.html http://devimages.apple.com/iphone/samples/bipbopall.html
The samples show the same NTSC test pattern at four different resolutions and data rates. The last sample streams at multiple data rates. The stream starts with sample 1 and switches to the fastest sample the connection supports. You must install iOS version 3.0 or later to play these samples on your iPhone or iPod touch. QuickTime X is required for playback on the desktop. To view the sample streams in browsers other than Safari, the QuickTime plug-in or ActiveX component is required.
CHAPTER 3
Frequently Asked Questions
What kinds of encoders are supported? The protocol specification does not limit the encoder selection. However, the current Apple implementation should interoperate with encoders that produce MPEG-2 Transport Streams containing H.264 video and AAC audio (HE-AAC or AAC-LC). Encoders that are capable of broadcasting the output stream over UDP should also be compatible with the current implementation of the Apple provided segmenter software. Apple has tested the current implementation with the following commercial encoders:
Inlet Technologies Spinnaker 7000 Envivio 4Caster C4
What are the specifics of the video and audio formats supported? Although the protocol specification does not limit the video and audio formats, the current Apple implementation supports the following formats:
The media stream segmenter, file stream segmenter, and other tools are in the /usr/bin/ directory of Mac OS X computers, version 10.6 and later. These tools are frequently updated, so you should download the current version of the HTTP Live Streaming Tools from the Apple Developer website. See Download the Tools (page 15) for details. 10. What settings are recommended for a typical HTTP stream, with alternates, for use with the media segmenter from Apple? Your encoder should produce MPEG-2 transport stream (.ts) files with the following characteristics for the Apple segmenter:
H.264 Baseline 3.0 video Keyframes every 3 seconds HE-AAC (version 1) stereo audio at 44.1 kHz Four streams: Cellular FallbackAudio only or audio with still image, 64 Kbps Low96 Kbps video, 64 Kbps audio Medium256 Kbps video, 64 Kbps audio High800 Kbps video, 64 Kbps audio
These settings are the current recommendations. There are also certain requirements. The current mediastreamsegmenter tool works only with MPEG-2 Transport Streams as defined in ISO/IEC 13818. The transport stream must contain H.264 (MPEG-4, part 10) video and AAC or MPEG audio. If AAC audio is used, it must have ADTS headers. H.264 video access units must use Access Unit Delimiter NALs, and must be in unique PES packets. The segmenter also has a number of user-configurable settings. You can obtain a list of the command line arguments and their meanings by typing man mediastreamsegmenter from the Terminal application. A target duration (length of the media segments) of 10 seconds is recommended, and is the default if no target duration is specified. 11. How can I specify what codecs or H.264 profile are required to play back my stream? Use the CODECS attribute of the EXT-X-STREAM-INF tag. When this attribute is present, it must include all codecs and profiles required to play back the stream. The following values are currently recognized: AAC-LC HE-AAC MP3 "mp4a.40.2" "mp4a.40.5" "mp4a.40.34"
H.264 Baseline Profile level 3.0 "avc1.42001e" or avc1.66.30 Note: Use avc1.66.30 for compatibility with iOS versions 3.0 to 3.12. H.264 Main Profile level 3.0 "avc1.4d001e" or avc1.77.30 Note: Use avc1.77.30 for compatibility with iOS versions 3.0 to 3.12.
The attribute value must be in quotes. If multiple values are specified, one set of quotes is used to contain all values, and the values are separated by commas. An example follows.
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000 mid_video_index.m38u #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=800000 wifi_video_index.m38u #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=3000000, CODECS="avc1.4d001e, mp4a.40.5" h264main_heaac_index.m38u #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=64000, CODECS="mp4a.40.5" aacaudio_index.m38u
12. How can I create an audio-only stream from audio/video input? Add the -audio-only argument when invoking the stream or files segmenter. 13. How can I add a still image to an audio-only stream? Use the -meta-file argument when invoking the stream or file segmenter with -meta-type=picture to add an image to every segment. For example, this would add an image named poster.jpg to every segment of an audio stream created from the file track01.mp3:
mediafilesegmenter -f /Dir/outputFile -a --meta-file=poster.jpg --meta-type=picture track01.mp3
Remember that the image is typically resent every ten seconds, so its best to keep the file size small. 14. How can I specify an audio-only alternate to an audio-video stream? Use the CODECS and BANDWIDTH attributes of the EXT-X-STREAM-INF tag together. The BANDWIDTH attribute specifies the bandwidth required for each alternate stream. If the available bandwidth is enough for the audio alternate, but not enough for the lowest video alternate, the client switches to the audio stream. If the CODECS attribute is included, it must list all codecs required to play the stream. If only an audio codec is specified, the stream is identified as audio-only. Currently, it is not required to specify that a stream is audio-only, so use of the CODECS attribute is optional. The following is an example that specifies video streams at 500 Kbps for fast connections, 150 Kbps for slower connections, and an audio-only stream at 64 Kbps for very slow connections. All the streams should use the same 64 Kbps audio to allow transitions between streams without an audible disturbance.
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000 mid_video_index.m38u #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=150000 3g_video_index.m38u #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=64000, CODECS="mp4a.40.5" aacaudio_index.m38u
15. What are the hardware requirements or recommendations for servers? See question #1 for encoder hardware recommendations.
The Apple stream segmenter is capable of running on any Intel-based Mac. We recommend using a Mac with two Ethernet network interfaces, such as a Mac Pro or an XServe. One network interface can be used to obtain the encoded stream from the local network, while the second network interface can provide access to a wider network. 16. Does the Apple implementation of HTTP Live Streaming support DRM? No. However, media can be encrypted and key access can be limited using HTTPS authentication. 17. What client platforms are supported? iPhone, iPad, and iPod touch (requires iOS version 3.0 or later) or any device with QuickTime X or later installed. 18. Is the protocol specification available? Yes. The protocol specification is an IETF Internet-Draft, at http://tools.ietf.org/html/draft-pantos-httplive-streaming. 19. Does the client cache content? The index file can contain an instruction to the client that content should not be cached. Otherwise, the client may cache data for performance optimization when seeking within the media. 20. Is this a real-time delivery system? No. It has inherent latency corresponding to the size and duration of the media files containing stream segments. At least one segment must fully download before it can be viewed by the client, and two may be required to ensure seamless transitions between segments. In addition, the encoder and segmenter must create a file from the input; the duration of this file is the minimum latency before media is available for download. Typical latency with recommended settings is in the neighborhood of 30 seconds. 21. What is the latency? Approximately 30 seconds, with recommended settings. See question #15. 22. Do I need to use a hardware encoder? No. Using the protocol specification, it is possible to implement a software encoder. 23. What advantages does this approach have over RTP/RTSP? HTTP is less likely to be disallowed by routers, NAT, or firewall settings. No ports need to be opened that are commonly closed by default. Content is therefore more likely to get through to the client in more locations and without special settings. HTTP is also supported by more content-distribution networks, which can affect cost in large distribution models. In general, more available hardware and software works unmodified and as intended with HTTP than with RTP/RTSP. Expertise in customizing HTTP content delivery using tools such as PHP is also more widespread. Also, HTTP Live Streaming is supported in Safari and the media player framework on iOS. RTSP streaming is not supported. 24. Why is my streams overall bit rate higher than the sum of the audio and video bitrates?
MPEG-2 transport streams can include substantial overhead. They utilize fixed packet sizes that are padded when the packet contents are smaller than the default packet size. Encoder and multiplexer implementations vary in their efficiency at packing media data into these fixed packet sizes. The amount of padding can vary with frame rate, sample rate, and resolution. 25. How can I reduce the overhead and bring the bit rate down? Using a more efficient encoder can reduce the amount of overhead, as can tuning the encoder settings. Also, the -optimize argument can be passed to the Apple mediastreamsegmenter. This removes some unnecessary padding and can significantly reduce the overhead, particularly for low-bandwidth streams. 26. Do all media files have to be part of the same MPEG-2 Transport Stream? No. You can mix media files from different transport streams, as long as they are separated by EXT-X-DISCONTINUITY tags. See the protocol specification for more detail. For best results, however, all video media files should have the same height and width dimensions in pixels. 27. Where can I get help or advice on setting up an HTTP audio/video server? You can visit the Apple Developer Forum at http://devforums.apple.com/. Also, check out Best Practices for Creating and Deploying HTTP Live Streaming Media for the iPhone and iPad.
REVISION HISTORY
Document Revision History
This table describes the changes to HTTP Live Streaming Overview. Date 2010-11-15 2010-03-25 2010-02-05 Notes Added description of timed metadata. Updated to include iPad and -optimize option for stream segmenter. Defines requirement for apps to use HTTP Live Streaming for video over cellular networks and requirement for 64 Kbps streams. Updated links to tools and sample streams. Added documentation of CODECS attribute and video streams with audio-only alternates. Fixed typos and corrected URLs for samples. Updated to include failover support. Added sample code, QuickTime X support. Reorganized document for readability. Changed title from iPhone Streaming Media Guide for Web Developers. Added URL for downloading media segmenter. New document that describes live streaming of audio and video over HTTP for iPhone.
2010-01-20
2009-11-17 2009-09-09 2009-06-04 2009-05-22
2009-03-15

Timed Metadata for HTTP Live Streaming
Networking & Internet: Protocol Streams
2011-04-28
Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the following exceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apples copyright notice. The Apple logo is a trademark of Apple Inc. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled computers. Apple Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, the Apple logo, and Safari are trademarks of Apple Inc., registered in the United States and other countries.
Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED AS IS, AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.
Contents
Introduction Chapter 1
1.0 Introduction 5 2.0 Details 7
2.1 Overview 7 2.2 Summary of the Code Points Used 7 2.3 Descriptors Used 8 2.3.1 Introduction 8 2.3.2 Descriptor Loop of the PMT for the Program 8 2.3.3 Descriptor Loop of the PMT for the Elementary Stream 9 2.4 PES Stream Format 10
Chapter 2
3.0 References 13
[1] [2] [3] [4] 13 13
Document Revision History 15
2011-04-28 | 2011 Apple Inc. All Rights Reserved.
CONTENTS
INTRODUCTION
1.0 Introduction
HTTP Live Streaming supports inclusion of timed metadata in ID3 format, carried in the MPEG-2 transport stream. This document describes how ID3 (reference [3] (page 13)) metadata is carried as timed metadata in MPEG-2 Transport Streams (reference [1] (page 13)) as used by the HTTP Live Streaming protocol (reference [2] (page 13)). See section 3.0, References, for the relevant specifications. Important: This document is provided for informational purposes only. Apple may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. The furnishing of this document does not give you a license to any patents, trademarks, copyrights, or other intellectual property.
CHAPTER 1
2.0 Details
2.1 Overview
Metadata is carried in MPEG-2 transport streams as described in section 2.12 of reference [1] (page 13). HTTP Live Streaming metadata is carried in an elementary stream (PES) instead of, for example, in a carousel. The metadata stream must be in the same program as the main program material (i.e. the audio/video content). ID3 metadata is self-describing and needs no configuration information, so the provisions for metadata decoder configuration data are not used. The remainder of section 2 of this specification describes the details of the syntax and field values from section 2 of reference [1] (page 13) for ID3 format metadata used with HTTP Live Streaming. In the syntax tables in section 2.3.2 of this specification, the syntax structure (left column) is shown with only the names of fields and the part of the outline that is in effect for ID3 metadata as described in this specification. Conditional blocks for which a condition is false are omitted. The right column in the syntax tables indicates the value needed for each field in this context, or contains an explanation of that field. The MPEG-2 specification [1] (page 13) should be consulted for the complete syntax, field sizes, and acceptable values.
2.2 Summary of the Code Points Used
ID3 defines both a format and a semantic, and so the same registered format_identifier is used for both metadata_format_identifier and metadata_application_format_identifier. The registered value for these, at the registration authority (reference [4] (page 13)), is the four-character string ID3 (the characters I D 3 space, or 0x49 0x44 0x33 0x20). To indicate that a registered value is used, the metadata_format and metadata_application_format fields take the values 0xff and 0xffff respectively. The ID3 metadata is carried in a private stream, not a stream formatted as metadata Access Units (MAUs) as defined in 12.4 of [1] (page 13). The stream_id value used for the stream is therefore private_stream_id_1, 0xbd, as specified in 2.12.3 of [1] (page 13). The stream_type is set to 0x15, indicating carriage of metadata in a PES stream, as specified in 2.12.9.1 of [1] (page 13). Since only one metadata stream is normally carried, the metadata_service_id is normally set to 0; however, any suitable value can be used to distinguish this metadata stream from other metadata streams, if present.
2.3 Descriptors Used
2.3.1 Introduction
The format and content of the metadata descriptors is documented in sections 2.6.58 to 2.6.61 of [1] (page 13).
2.3.2 Descriptor Loop of the PMT for the Program
To declare the presence of the metadata stream, a metadata_pointer_descriptor (2.6.58 of [1] (page 13)) is placed in the PMT, in the program_info loop for the program. The metadata must be in the same program as the main program (audio/video) content; the use of this descriptor to refer to another program is not supported. Syntax
Metadata_pointer_descriptor () { descriptor_tag 37 (decimal) Metadata_pointer_descriptor tag the length of the descriptor 0xFFFF
descriptor_length metadata_application_format if (metadata_application_format==0xFFFF) { metadata_format_identifier } metadata_format if (metadata_format==0xFF) { metadata_format_identifier } metadata_service_id metadata_locator_record_flag MPEG_carriage_flags reserved if (MPEG_carriage_flags == 0|1|2) {
ID3 (0x49 0x44 0x33 0x20)
any ID, typically 0 0x1f
Syntax
program_number
program number of the program whose es descriptor loop contains the metadata_descriptor
The elementary stream carrying the metadata needs to be declared in the loop of elementary streams, in the program map (section 2.4.4.8 of [1] (page 13)): Field
stream_type reserved
0x15 0x7
elementary_PID pid of the elementary stream carrying the metadata reserved 0xf
ES_info_length length of the elementary stream info descriptor loop, including the metadata_descriptor
2.3.3 Descriptor Loop of the PMT for the Elementary Stream
To declare the format of the metadata stream, a metadata_descriptor (2.6.60 of [1] (page 13)) is placed in the PMT, in the es_info loop for the elementary stream. Syntax
Metadata_descriptor () { descriptor_tag 38 (decimal) Metadata_descriptor tag the length of the descriptor 0xFFFF
descriptor_length metadata_application_format if (metadata_application_format==0xFFFF) {
metadata_application_format_identifier ID3 (0x49 0x44 0x33 0x20) } metadata_format 0xFF
if (metadata_format==0xFF) { metadata_format_identifier } metadata_service_id decoder_config_flags DSM-CC_flag reserved
'ID3 ' (0x49 0x44 0x33 0x20)
any ID, typically 0 0xf
2.4 PES Stream Format
ID3 metadata is stored as a complete ID3v4 frame in a PES packet, including a complete ID3 header. The ID3 tag must start immediately after the PES header; this PES header must contain a PTS (PTS_DTS_flags set to '10'). The PTS must be on the same timeline as the audio and video frames. The data_alignment bit must be set to 1. The PES header must contain a PES_packet_length that is non-zero. If an ID3 tag is longer than 65535 bytes, it must have more than one PES header. The second and following PES headers must have data_alignment set to 0, and should have the PTS_DTS_flags set to 00 (and hence no PTS). The PES header is formatted as documented in 2.4.3.7 of [1] (page 13). PES Syntax
PES_Packet () { packet_start_code_prefix stream_id PES_packet_length if () { '10' PES_scrambling_control PES_priority data_alignment_indicator 0x00 0x00 0x01 0xbd private_stream_id_1 length of the packet, which must not be 0 a large test which is true in this case '10' 1 for the packet containing start of the ID3 header, else 0 0
copyright
PES Syntax
original_or_copy PTS_DTS_flags
0 if(data_alignment==1)10 else 00
ESCR_flag ES_rate_flag DSM_trick_mode_flag
additional_copy_info_flag 0 PES_CRC_flag PES_extension_flag PES_header_data_length } } the length of the data; padding may be used
The metadata stream is incorporated into a transport stream in the same way as audio or video is. For example, in a transport_packet() (see 2.4.3.2 of [1] (page 13)) the payload_unit_start_indicator is set to 1 only when a PES header follows. (The PES header, in turn, indicates whether the start of the ID3 data follows, or whether that has been divided into multiple PES packets).
CHAPTER 2
3.0 References
The following documents are cited in this specification
ISO/IEC 13818-1:2007 Information technology Generic coding of moving pictures and associated audio information: Systems
IETF Internet Draft draft-pantos-http-live-streaming HTTP Live Streaming
http://www.id3.org/id3v2.3.0, "The ID3 audio file data tagging format" version 2.3.0, M. Nilsson
http://www.smpte-ra.org/mpegreg/mpegreg.html SMPTE registration for ID3 format identifier.
REVISION HISTORY
Document Revision History
This table describes the changes to Timed Metadata for HTTP Live Streaming. Date 2011-04-28 Notes Changed title from Carriage of ID3 Formatted Metadata as Timed Metadata in MPEG-2 Transport Streams. Modified text of legal disclaimer. New document describing data format of timed metadata in MPEG2 streams as used in HTTP Live Streaming.
2010-12-15 2010-11-15
Tags
Example W175G FS726 Gigaset 2011 Dual III Generator SG-A D-copia 18MF Wanted-4-320 Taav670 Infiniti QX56 KV-21LT1B WIJ1075 Travelmate 630 N800W LF-V30 YST-SW012 Stylus Breva 850 400 Mkii 42A456p2D FAV80860M Figure Game 1 ME EB-1735W RM832A LE19C450 PW-AT770 Silverstreet TX-850 PM645 WR850GP KX-FC238FX SF-3100I AJ301DB 12 107Y-S Minimoog CMT-J1MD DVD-A120 Linux TX-L26x10Y 1000H XP CT-M11 Threat HTS5590 AWF1270 LF-B1 Speedtouch 121G Ietf MDR-RF960RK S-W40S ZDT311 FAX-L290 Alesis X2 MW-60SZ12 BDP-83 GR-349SQF Satellite HTS3115 CS-PW12CKE SL-S310 Mansion 2000 B R1045AV CDR 20 EC102 LA26A450c1 A8NE-FM DVP-SR90 DSS-8- Proheat 8910 Communicator MDV-6 PCV-RX417 6I-8I DVP-SR101p B Ed VR RX-F10S M300W BV9980RDS N150-JA01 50PM1MA Sims 2 Provocal APO-televid 77 HK6650R DAV-DZ1000 KX-TG2593B CFD-F10 BX-45 R2880 IC-V80 BF62ccbst NEC E949 2443BW White Paper CCD-TR650E DAS201 BH-602 Companion 3 EM325 ZWF1631W Perception 220 Cosworth
manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding
Sitemap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101










