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. The status quo
In the era of national live broadcast, anyone can pick up the device in their hands to broadcast live. The live broadcast brings jobs to a group of people, and brings huge benefits to major live broadcast platforms. It must have high quality in the face of a huge market. Only low-cost live broadcast technology can stand out from the competition and become a leader in the live broadcast industry. Five key processes of live video streaming: 1. Recording 2. Encoding 3. Network transmission 4. Decoding 5. Playback. Each of these links will affect the quality and delay time of the live broadcast. Below we will mainly talk about the third point of optimizing the delay.
The current live broadcast technology generally uses protocols such as RTMP, HLS, HDL (HTTP-FLV), and RTP. The most common protocol among these protocols is the rtmp protocol. Now many live broadcast platforms in China are still in use, and there is also HLS. It is also a very many agreement. Make some brief introductions to the above-mentioned agreements.
2. Agreement
(1) RTMP protocol
It is a patent agreement of Adobe, which is not supported by most foreign CDNs. Popularity in the country is very high. There are several reasons:
1) The support of open source software and open source libraries is stable and complete. For example, OBS software commonly used by Douyu anchors, open source librtmp library, and nginx-rtmp plug-in on the server side.
2) The installation rate of the player is high. As long as the browser supports FlashPlayer, RTMP live broadcast can be played very easily, and the detailed protocol can be understood by Google. Compared with other protocols, the handshake process is too complicated when the RTMP protocol establishes a connection for the first time (the bottom layer is based on TCP, here is the interaction of the RTMP protocol itself), depending on different network conditions, it will bring more than 100ms delay to the first opening. RTMP-based live broadcasts generally have a delay of 2 to 5 seconds.
(2) HTTP-FLV protocol
That is, use HTTP protocol to stream media content. Compared to RTMP, HTTP is simpler and well-known, and there is no fear of being kidnapped by Adobe's patents. The content delay can also be achieved for 2~5 seconds, and the opening speed is faster, because HTTP itself does not have complex state interaction. So from the perspective of latency, HTTP-FLV is better than RTMP.
(3) HLS agreement
HLS stands for Http Live Streaming, which is a streaming media transmission protocol based on HTTP proposed by Apple. HLS has a very big advantage: HTML5 can be opened and played directly; this means that a live link can be forwarded and shared through WeChat, etc., without installing any independent APP, just a browser, so it is very popular. Social live streaming APP, HLS can be said to be just needed, let's analyze its principles. To
The basic principle of HLS is that when the collection and push end pushes the video stream to the streaming media server, the server will buffer the received stream information into a new ts file every time it is cached for a period of time, and the server will create an m3u8 index file to Maintain the index of the latest ts fragments. When the player gets the live broadcast, it obtains the latest ts video file fragments from the m3u8 index file to play, so as to ensure that the user will see newer content whenever he connects in, realizing a similar live broadcast experience. Compared with common live streaming protocols, such as RTMP and RTSP, the biggest difference of HLS is that what the live broadcast client gets is not a complete data stream, but a continuous, short-duration media file. Download and play these small files. The theoretical minimum delay of this method is the duration of one ts file, and generally the duration of 2-3 ts files. HLS's segmentation strategy is basically recommended to be a segment of 10 seconds
(4) RTP protocol
RTP is Real-time Transport Protocol, a transport layer protocol for multimedia data streaming on the Internet. In actual application scenarios, RTCP (RTP Control Protocol) is often required to be used together. It can be simply understood as RTCP transmits interactive control signaling, and RTP transmits actual media data. To
RTP has a wide range of applications in video surveillance, video conferencing, and IP telephony, because an important experience in video conferencing and IP telephony: real-time content.
Compared with the above three or actually two protocols, there is an important difference between RTP and them that the default is to use UDP protocol to transmit data, while RTMP and HTTP are based on TCP protocol transmission. Why can UDP achieve such real-time effects? I searched a lot of articles about the analysis of the difference between TCP and UDP. I won’t repeat them here, but briefly summarize:
1) UDP: A single datagram, no need to establish a connection, simple, unreliable, packet loss, and disorder;
2) TCP: streaming, need to establish a connection, complex, reliable, and orderly. To
The scene of real-time audio and video streaming does not need to be reliably guaranteed, so there is no need to have a retransmission mechanism. Real-time viewing of images and sounds, some content lost when the network shakes, blurry and blurred screens are completely unimportant. TCP will cause delay and unsynchronization for retransmission. If a certain content is retransmitted and will arrive after 1 second, then the entire conversation will be delayed by 1 second. As the network jitters, the delay will increase to 2 seconds or 3 Seconds, if the client's playback is not processed, it will seriously affect the live broadcast experience. To
To sum up: In the choice of live broadcast protocol, if you choose RTMP or HTTP-FLV, it means that there is a content delay of 2~5 seconds, but when the delay is turned on, HTTP-FLV is better than RTMP. HLS has a content delay of 5-7 seconds. Selecting RTP for live broadcast can achieve a live broadcast delay within 1 second. But as far as I know, the major CDN manufacturers do not support RTP-based live broadcast, so the current domestic mainstream is still RTMP or HTTP-FLV, and there is also the emerging HLS.
(5) Comparison of HLS and RTMP
1) HLS
① Disadvantages of HLS:
Generally, the HLS live broadcast delay will reach 20-30s, and high delay is unacceptable for live broadcasts that require real-time interactive experience.
HLS is based on short connection HTTP, HTTP is based on TCP, which means that HLS needs to continuously establish a connection with the server. TCP three-way handshake every time a connection is established, slow start process, and four waves of hands when disconnecting will cause consumption .
② Advantages of HLS:
Data is transmitted via HTTP protocol, so there is no need to consider firewall or proxy issues when using HLS.
Using short-duration fragmented files for playback, the client can smoothly switch the bit rate to adapt to playback under different bandwidth conditions.
HLS is a streaming media protocol launched by Apple. It can be naturally supported on the iOS platform. It can be played directly by using the AVPlayer provided by the system, without having to develop a player by itself.
2) RTMP
Compared with HLS, when the RTMP protocol is adopted, it is a data stream from the collection and push end to the streaming media server and then to the playback end, so there will be no landing files on the server. In this way, RTMP has these advantages relatively:
① The delay is small, usually 1-3s.
② Based on TCP long connection, there is no need to establish a connection multiple times.
Therefore, most live broadcast services in the industry will choose RTMP as the streaming media protocol. Usually the data stream is encapsulated into FLV and provided through HTTP. However, there are some problems that need to be resolved:
① The iOS platform does not provide a player that natively supports RTMP or HTTP-FLV, which requires the development of a player that supports related protocols.
3.HLS delay optimization
The delay of hls is mainly composed of the following three parts:
(1) The time for the server-side encoder and stream splitter to generate TS files
(2) The time for the client to download the TS file, and usually requires two TS media files to be downloaded
(3) Client decode and play time
|
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