【转】SDP file
2016-05-17 16:42
28 查看
SDP file
Introduction
The Session Description Protocol (SDP) is a format for describing the initialization parameters of streaming media sessions. SDP does not deliver media itself but is used for negotiation between end points of media type, format, and all associated properties.To connect to a streaming server sending an MPEG2 transport stream, you don't usually have to use an SDP file since it's more convenient to use direct pseudo-URIs like:
rtp://{Streaming_Server_IP}:{Port}
udp://{Streaming_Server_IP}:{Port}
Nevertheless, when more control over the parameters of the stream are required, an SDP description file may be used instead. The SDP file can be located on the HMP or on a remote server. To include an SDP file inside your project, set the URI of a media layer to:
my_sdp_file.sdp (if the SDP file is located into the root of your project) or http://my_server/my_sdp_file.sdp (if the SDP file is located on a remote server).
The following are supported:
SDP that refers to an MPEG2TS via RTP or UDP (all valid codecs for use in an MPEG-2 TS are supported: MPEG 1/2/4/H264);
SDP that refers to a raw bitstream of MPEG 1/2/4/H264.
See also the supported attributes section for ways to overwrite the HMP default behaviour.
SDP file syntax
A session is described by a series of<character>=<value>fields (one per line), where
<character>is a single case-significant character and
<value>is structured text whose format depends upon the first one. For more details about this subject, see Session description section on the Wikipedia site.
Sample:
v=0 o=- 1 1 IN IP4 <your.domain.name> s=Anonymous c=IN IP4 <streaming_server_ip> t=0 0 m=video <streaming_port> <streaming_format> <payload>
where:
<streaming_server_ip> is usually a multicast address (for instance 239.192.1.21).
<streaming_port> should be above 1024 (for instance 5000).
<streaming_format> is either UDP (or direct streaming over UDP) or RTP/AVP (for a transport stream inside RTP packets).
<payload>有效负荷,负载数据类型,具体类型数值见附录1
Supported attributes
The following session attributes are supported by the HMP:a=audioPid:<audio_pid>Selection of the audio PID.
a=program:<program_number>Selection of the program number
a=videoPid:<video_pid>Selection of the video PID.
Notes:
To find out the possible values for
<program_number>,
<videoPid>and / or
<audioPid>, first connect to the streaming server without specifying any attribute and then open the resources.log to retrieve the values returned by the streaming server.
The
audioPidand
videoPidattributes were introduced in firmware version 2.2.5 to replace the deprecated
exterityVideoPidand
exterityAudioPidattributes (which are no longer supported).
附录1:payload数值定义
PT | Encoding Name | Audio/Video (A/V) | Clock Rate (Hz) | Channels | Reference |
---|---|---|---|---|---|
0 | PCMU | A | 8000 | 1 | [RFC3551] |
1 | Reserved | ||||
2 | Reserved | ||||
3 | GSM | A | 8000 | 1 | [RFC3551] |
4 | G723 | A | 8000 | 1 | [Vineet_Kumar][RFC3551] |
5 | DVI4 | A | 8000 | 1 | [RFC3551] |
6 | DVI4 | A | 16000 | 1 | [RFC3551] |
7 | LPC | A | 8000 | 1 | [RFC3551] |
8 | PCMA | A | 8000 | 1 | [RFC3551] |
9 | G722 | A | 8000 | 1 | [RFC3551] |
10 | L16 | A | 44100 | 2 | [RFC3551] |
11 | L16 | A | 44100 | 1 | [RFC3551] |
12 | QCELP | A | 8000 | 1 | [RFC3551] |
13 | CN | A | 8000 | 1 | [RFC3389] |
14 | MPA | A | 90000 | [RFC3551][RFC2250] | |
15 | G728 | A | 8000 | 1 | [RFC3551] |
16 | DVI4 | A | 11025 | 1 | [Joseph_Di_Pol] |
17 | DVI4 | A | 22050 | 1 | [Joseph_Di_Pol] |
18 | G729 | A | 8000 | 1 | [RFC3551] |
19 | Reserved | A | |||
20 | Unassigned | A | |||
21 | Unassigned | A | |||
22 | Unassigned | A | |||
23 | Unassigned | A | |||
24 | Unassigned | V | |||
25 | CelB | V | 90000 | [RFC2029] | |
26 | JPEG | V | 90000 | [RFC2435] | |
27 | Unassigned | V | |||
28 | nv | V | 90000 | [RFC3551] | |
29 | Unassigned | V | |||
30 | Unassigned | V | |||
31 | H261 | V | 90000 | [RFC4587] | |
32 | MPV | V | 90000 | [RFC2250] | |
33 | MP2T | AV | 90000 | [RFC2250] | |
34 | H263 | V | 90000 | [Chunrong_Zhu] | |
35-71 | Unassigned | ? | |||
72-76 | Reserved for RTCP conflict avoidance | [RFC3551] | |||
77-95 | Unassigned | ? | |||
96-127 | dynamic | ? | [RFC3551] |
http://support.spinetix.com/wiki/SDP_file http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml
相关文章推荐
- Linux内存使用调整
- Nginx linux服务搭建
- 为table添加滚动条
- java学习个人笔记---静态内部类
- 软件的版本标志
- Hadoop应用——Map端Join操作
- 学习Qt的资源-网站、论坛、博客等(必看)
- POJ - 3252 Round Numbers (数位dp&位运算)
- Xamarin.Forms 获取IP地址
- JAVA设计模式(10):结构型-组合模式(Composite)
- 多个条件判断二进制的简化
- 2016/5/16
- activiti简介
- Android双击退出
- SpringMVC POST乱码和restful
- Java小程序:对混杂的字母,按字典顺序输出
- linux 发送邮件
- iOS GCD
- leetcode 66---Plus One 进位 数组
- Git使用介绍