📄 rtptools.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><title>RTP Tools 1.9</title><meta name="author" content="Henning Schulzrinne"><meta name="keywords" content="RTP; rtptools; debugging"></head><body bgcolor="#38B0DE"><h1>RTP Tools (Version 1.9)</h1><h2>Description</h2><p>The rtptools distribution consists of a number of small applicationsthat can be used for processing <ahref="http://www.cs.columbia.edu/~hgs/rtp">RTP</a> data.<dl><dt><samp><a href="#rtpplay">rtpplay</a></samp><dd>Play back RTP sessions recorded by <samp><ahref="#rtpdump">rtpdump</a></samp><dt><samp><a href="#rtpsend">rtpsend</a></samp><dd>Generate RTP packets from textual description, generated by handor <samp><a href="#rtpdump">rtpdump</a></samp><dt><samp><a href="#rtpdump">rtpdump</a></samp><dd>Parse and print RTP packets, generating output files suitable for<samp><a href="#rtpplay">rtpplay</a></samp> and <samp><ahref="#rtpsend">rtpsend</a></samp><dt><samp><a href="#rtptrans">rtptrans</a></samp><dd>RTP translator between unicast and multicast networks; alsotranslates between VAT and RTP formats.</dl><h2><a name="installation">Installation</a></h2><p>The RTP tools are available from: <ahref="ftp://ftp.cs.columbia.edu/pub/schulzrinne/rtptools/">ftp://ftp.cs.columbia.edu/pub/schulzrinne/rtptools</a><p>The RTP tools should compile on any Posix-compliant platformsupporting sockets. They have been tested on SunOS 4.1, SunOS 5.x(Solaris), SGI Irix, and HP-UX. Edit the directories and libraries atthe top of <samp>Makefile</samp> and type <kbd>make</kbd>. The compilermust support ANSI C: <samp>gcc</samp> does, Sun <samp>cc</samp> doesnot.<p><em>Note</em>: You must use the <code>sun4</code> architecture forSunOS 4.1.x and <code>sun5</code> for SunOS 5.x (Solaris). You will getsystem call errors if you do not.<h2><a name="usage">General Usage Hints</a></h2><p>Network addresses can be either multicast or unicast addresses,unless stated otherwise. They may be specified in dotted-decimalnotation (e.g., 224.2.0.1) or as a host name (e.g.,<samp>lupus.fokus.gmd.de</samp>). Port numbers must be given as decimalnumbers in the range of 1 to 65535. Network addresses are specified as<var>destination/port/ttl</var>. The time-to-live (ttl) value isoptional and only applies to multicast. <p>For all commands, the flag<samp>-h</samp> or <samp>-?</samp> will print a short usage summary.<p>Unless otherwise noted, input is taken from stdin, and output sent tostdout. The extension <code>.rtp</code> is suggested for filesgenerated in <code>rtpdump -F dump</code> format.<h2><a name="rtpplay">rtpplay</a></h2><samp>rtpplay</samp> [-T] [-v] [-f file] [-p profile]<var>destination/port/[ttl]</var><p><samp>rtpplay</samp> reads RTP session data, recorded by<samp>rtpdump -F dump</samp> from either the <var>file</var> or stdin,if <var>file</var> is not specified, sending it to network address<var>destination</var> and port <var>port</var> with a time-to-livevalue of <var>ttl</var>. If the flag <code>-T</code> is given, thetiming between packets corresponds to the arrival timing rather than theRTP timestamps. Otherwise, for RTP data packets, the timing given bythe RTP timestamps is used, smoothing interarrival jitter and restoringpacket sequence. RTCP packets are still sent with their originaltiming. This may cause the relative order of RTP and RTCP packets to bechanged. <p>The RTP clock frequency is read from the <var>profile</var> file ifgiven; the default profile (RFC 1890) is used if not. The profile filecontains lines with two fields each: the first is the numeric payloadtype, the second the clock frequency. The values read from the profilefile are silently ignored if the <code>-T</code> flag is used.<p>If you want to loop a particular file, it is easiest to put the<code>rtpplay</code> command in a shell script. <p>The <samp>-v</samp> flag has rtpplay display the packets generated onstdout.<p><code>rtpplay</code> uses the <code>hsearch (3C)</code> library,which may not be available on all operating systems.<h2><a name="rtpdump">rtpdump</a></h2><samp>rtpdump</samp> -F <var>format</var> -t <var>duration</var> -x<var>bytes</var> -f <var>file</var> <var>address/port</var><p><sample>rtpdump</samp> listens on the <var>address</var> and<var>port</var> pair for RTP and RTCP packets and dumps a processedversion to stdout. If <var>file</var> is specified, that is usedinstead. If no network address is given, file input is expected fromstdin. The file must have been recorded using the rtpdump<code>dump</code> format. Supported <var>formats</var> are:<table border=1><tr><th><samp>format</samp><th>text/binary<th>description<tr><td><samp>dump</samp><td rowspan=3>binary<td>dump in binary format, suitable for <ahref="#rtpplay">rtpplay</a>. The format is as follows:The file starts with<center><code>#!rtpplay1.0</code> <var>address</var>/<var>port</var>\n</center><p>The version number indicates the file format version, not the versionof RTP tools used to generate the file. The current file format versionis 1.0.<p>This is followed by one binary header (<tt>RD_hdr_t</tt>) and one<tt>RD_packet_t</tt> structure for each received packet. All fields arein network byte order. The RTP and RTCP packets are recorded as-is.<pre>typedef struct { struct timeval start; /* start of recording (GMT) */ u_int32 source; /* network source (multicast address) */ u_int16 port; /* UDP port */} RD_hdr_t;typedef struct { u_int16 length; /* length of packet, including this header (may be smaller than plen if not whole packet recorded) */ u_int16 plen; /* actual header+payload length for RTP, 0 for RTCP */ u_int32 offset; /* milliseconds since the start of recording */} RD_packet_t;</pre><tr><td><samp>header</samp><td>like "dump", but don't save audio/video payload<tr><td><samp>payload</samp><td>only audio/video payload<tr><td><samp>ascii</samp><td rowspan=4>text<td>parsed packets (default), suitable for <code><ahref="#rtpsend">rtpsend</a></code>:<br><pre>844525628.240592 RTP len=176 from=131.136.234.103:46196 v=2 p=0 x=0 cc=0 m=0 pt=5 (IDVI,1,8000) seq=28178 ts=954052737 ssrc=0x124e2b58844525628.243123 RTCP len=128 from=139.88.27.43:53154 (RR ssrc=0x125bd36f p=0 count=1 len=7(ssrc=bc64b658 fraction=0.503906 lost=4291428375 last_seq=308007791 jit=17987961 lsr=2003335488 dlsr=825440558) ) (SDES p=0 count=1 len=23 (src=0x125bd36f CNAME="yywhy@139.88.27.43" NAME="Michael Baldizzi (NASA LeRC)" TOOL="vat-4.0a8" EMAIL="mbaldizzi@lerc.nasa.gov" ) )</pre><tr><td><samp>hex</samp><td>like <samp>ascii</samp>, but with hex dump of payload<tr><td><samp>rtcp</samp><td>like <samp>ascii</samp>, but only RTCP packets<tr><td><samp>short</samp><td>RTP or vat data in tabular form: <var>[-]time ts [seq]</var>,where a - indicates a set marker bit. The sequence number<var>seq</var> is only used for RTP packets.<pre>844525727.800600 954849217 30667844525727.837188 954849537 30668844525727.877249 954849857 30669844525727.922518 954850177 30670</pre></table><p>The <var>duration</var> is measured in minutes. From each packet,only the first <var>bytes</var> of the payload are dumped (onlyapplicable for "dump" and "hex" formats).<h2><a name="rtpsend">rtpsend</a></h2><p>rtpsend sends an RTP packet stream with configurable parameters. Thisis intended to test RTP features. The RTP or RTCP headers are readfrom a file, generated by hand, a test program or <ahref="#rtpdump">rtpdump</a> (format "header").<p><samp>rtpsend [-l]</samp> [-t<var>ttl</var>] [-f <var>file</var>]<var>destination/port</var><p>Packets are sent with a time-to-live value <var>ttl</var>. If data isread from a <var>file</var>, the <samp>-l</samp> (loop) flag resendsthe same sequence of packets again and again.<p>Parameters may appear in any order, without white space around theequal sign. Lines are continued with initial white space on the nextline. Comment lines start with #. strings are enclosed in quotationmarks.<pre><time> RTP v=<version> m=<marker> pt=<payload type> ts=<time stamp> seq=<sequence number> cc=<CSRC count> data=<hex payload><time> RTCP (SDES v=<version> (src=<source> cname="..." name="...") (src=<source> ...) ) (RR v=<version> )</pre><h2><a name="rtptrans">rtptrans</a></h2><samp>rtptrans</samp> <var>host/port[/ttl]</var><var>host/port[/ttl]</var> [...]<p>rtptrans RTP/RTCP packets arriving from one of the addresses to allother addresses. Addresses can be a multicast or unicast. TTL valuesfor unicast addresses are ignored. (Actually, doesn't check whetherpackets are RTP or not.)<p>Additionally, the translator can translate VAT packets into RTPpackets. VAT control packets are translated into RTCP SDES packets witha CNAME and a NAME entry. However, this is only intended to be used inthe following configuration: VAT packets arriving on a multicastconnection are translated into RTP and sent over a unicast link. RTPpackets are not (yet) translated into VAT packets and and all packetsarriving on unicast links are not changed at all. Therefore, currentlymainly the following topology is supported: multicast VAT -> translator-> unicast RTP; and on the way back it should lokk like this multicastVAT <- translator <- unicast VAT. This means that the audio agent onthe unicast link should be able use both VAT and RTP.<h2>Authors</h2><p>The rtptools were written by <ahref="http://www.cs.columbia.edu/~hgs">Henning Schulzrinne</a>. rtptrans was written by <a href="mailto:sisalem@fokus.gmd.de">DorghamSisalem</a> and enhanced by <a href="mailto:casner@precept.com">SteveCasner</a>.<hr><a href="CHANGES.html">Program history</a><hr><p>Last modified 1997-08-08 by <ahref="http://www.cs.columbia.edu/~hgs/">Henning Schulzrinne</a><br> <ahref=mailto:schulzrinne@cs.columbia.edu">schulzrinne@cs.columbia.edu</a></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -