ubuntu9.10 Install OpenSER and use RTP Proxy to realize turn, solve the problem that symmetric NAT brings to SIP voice communication
Reprinted from Link http://hi.baidu.com/zj8la8la/blog/item/d700d8b2c11a41abd9335af9.html
Leave a note, convenient other people, online resources are not complete, I do a complete bar, at least I test through:My goal is very simple, just realize the SIP network MySQL database support.Start: Set the domain name
* If your
1 EVRC
Protocol Evolution: 3558->4788->5188
EVRC0 net charge format see 3558
EVRC-WB net charge format see 5188
EVRC codec algorithm based on loose code excitation linear prediction (RCELP) algorithm, with linear pre-and error control functions, EVRC family of various codes see the following diagram:
2 Multi-frame format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
sent to the UDP: // 233.233.233.223: 6666 address.
ffmpeg -re -i chunwan.h264 -vcodec mpeg2video -f mpeg2video udp://233.233.233.223:6666
1.4. Play the MPEG2 bare stream
Specify-vcodec as mpeg2video.
ffplay -vcodec mpeg2video udp://233.233.233.223:6666
2. rtp2.1. send the H.264 bare stream to the multicast address.
The following command sends the H.264 raw stream "Chunwan. h264" to the address RTP: // 233.233.233.223: 264
ffmpeg -re -i chunwan.h26
Today, I found a strange problem. I can call the SIP client of the lower computer by using the Linphone client of the upper computer to work normally, but in turn there is a problem. Packet Capture found that Linphone sent a large number of IP fragmentation data packets, so google knows that when the data found is larger than MTU, it will generate IP fragmentation data packets. I have already split the RTP package? This should not happen normally.
Lin
RTP encapsulation of H.264 (lower)
3. RTP encapsulation implementation
3.1 encapsulation Flowchart
4. RTP solution encapsulation implementation
4.1 Flowchart
5. Summary
Hope you are correct!
6. References
[1] schuzrinne H, casner S, Frederick R, et al. rfc3550 RTP: A transport protocol for r
3.1Three additional packages: Android. Hardware. USB, Android. MTP, and android.net. RTP!
USB, MTP, RTP------- There are three words, all bloody, so people are excited and excited. Why don't you get started with Google?
Android. MTP
Allow connected camera and other devices to directly use PTP (image transfer protocol) MTP (Media transfer protocol ).
Keep the device connected. The upper-layer app can rec
3.1Three additional packages: Android. Hardware. USB, Android. MTP, and android.net. RTP!
USB, MTP, RTP------- There are three words, all bloody, so people are excited and excited. Why don't you get started with Google?
Android. MTP
Allow connected camera and other devices to directly use PTP (image transfer protocol) MTP (Media transfer protocol ).
Keep the device connected. The upper-layer app can rec
There are three different basic loads (single Nal, non-interleaved, interleaved) in RTP of h264)
The application can use the first byte for recognition.
The properties of this session are also described in SDP.
SDP parameters
The following describes how to represent an H.264 stream in SDP:
. "M =" the media name in the row must be "video"
. The encoding name in the "A = rtpmap" line must be "h264 ".
. The clock frequency in the "A = rtpmap" row must
Real-time audio and video domain UDP is the king
In the Internet, audio and video real-time interaction using the Transport Layer Scheme has TCP (such as: RTMP) and UDP (such as: RTP) two kinds. The TCP protocol can provide a relatively reliable guarantee for data transmission between two endpoints, which is achieved through a handshake mechanism. When the data is passed to the receiver, the receiver checks the correctness of the data. The sender can
I wrote an article earlierArticleAnalysis of the format of using RTP for h264 packets: RTP encapsulation of h264. However, it seems that the split and some situations that need attention are not clearly stated, so here we will make a supplement and also serve as our own memo (I don't seem to have a good memory ).
note that the sampling rate of h264 is 90000Hz, so the unit of the timestamp is 1 (s
RTCP RTP protocol format analysis 6: RTCP Sender reportThe sender report consists of three parts, and the fourth part may be extended. Part 1: Header, 8 bytes long, version: 2 bits, RTP version identifier. This version in the RTCP package has the same meaning as that in the RTP package, generally 2 p: fill bit, 1 bit. If set, there are several fill bits at the e
RTCP RTP protocol format Analysis 1: The task of sequential RTCP is to provide feedback on the delivery quality of the data streams transmitted over RTP, such as packet loss rate, jitter, bandwidth, and rate; when it is detected that the quality is poor, it will make some adjustments based on its own settings when the next packet is sent to achieve optimization. This process is not reflected by the recipie
following command reads the data from the local camera, encoded as MPEG2, and sent to the UDP: // 233.233.233.223: 6666 address.
[Plain]View plaincopy
FFmpeg-Re-I Chunwan. h264-vcodec mpeg2video-F mpeg2video UDP: // 233.233.233.223: 6666
1.4. Play the MPEG2 bare stream
Specify-vcodec as mpeg2video.
[Plain]View plaincopy
Ffplay-vcodec mpeg2video UDP: // 233.233.233.223: 6666
2. rtp2.1. send the H.264 bare stream to the multicast address.
The following command sends the H.264 raw stream "Chun
I have written an article "converting FLV stream to standard h264 and ACC in rtmp", link address
Http://www.cnblogs.com/chef/archive/2012/07/18/2597279.html
. The extraction of h264 from rtmp is analyzed.
In flash projects with audio/video interaction, the audio encoding can only be in speex format.
This articleArticleIt is divided into three parts. These are the audio interfaces provided in flex, The speex data in rtmp, and how to convert them to RT
I have been searching for this problem online for a long time. It may take about two weeks. After a large number of searches and searches, I have finally made some progress. Although I still don't understand the principle, I can finally see it. The next step is to make a deeper research, but today we are going to post the receipt, although very few, but it is also a summary of myself. Of course, we would also like to thank our predecessors and Friends of the video forum for their selfless dedica
1. Set the RTSP port number
The RTSP port number is set in the artspconnection. cpp file. First, obtain the port number from the URL. If the port number cannot be read, set it to the default port 554. Code processing is as follows:
Artspconnection: parseurl (const char * colonpos = strchr (host-> c_str (), ':'); If (colonpos! = NULL) {unsigned long X; If (! Parsesingleunsignedlong (colonpos + 1, x) | x> = 65536) {// the RTSP port must be less than 65536 return false;} * Port = X; size_t colonof
media file that needs to be described, defines the type of description that the client understands, and requires the server to describe the media information in the SDP package rtsp/1.0 OK Cseq:3 date:wed, Mar 07 2012 03:48:0 7 GMT content-base:rtsp://222.201.145.236/slamtv60.264/ CONTENT-TYPE:APPLICATION/SDP Content-Length: 527
The first part resolves: this is the message sent back by the server in response to the describe request. The above description describes the specific path and n
In the RTP protocol, the source of the ssrc,synchronization source is defined as the RTP packet stream, and the ssrc identifier of the 32-bit value in the RTP header is identified so that it does not depend on the network address. Usually the change of microphone, audio interface, camera, video interface will lead to SSRC changes.In Opal and OpenH323, when the ss
The raw stream data obtained from h264 is. Generally, the bitstream structure is SPS, PPS, I frame, P frame ...... SPS, PPS, I frame, P frame ............ When we use RTP to package h264 data, SPS and PPS can directly send I and P frames without sending them. It also depends on the size of I frame and P frame. If it is smaller than MTU, it can be sent directly with the RTP package. If it is larger than MTU,
Payload Structure:
+ ——————— + ———————-+ ————————————
| Payload Header | Table of Contents | Speech data ....
+ ——————— + ———————-+ ————————————-
Payload Header:
0 1 2 3
+–+–+–+–+
| CMR |
+–+–+–+–+
CMR: (4 bits)
Don't know what to do with ~ ~
Can be replaced with the Nal_unit_type in the NAL head completely
Table of Contents:
0 1 2 3 4 5
+–+–+–+–+–+–+
| F | FT | Q |
+–+–+–+–+–+–+
F: (1 bit)
If the frame is the last frame of this RTP packet, then
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.