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
common ground:
1: RTSP RTMP HTTP is all at the application layer.
2: In theory, RTSP rtmphttp can be used for live broadcast and on-demand, but RTSP RTMP is generally used for live broadcast and HTTP for on demand. SIP protocol was used in video conference, and now it is basically replaced by RTMP.
difference:
Copy code
1: Http: that is, hypertext transfer protocol (FTP is file transfer protocol).
Http: (real time streaming protocol), real time streaming protocol.
HTTP full name routing table maintenance protocol.
2: HTTP processes all data as files. The HTTP protocol is not a streaming protocol.
RTMP and RTSP are streaming media protocols.
3: RTMP protocol is a private agreement of adobe, which is not fully disclosed. RTSP protocol and HTTP protocol are common agreements and have special organizations to maintain.
4: RTMP protocol generally transmits flv, f4v format stream, RTSP protocol generally transmits ts, MP4 format stream. HTTP does not have a specific stream.
5: RTSP transmission generally requires 2-3 channels, command and data channel separation, HTTP and RTMP generally transfer commands and data on one channel of TCP.
Copy code
Differences between RTSP, RTCP and RTP
Copy code
1: RTSP real time flow protocol
As an application layer protocol, RTSP provides an extensible framework, which makes it possible to control and on demand streaming data in real time. In general, RTSP is a streaming media representation protocol, which is mainly used to control the data transmission with real-time characteristics, but it does not transmit data itself, but must rely on some services provided by the lower layer transport protocol. RTSP can provide operations such as playback, pause, fast forward and so on for streaming media. It is responsible for defining specific control messages, operation methods, status codes, etc., and also describes the interaction with RTP (rfc2326).
2: RTCP control protocol
RTCP control protocol needs to be used with RTP data protocol. When an application starts an RTP session, it will occupy two ports at the same time, which are used by RTP and RTCP respectively. RTP itself can not provide reliable guarantee for sequential transmission of data packets, nor provide traffic control and congestion control, which are all completed by RTCP. Generally, RTCP will use the same distribution mechanism as RTP, send control information to all members of the session periodically. The application can control the service quality or diagnose the network condition by receiving the data, obtaining the relevant information of the session participants, as well as the network status, packet loss probability and other feedback information.
The function of RTCP protocol is realized by different RTCP datagrams, which are mainly of the following types:
SR: the sender report refers to the application or terminal that sends RTP data report, and the sender can also be the receiver. (server fixed time sent to client).
RR: the receiving end reports. The so-called receiving end refers to the application or terminal that only receives but does not send RTP data reports. (server receives the response sent by the client side).
SDEs: source description, the main function is to serve as the carrier of the identification information of session members, such as user name, email address, telephone number, etc., and also has the function of conveying session control information to session members.
Bye: notification leaves. The main function is to indicate that one or more sources are no longer valid, that is, other members in the notification session will exit the session themselves.
App: defined by the application itself, it solves the problem of RTCP scalability and provides a lot of flexibility for the implementers of the protocol.
3: RTP data protocol
RTP data protocol is responsible for packet streaming media data and real-time transmission of media stream. Each RTP data packet consists of two parts: head and load. The first 12 bytes of the head are fixed, while the load can be audio or video data.
The place used by RTP is play. The server uses UDP protocol to transmit data to the client. RTP adds a 12 byte header (description information) to the front of the data transmission.
RTP load package design the network transmission in this paper is based on IP protocol, so the maximum transmission unit (MTU) is 1500 bytes. When using the IP / UDP / RTP protocol hierarchy, this includes at least 20 bytes of IP header, 8-byte UDP header and 12 byte RTP header. Thus, the header information takes at least 40 bytes, and the maximum size of RTP load is 1460 bytes. Take H264 as an example, if a frame data is greater than 1460, it needs to be packed in pieces, then unpacked at the receiver, and then combined into a frame of data for decoding and playback.
Copy code
In live application, RTMP and HLS can basically cover all client watching,
HLS is mainly with large delay, and RTMP has the main advantage in low delay.
1、 Application scenarios
Low delay application scenarios include:
Copy code
Interactive live broadcast: for example, the popular beauty anchor in 2013, the live game, etc
Various hosts, streaming media are distributed to users for viewing. Users can chat with text and interact with the host.
Video conference: if we have colleagues traveling in the field, we will use video conference to hold internal meetings.
In fact, it doesn't matter if the meeting is delayed for one second, because after someone else has finished speaking, others need to think about it,
The time delay of thinking will also be about 1 second. Of course, if you quarrel with a video conference, you can't.
. other: monitoring and live broadcasting also require delay in some places,
The delay of RTMP protocol on the Internet can basically meet the requirements.
Copy code
2、 RTMP and delay
1. the characteristics of RTMP are as follows:
Copy code
1) Adobe supports well:
RTMP is actually the industrial standard protocol for encoder output, basically all encoders (cameras and so on) support RTMP output.
The reason is that the PC market is huge, the PC is mainly windows, and windows browsers basically support flash,
Flash also supports RTMP very well.
2) Suitable for long play:
Because RTMP supports very well, it can achieve flash playing RTMP stream for a long time and continuously,
The test was one million seconds, or more than 10 days of continuous playback.
For commercial streaming media applications, the stability of the client is certainly necessary, otherwise, end-users can not see how to play?
I knew that there was an education client who initially played HTTP streams with players, and needed to play different files, and there was always a problem,
If the server side converts different files into RTMP stream, the client can play all the time;
After the client went to RTMP scheme, he didn't hear that the client had a problem after being distributed by CDN.
3) Low delay:
RTMP is much delayed (1-3 seconds) than the YY type of UDP private protocol,
RTMP is lower than the HTTP stream delay (generally more than 10 seconds).
As long as the general live broadcast application is not the kind of telephone conversation, RTMP delay is acceptable.
In general video conferencing applications, RTMP latency is acceptable because we listen to others when they talk,
In fact, one second delay doesn't matter, and we have to think about it (some people don't have the CPU processing speed so fast yet).
4) Cumulative delay:
The technology must know the weakness. The weakness of RTMP is cumulative error, because RTMP does not lose packets based on TCP.
So when the network state is poor, the server will cache the packets, which leads to the cumulative delay;
When the network is in good condition, send it to the client together.
The solution is to disconnect the reconnection when the client buffer is large.
Copy code
2. HLS low delay
Some people always ask this question, how to reduce the HLS delay.
HLS solves the delay, just like climbing to the maple tree to catch fish. Strangely, there are still people shouting, look, there are fish.
What do you say?
I can only say you are participating in the magic show of modesty, illusion.
If you are really sure, please show it with the actual measurement picture, refer to the measurement delayed below.
3. measurement of RTMP delay
How to measure the delay is a difficult problem,
But there is an effective way to use the stopwatch of the mobile phone, which can compare the delay more accurately.
It is found that when the network is in good condition, the following measures are found:
Copy code
. RTMP delay can be about 0.8 seconds.
. the multi-level edge node does not affect the delay (edge server of a CDN homologous with SRS can do it)
. nginx RTMP delay is a bit large. It is estimated that cache processing is caused by multi process communication?
. GOP is a hard indicator, but SRS can turn off cache of GOP to avoid this effect
. the server performance is too low, which will also cause the delay to become larger, and the server can not send data.
. the buffer length of the client also affects latency.
For example, flash client NetStream.bufferTime Set to 10 seconds, then delay for at least 10 seconds.
Copy code
4. GOP-Cache
What is GOP? Is the time distance between the two I frames in the video stream.
What is the impact of GOP?
Flash (decoder) can only start decoding and playing until it gets GOP.
That is, the server usually gives flash an I frame first.
Unfortunately, the problem is, suppose GOP is 10 seconds, that is, every 10 seconds there are keyframes,
What if the user starts playing in the fifth second?
The first solution: wait for the next frame I,
That is, wait another 5 seconds to start giving the client data.
This delay is very low, always real-time flow.
The problem is: the 5 seconds that wait will be black. The phenomenon is that the player is stuck there, nothing,
Some users may think they are dead and refresh the page.
In short, some customers will think waiting for keyframes is an unforgivable error. What is the relationship between delay?
I just want to start and play video quickly, and I'd better open it and play it!
The second solution: start now,
What do you put?
You must know. Put the previous I frame.
That is, the server needs to always cache a GOP,
So the client will play the previous I frame and start quickly.
The problem is: delays are naturally large.
Is there a good plan?
yes! There are at least two types:
The encoder lowers GOP, such as 0.5 seconds, a GOP, so the delay is low and there is no need to wait.
The disadvantage is that the encoder compression rate will be reduced, and the image quality is not so good.
5. cumulative delay
In addition to GOP cache, there is a relationship, cumulative latency.
The server can configure the length of live queue, and the server will put the data in the live queue,
If you exceed this length, clear to the last I frame:
Of course, this can't be configured too small,
GOP, for example, is one second, queue_ Length is one second, which will cause data to be cleared in 1 second and jump.
There's a better way? yes , we have.
Delay is basically equal to the buffer length of the client. Because the delay is mostly due to low network bandwidth, the server will send it to the client together after caching. The phenomenon is that the buffer of the client is larger,
for example NetStream.BufferLength=5 Second, then there is at least 5 seconds of data in the buffer.
The best way to deal with cumulative latency is that the client detects that the buffer has a lot of data, and if it can, reconnect the server.
Of course, if the network has been bad, there is no way.
|
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