You are on page 1of 6

HTTP Live Streaming

1/ Let you send audio and video over HTTP from an ordinary web server for playback on iOS (based
devices: iPhone, iPad, iPod touch, and Apple TV) and on desktop computers (Mac OS X).
2/ iPhone and iPad apps that send large amounts of audio or video data over cellular networks are
required to use HTTP Live Streaming.
3/ Where possible, use the <video> tag to embed HTTP Live Streaming, and use
the <object> or<embed> tags only to specify fallback content.
4/ Bonus:
MPEG-4 is one of the latest (audio and video) compression method standardized
by MPEG (Moving Picture Experts Group), designed especially for low-bandwidth /bng thng/
(less than 1.5MBit/sec bitrate) video/audio encoding purposes.

The major MPEG standards include the following:


MPEG - 1

The most common implementations of the MPEG-1 standard provide


a video resolution of 352-by-240 at 30 frames per second (fps).
This produces video quality slightly below the quality of
conventional VCR videos (videocassette recorder).

MPEG - 2

Offers resolutions of 720x480 and 1280x720 at 60 fps, with full


CD-quality audio. MPEG-2 is used by DVD-ROMs. MPEG-2 can
compress a 2 hour video into a few gigabytes. While decompressing
an MPEG-2 data stream requires only modest computing power,
encoding video in MPEG-2 format requires significantly more
processing power.

MPEG - 3

Was designed for HDTV but was abandoned in place of using


MPEG-2 for HDTV.

MPEG - 4

A graphics and video compression algorithm standard that is based


on MPEG-1 and MPEG-2 and Apple QuickTime technology. Waveletbased MPEG-4 files are smaller than JPEG or QuickTime files, so they
are designed to transmit video and images over a narrower
bandwidth /bng thng hp/and can mix video with text, graphics
and 2-D and 3-D animation layers.

MPEG - 7

Formally called theMultimedia Content Description Interface,


MPEG-7 provides a tool set for completely describing multimedia
content. MPEG-7 is designed to be generic and not targeted to a
specific application.

MPEG - 21

Includes aRights Expression Language(REL) and a Rights


Data Dictionary. Unlike other MPEG standards that describe
compression coding methods, MPEG-21 describes a standard that
defines the description of content and also processes for accessing,
searching, storing and protecting the copyrights of content.

Overview
HTTP Live Streaming
Server component

Taking input streams of media

Distribution component

Consists of standard web servers

Client software

Determining the appropriate


media to request

Encoding them digitally

Accepting client requests

Downloading those resources

Encapsulating them in a
format suitable for delivery

Delivering prepared media and


associated resources to the client

Reassembling them so that the


media can be presented to the
user in a continuous stream

Preparing the encapsulated


media for distribution

For large-scale distribution: Use


edge networks or other content
delivery networks

Server Components
- Takes a real-time signal from an audio-video device
- Encodes the media (H.264 video and HE-AAC audio )
- Encapsulates it for transport. (MPEG-2 Transport Streams for
audio-video, or MPEG elementary streams for audio-only).

Media
Encoder

- The encoder delivers the encoded media in an MPEG-2


Transport Stream over the local network to the stream segmenter.
- MPEG-2 transport streams should not be confused with MPEG-2
video compression.
- The transport stream is a packaging format that can be used
with a number of different compression formats.
- The video encoder should not change stream settingssuch
as video dimensions or codec typein the midst of encoding a
stream.
- If a stream settings change is unavoidable, the settings must
change at a segment boundary, and theEXT-XDISCONTINUITYtag must be set on the following segment.
- Is a process, which reads the Transport Stream from the local
network
- Divides it into a series of small media files of equal duration.

Server
Compone
nts

Stream
Segmen
ter

- Creates an index file containing references to the individual


media files.
- Each time the segmenter completes a new media file, the
index file is updated.
- The index is used to track the availability and location of the
media files.
- Encrypt each media segment and create a key file as part of
the process.
- Media segments are saved as.tsfiles (MPEG-2 transport stream
files).
- Index files are saved as.M3U8playlists.
- Encapsulate media file encoded in an MPEG-2 transport stream
- Break it into segments of equal length.

File
Segmen
ter

Allows you to use a library of existing audio and video files


(Streaming Kit,GPUImage, CTAssetsPickerController, ...)
for sending video on demand via HTTP Live Streaming.
The file segmenter performs the same tasks as the stream
segmenter, but it takes files as input instead of streams.

# H.246
H.264 is a next-generation video compression format. H.264 is also known as MPEG-4 AVC (Advanced Video Coding).
Developed for use in high definition systems such as HDTV, Blu-ray and HD DVD as well as low resolution portable
devices such as Sonys PSP and Apples iPod, H.264 offers better quality at lower file sizes than both MPEG-2 and
MPEG-4 ASP (DivX or XviD).
Apple has official adopted H.264 as the format for QuickTime. It is also one of the formats chosen to be supported by
both high definition DVD standards, and is destined to be the future standard format for Blu-ray. Even AVCHD, the
consumer format offered by the same people behind Blu-ray and for use in camcorders and Blu-ray recorders, uses H.264
as the main video format.

# Example
http://stackoverflow.com/questions/13088123/http-live-streaming-ext-x-discontinuity-tag-makes-allsegments-afterwards-only

Deploying HTTP
Live Streaming
Create either an
HTML page for
browsers or a
client app
(Receiver)

Configuring
/thit lp cu
hnh/ a Web
Server

Validating // Your
Streams

Serving Key Files


Securely Over
HTTPS

- You should always


run the validator
prior to serving a
new stream or
alternate stream
set.
- The media stream
validator shows a
listing of the
streams you
provide, followed by
the timing results
for each of those
streams.

Serving Key Files


Securely Over HTTPS
The file
Current
segmenter
recommenda It is possible
and stream
tions for
for an
Key files
segmenter
encrypting eavesdroppe
require an
both have
media while r to obtain
initialization
encryption
minimizing copies of the
vector (IV) to
options=>ca
overhead is
key files if
decode
n change the
to change
they are
encrypted
encryption
the key
sent over
media. The
key
every 3-4
HTTP
IVs can be
periodically.
hours and
=>send the
changed
Who you
change the
keys
periodically.
share the
IV after
securely
keys with is
every 50 Mb over HTTPS.
up to you.
of data.

There are three conditions you


must meet in order to use
HTTPS to serve keys for HTTP
Live Streaming:
You must
- Install an SSL certificate
obtain an
signed by a trusted authority on
SSL
your HTTPS server.
certificate
- The authentication domain for signed by a
trusted
the key files must be the same
authority in
as the authentication domain
order to use
for the first playlist file.
an HTTPS
- You must either initiate your
server with
own dialog for the user to
HTTP Live
authenticate, or you must store
Streaming.
the credentials on the client
deviceHTTP Live Streaming
does not provide user dialogs
for authentication.

Creating an HTML Page


<html>
<head>
<title>HTTPLiveStreamingExample</title>
</head>
<body>
<video

src="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
height="300"width="400"
>
</video>
</body>
</html>
EX fallback in html

http://code.tutsplus.com/tutorials/quick-tip-html5-video-with-a-fallback-to-flash--net-9982
MIME (Multi-Purpose Internet Mail Extensions) is an extension of the original Internet e-mail protocol that lets people
use the protocol to exchange different kinds of data files on the Internet: audio, video, images, application programs, and
other kinds, as well as the ASCII text handled in the original protocol, theSimple Mail Transfer Protocol(SMTP).

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support:

Text in character sets other than ASCII

Non-text attachments

Message bodies with multiple parts

Header information in non-ASCII character sets

File Extension

.M3U8

.ts

MIME Type
application/xmpegURL or
vnd.apple.mpegURL
video/MP2T

TTL (Time to live) l thi gian m nameserver khc c cp nht li, tnh theo giy. Mc nh l 86400 giy tc 24 gi.

You might also like