FMUSER Wirless Transmit Video And Audio More Easier !
es.fmuser.org
it.fmuser.org
fr.fmuser.org
de.fmuser.org
af.fmuser.org ->Afrikaans
sq.fmuser.org ->Albanian
ar.fmuser.org ->Arabic
hy.fmuser.org ->Armenian
az.fmuser.org ->Azerbaijani
eu.fmuser.org ->Basque
be.fmuser.org ->Belarusian
bg.fmuser.org ->Bulgarian
ca.fmuser.org ->Catalan
zh-CN.fmuser.org ->Chinese (Simplified)
zh-TW.fmuser.org ->Chinese (Traditional)
hr.fmuser.org ->Croatian
cs.fmuser.org ->Czech
da.fmuser.org ->Danish
nl.fmuser.org ->Dutch
et.fmuser.org ->Estonian
tl.fmuser.org ->Filipino
fi.fmuser.org ->Finnish
fr.fmuser.org ->French
gl.fmuser.org ->Galician
ka.fmuser.org ->Georgian
de.fmuser.org ->German
el.fmuser.org ->Greek
ht.fmuser.org ->Haitian Creole
iw.fmuser.org ->Hebrew
hi.fmuser.org ->Hindi
hu.fmuser.org ->Hungarian
is.fmuser.org ->Icelandic
id.fmuser.org ->Indonesian
ga.fmuser.org ->Irish
it.fmuser.org ->Italian
ja.fmuser.org ->Japanese
ko.fmuser.org ->Korean
lv.fmuser.org ->Latvian
lt.fmuser.org ->Lithuanian
mk.fmuser.org ->Macedonian
ms.fmuser.org ->Malay
mt.fmuser.org ->Maltese
no.fmuser.org ->Norwegian
fa.fmuser.org ->Persian
pl.fmuser.org ->Polish
pt.fmuser.org ->Portuguese
ro.fmuser.org ->Romanian
ru.fmuser.org ->Russian
sr.fmuser.org ->Serbian
sk.fmuser.org ->Slovak
sl.fmuser.org ->Slovenian
es.fmuser.org ->Spanish
sw.fmuser.org ->Swahili
sv.fmuser.org ->Swedish
th.fmuser.org ->Thai
tr.fmuser.org ->Turkish
uk.fmuser.org ->Ukrainian
ur.fmuser.org ->Urdu
vi.fmuser.org ->Vietnamese
cy.fmuser.org ->Welsh
yi.fmuser.org ->Yiddish
1. What is HLS
HTTP Live Streaming (abbreviated as HLS) is an HTTP-based streaming media network transmission protocol proposed by Apple. Is part of Apple's QuickTime X and iPhone software systems. It works by dividing the entire stream into small HTTP-based files to download, and downloading only a few at a time. When the media stream is playing, the client can choose to download the same resource at different rates from many different alternate sources, allowing the streaming media session to adapt to different data rates.
When starting a streaming media session, the client downloads an extended M3U (m3u8) playlist file containing metadata to find available media streams. HLS only requests basic HTTP messages. Unlike Real Time Transport Protocol (RTP), HLS can pass through any firewall or proxy server that allows HTTP data to pass. It is also easy to use a content distribution network to transmit media streams.
RTMP refers to Adobe's RTMP (Realtime Message Protocol), which is widely used in low-latency live broadcasts. It is also the actual standard protocol for connecting encoders and servers. It has the best viewing experience and best stability on PC (Flash).
HLS refers to Apple's HLS (Http Live Streaming), which is Live (live), but Vod (on-demand) can also support it. HLS is the standard streaming media protocol of Apple platform, and it supports seamlessly as RTMP on PC.
Two, the main application scenarios of HLS
Cross-platform: The main live broadcast program for PC is RTMP, and there are also some libraries that can play HLS, such as jwplayer, and a lot of hls plugins based on osmf. So in fact, if you choose a protocol that can cross PC/Android/IOS, it is HLS.
Strict stability requirements on IOS: The most stable on IOS is of course HLS, and the stability is not worse than that of RTMP on PC-flash.
Friendly CDN distribution method: At present, CDN is also the basic protocol for RTMP, but the basis of HLS distribution is HTTP, so CDN access and distribution will be more complete than RTMP. It can switch between various CDNs and RTMP, but it may require docking testing.
Simple: HLS is very simple as a streaming media protocol, and Apple supports it very well. Android's support for HLS will become more and more perfect. As for DASH/HDS, there seems to be no special reason. Just as Linux has become popular and open, it is difficult for other systems to be widely used.
In short, SRS supports HLS mainly as an output distribution protocol, and live broadcasts are distributed with RTMP+HLS, covering various application scenarios. On-demand is mainly HLS.
3. Detailed explanation of HLS agreement
HLS is to provide an m3u8 address, Apple's Safari browser can directly open the m3u8 address, for example:
http://demo.srs.com/live/livestream.m3u8
1
Android cannot be opened directly, you need to use the html5 video tag, and then open this page in the browser, for example:
<video width="640" height="360"
autoplay controls autobuffer
src="http://demo.srs.com/live/livestream.m3u8"
type="application/vnd.apple.mpegurl">
</video>
1
2
3
4
5
6
HLS protocol regulations
The encapsulation format of the video is TS.
The video encoding format is H264, and the audio encoding format is MP3, AAC or AC-3.
In addition to the TS video file itself, an m3u8 file (text file) used to control playback is also defined.
HLS protocol description
The m3u8 of HLS is a list of ts, which tells the browser to play these ts files, for example:
EXTM3U
EXT-X-VERSION: 3
EXT-X-ALLOW-CACHE:YES
EXT-X-TARGETDURATION: 13
EXT-X-MEDIA-SEQUENCE:430
EXT-X-PLAYLIST-TYPE:VOD
EXTINF:11.800
news-430.ts
EXTINF:10.120
news-431.ts
EXT-X-DISCONTINUITY
EXTINF:11.952
news-430.ts
EXTINF:12.640
news-431.ts
EXTINF:11.160
news-432.ts
EXT-X-DISCONTINUITY
EXTINF:11.751
news-430.ts
EXTINF:2.040
news-431.ts
EXT-X-ENDLIST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
twenty one
twenty two
twenty three
EXTM3U
The first line of each M3U file must be this tag, which provides marking
EXT-X-VERSION
Used to mark the protocol version. Here is 3, so the third version of the HLS protocol is used here. There can only be 0 or 1 in this label. If you don’t write it, it means using version 1.
EXT-X-TARGETDURATION
The maximum duration of all slices. Some Apple devices cannot play if this parameter is incorrect.
EXT-X-MEDIA-SEQUENCE
The starting number of the slice. Each slice has a unique serial number, and the serial number between adjacent ones is +1. This number will continue to grow to ensure the continuity of the flow.
EXTINF
The actual duration of the ts slice. duration: media duration
EXTINF <duration>,<title>
1
EXT-X-PLAYLIST-TYPE
Type, vod means on-demand.
EXT-X-ENDLIST
End of file symbol. Indicates that no media files will be added to the playlist file.
Author: a little mean _yxwn
Link: https://www.jianshu.com/p/059c9cb29566
Source: Brief Book
The copyright belongs to the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
|
Enter email to get a surprise
es.fmuser.org
it.fmuser.org
fr.fmuser.org
de.fmuser.org
af.fmuser.org ->Afrikaans
sq.fmuser.org ->Albanian
ar.fmuser.org ->Arabic
hy.fmuser.org ->Armenian
az.fmuser.org ->Azerbaijani
eu.fmuser.org ->Basque
be.fmuser.org ->Belarusian
bg.fmuser.org ->Bulgarian
ca.fmuser.org ->Catalan
zh-CN.fmuser.org ->Chinese (Simplified)
zh-TW.fmuser.org ->Chinese (Traditional)
hr.fmuser.org ->Croatian
cs.fmuser.org ->Czech
da.fmuser.org ->Danish
nl.fmuser.org ->Dutch
et.fmuser.org ->Estonian
tl.fmuser.org ->Filipino
fi.fmuser.org ->Finnish
fr.fmuser.org ->French
gl.fmuser.org ->Galician
ka.fmuser.org ->Georgian
de.fmuser.org ->German
el.fmuser.org ->Greek
ht.fmuser.org ->Haitian Creole
iw.fmuser.org ->Hebrew
hi.fmuser.org ->Hindi
hu.fmuser.org ->Hungarian
is.fmuser.org ->Icelandic
id.fmuser.org ->Indonesian
ga.fmuser.org ->Irish
it.fmuser.org ->Italian
ja.fmuser.org ->Japanese
ko.fmuser.org ->Korean
lv.fmuser.org ->Latvian
lt.fmuser.org ->Lithuanian
mk.fmuser.org ->Macedonian
ms.fmuser.org ->Malay
mt.fmuser.org ->Maltese
no.fmuser.org ->Norwegian
fa.fmuser.org ->Persian
pl.fmuser.org ->Polish
pt.fmuser.org ->Portuguese
ro.fmuser.org ->Romanian
ru.fmuser.org ->Russian
sr.fmuser.org ->Serbian
sk.fmuser.org ->Slovak
sl.fmuser.org ->Slovenian
es.fmuser.org ->Spanish
sw.fmuser.org ->Swahili
sv.fmuser.org ->Swedish
th.fmuser.org ->Thai
tr.fmuser.org ->Turkish
uk.fmuser.org ->Ukrainian
ur.fmuser.org ->Urdu
vi.fmuser.org ->Vietnamese
cy.fmuser.org ->Welsh
yi.fmuser.org ->Yiddish
FMUSER Wirless Transmit Video And Audio More Easier !
Contact
Address:
No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620
Categories
Newsletter