RTP Tools (Version 1.20)

https://wiki.wireshark.org/RTP_statistics

Here is a small example:

  • Install JMF (JMstudio is included)
  • Download rtptools
  • Open the RTP capture file with Wireshark
  • Select the proper UDP and force its decoding as RTP: Menu Analyze >> Decode As... RTP.

  • Menu Statistics(Wireshark 1.0) or Telephony >> RTP >> Show all streams. Select the one of your interest, and press button Save As... into a "rtpdump" formatted file.

  • Start JMstudio
  • Menu File >> Open RTP Session and insert your local IP address (it didn't work with 127.0.0.1 for me) like this:

  • Press button "Open" - now JMstudio waits for the stream
  • Open a terminal and type:
  user@host$ rtpplay -T -f /path/to/your/captured.rtpdump 192.168.0.23/1234

You should now hear what you've captured. Note:JMstudio does not support every codec, but some commonly used for RTP (worked perfect for me to listen to a captured kphone-session using GSM as codec).

Description

The rtptools distribution consists of a number of small applications that can be used for processing RTP data.

rtpplay
Play back RTP sessions recorded by rtpdump
rtpsend
Generate RTP packets from textual description, generated by hand or rtpdump
rtpdump
Parse and print RTP packets, generating output files suitable for rtpplay and rtpsend
rtptrans
RTP translator between unicast and multicast networks; also translates between VAT and RTP formats.

Installation

Sources for a variety of platforms and binaries for Windows are available from http://www.cs.columbia.edu/IRT/rtptools/download.

The RTP tools should compile on any Posix-compliant platform supporting sockets, as well as Windows/NT/95/98/2000 (Win32). They have been tested on SunOS 4.1, SunOS 5.x (Solaris), Linux, NT 4.0, SGI Irix, and HP-UX. Edit the directories and libraries at the top of Makefile and type make. The compiler must support ANSI C: gcc does, Sun's old /usr/ucb/cc does not.

Note: You must use the sun4 architecture for SunOS 4.1.x and sun5 for SunOS 5.x (Solaris). You will get system call errors if you do not.

For Unix systems, type
./configure; make
To install RTP tools on WIN32 machine, please follow the following steps:
*.dsp files are project files. *.dsw file and workspace file. 
User can open the workspace file and use 'batch compile' to compile all the projects.
  1. In Visual C++ 6.0, open workspace file rtptools.dsw.
  2. In VC menu Build, use Batch Build to build all the tools.
  3. All the rtptools will be created under "debug\" directory.

For quite a character, who desire to compile on Borland C++ Builder, please open dump_bcb.bpr, play_bcb.bpr, send_bcb.bpr and trans_bcb.bpr under bcb directory. Only pressing ctr-F9 needed for compilation, and the tool will be generated on the same directory.

General Usage Hints

Network addresses can be either multicast or unicast addresses, unless stated otherwise. They may be specified in dotted-decimal notation (e.g., 224.2.0.1) or as a host name (e.g., lupus.fokus.gmd.de). Port numbers must be given as decimal numbers in the range of 1 to 65535. Network addresses are specified as destination/port/ttl. The time-to-live (ttl) value is optional and only applies to multicast.

For all commands, the flag -h or -? will print a short usage summary.

Unless otherwise noted, input is taken from stdin, and output sent to stdout. The extension .rtp is suggested for files generated in rtpdump -F dump format.

rtpplay

rtpplay [-T] [-v] [-f file] [-p profile] [-s sourceport] [-b begin] [-e enddestination/port[/ttl]

rtpplay reads RTP session data, recorded by rtpdump -F dump from either the file or stdin, if file is not specified, sending it to network address destination and port port with a time-to-live value of ttl.

If the flag -T is given, the timing between packets corresponds to the arrival timing rather than the RTP timestamps. Otherwise, for RTP data packets, the timing given by the RTP timestamps is used, smoothing interarrival jitter and restoring packet sequence. RTCP packets are still sent with their original timing. This may cause the relative order of RTP and RTCP packets to be changed.

The source port(localport) for outgoing packets can be set with the -s flag. A random port is chosen if this flag is not specified.

The whole file is played unless the begin or end times are specified. Times are measured in seconds and fractions from the beginning of the recording.

The RTP clock frequency is read from the profile file if given; the default profile (RFC 1890) is used if not. The profile file contains lines with two fields each: the first is the numeric payload type, the second the clock frequency. The values read from the profile file are silently ignored if the -T flag is used.

If you want to loop a particular file, it is easiest to put the rtpplay command in a shell script.

The -v flag has rtpplay display the packets generated on stdout.

rtpplay uses the hsearch (3C) library, which may not be available on all operating systems.

rtpdump

rtpdump [-F format] [-t duration] [-x bytes] [-f file] [-o outputfileaddress/port

rtpdump listens on the address and port pair for RTP and RTCP packets and dumps a processed version to outputfile if specified or stdout otherwise.

If file is specified, the file is used instead of the network address. If no network address is given, file input is expected from stdin. The file must have been recorded using the rtpdump dump format.

The recording duration is measured in minutes.

From each packet, only the first bytes of the payload are dumped (only applicable for "dump" and "hex" formats).

Supported formats are:

format text/binary description
dump binary dump in binary format, suitable for rtpplay. The format is as follows: The file starts with#!rtpplay1.0 address/port\n

The version number indicates the file format version, not the version of RTP tools used to generate the file. The current file format version is 1.0.

This is followed by one binary header (RD_hdr_t) and one RD_packet_t structure for each received packet. All fields are in network byte order. The RTP and RTCP packets are recorded as-is.

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;
header like "dump", but don't save audio/video payload
payload only audio/video payload
ascii text parsed packets (default), suitable for rtpsend:

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=0x124e2b58
844525628.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" )
)
hex like ascii, but with hex dump of payload
rtcp like ascii, but only RTCP packets
short RTP or vat data in tabular form: [-]time ts [seq], where a - indicates a set marker bit. The sequence number seq is only used for RTP packets.

844525727.800600 954849217 30667
844525727.837188 954849537 30668
844525727.877249 954849857 30669
844525727.922518 954850177 30670

rtpsend

rtpsend sends an RTP packet stream with configurable parameters. This is intended to test RTP features. The RTP or RTCP headers are read from a file, generated by hand, a test program or rtpdump (format "ascii").

rtpsend [-a] [-l] [-s sourceport] [-f filedestination/port[/ttl]

Packets are sent with a time-to-live value ttl.

If data is read from a file instead of stdin, the -l(loop) flag resends the same sequence of packets again and again.

The source port(localport) for outgoing packets can be set with the -s flag. A random port is chosen if this flag is not specified.

If the -a flag is specified, rtpsend includes a router alert IP option in RTCP packets. This is used by the YESSIR resource reservation protoccol.

The file file contains the description of the packets to be sent. Within the file, each entry starts with a time value, in seconds, relative to the beginning of the trace. The time value must appear at the beginning of a line, without white space. Within an RTP or RTCP packet description, parameters may appear in any order, without white space around the equal sign. Lines are continued with initial white space on the next line. Comment lines start with #. Strings are enclosed in quotation marks.

<time> RTP
v=<version>
p=<padding>
x=<extension>
m=<marker>
pt=<payload type>
ts=<time stamp>
seq=<sequence number>
ssrc=<SSRC>
cc=<CSRC count>
csrc=<CSRC>
data=<hex payload>
ext_type=<type of extension>
ext_len=<length of extension header>
ext_data=<hex extension data>
len=<packet size in bytes(including header)>
<time> RTCP (SDES v=<version>
(src=<source> cname="..." name="...")
(src=<source> ...)
)
(SR v=<version>
ssrc=<SSRC of data source>
p=<padding>
count=<number of sources>
len=<length>
ntp=<NTP timestamp>
psent=<packet sent>
osent=<octets sent>
(ssrc=<SSRC of source>
fraction=<loss fraction>
lost=<number lost>
last_seq=<last sequence number>
jit=<jitter>
lsr=<last SR received>
dlsr=<delay since last SR>
)
)

rtptrans

rtptrans [host]/port[/ttl] [host]/port[/ttl] [...]

rtptrans RTP/RTCP packets arriving from one of the addresses to all other addresses. Addresses can be a multicast or unicast. TTL values for unicast addresses are ignored. (Actually, doesn't check whether packets are RTP or not.)

Additionally, the translator can translate VAT packets into RTP packets. VAT control packets are translated into RTCP SDES packets with a CNAME and a NAME entry. However, this is only intended to be used in the following configuration: VAT packets arriving on a multicast connection are translated into RTP and sent over a unicast link. RTP packets are not (yet) translated into VAT packets and and all packets arriving on unicast links are not changed at all. Therefore, currently mainly the following topology is supported: multicast VAT -> translator -> unicast RTP; and on the way back it should lokk like this multicast VAT <- translator <- unicast VAT. This means that the audio agent on the unicast link should be able use both VAT and RTP.

Authors

The rtptools were written by Henning Schulzrinne, with enhancements by Ping Pan and Akira Tsukamoto. rtptrans was written by Dorgham Sisalem and enhanced by Steve Casner.

RTP Tools的更多相关文章

  1. A Study of WebRTC Security

    转自:http://webrtc-security.github.io/ A Study of WebRTC Security Abstract Web Real-Time Communication ...

  2. VOIP开源项目源码地址

    http://blog.csdn.net/hwz119/article/details/1781482     VoIP bookmarks from Klaus Darilion Below you ...

  3. 自己动手写RTP服务器——关于RTP协议

    转自:http://blog.csdn.net/baby313/article/details/7353605 本文会带领着你一步步动手实现一个简单的RTP传输服务器,旨在了解RTP流媒体传输协议以及 ...

  4. 【NS2仿真】RTP协议安装

    来自: http://personales.upv.es/fboronat/Research/NS2_RTP/NS2_RTP_RTCP_module.htm 文件:http://pan.baidu.c ...

  5. H.264视频的RTP荷载格式

    Status of This Memo This document specifies an Internet standards track protocol for the   Internet ...

  6. 自己写RTPserver——大约RTP协议

    自己写RTPserver--大约RTP协议 本文将带领你一步一步地实现一个简单的手RTP变速器server,旨在了解RTP流媒体传输协议以及有关多媒体编解码器的一些知识. RTP协议的必备知识 要动手 ...

  7. rtp header

    rtp协议基于udp传输,流媒体音视频数据被封装在rtp中,通过rtp协议进行实时的传输. 一.rtp协议头格式 The RTP header has a minimum size of 12 byt ...

  8. 流媒体协议之RTP详解20170921

    1.RTP介绍 实时传输协议RTP(Real-time Transport Protocol)是一个网络传输协议,它是由IETF的多媒体传输工作小组1996年在RFC 1889中公布的,后在RFC35 ...

  9. RTP协议学习

    RTP协议是承载在UDP协议之上的应用协议 http://blog.csdn.net/chen495810242/article/details/39207305 http://blog.51cto. ...

随机推荐

  1. Excel Application对象应用

    Application对象是Excel对象模型中最高层级的对象,代表Excel应用程序自身,也包含组成工作簿的许多部分,包括工作簿.工作表.单元格集合以及它们包含的数据. Application对象包 ...

  2. 日期(date)运用座谈会

    前言 最近老被小伙伴戳:其实这些都是些很基础的东西,一边完善工具类:一边整理一下关于date的常见运用:以后使用起来就不需要到处去找了:争取做到想要的这儿都有. 正文 private static f ...

  3. utf-8 长度

    作者:实现链接:https://www.zhihu.com/question/30945431/answer/91316302来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出 ...

  4. phonegap安卓视频播放解决方案

    使用phonegap开发的时候,视频播放很多人一开始选择用html5的Video标签作为备选方案,实际上这种方案在真实环境下常常是无法满足需求的,因为目前HTML5的Video标签只支持MP4,OGG ...

  5. 手机发送验证码—.net代码

    注册过程中,短信发送验证码流程如下: (1).用户提交手机号码,申请湖区验证码 (2).网站按照预制规则生成验证码 (3).网站将用户手机号码和验证码发送到短信平台 (4).将制定内容发送到制定手机号 ...

  6. UML整体概括

    UML (Unified Modeling Language)为面向对象软件设计提供统一的.标准的.可视化的建模语言.适用于描述以用例为驱动,以体系结构为中心的软件设计的全过程. UML的定义包括UM ...

  7. 【UOJ #131】【NOI 2015】品酒大会

    http://uoj.ac/problem/131 求出后缀数组和height数组后,从大到小扫相似度进行合并,每次相当于合并两个紧挨着的区间. 合并区间可以用并查集来实现,每个区间的信息都记录在这个 ...

  8. 【枚举】Petrozavodsk Summer Training Camp 2016 Day 6: Warsaw U Contest, XVI Open Cup Onsite, Sunday, August 28, 2016 Problem G. Equation

    f(n)定义为n的十进制表示下所有位的平方和. 问你方程K*f(n)=n在a<=n<=b中的解的个数. 发现f(n)最大不超过2000,可以直接枚举f(n),然后判断K*f(n)的位的平方 ...

  9. Leveldb源码解析之Bloom Filter

    Bloom Filter,即布隆过滤器,是一种空间效率很高的随机数据结构. 原理:开辟m个bit位数组的空间,并全部置零,使用k个哈希函数将元素映射到数组中,相应位置1.如下图,元素K通过哈希函数h1 ...

  10. C++ Any 任意基础类型封装

    下面是本人使用C++封装的一个针对任意基础类型以及用户自定义类型指针的通用类型.目的是为方便常用类型使用统一化及便利化.该类型的使用就与平时使用基础类型基本没什么差别.具体可参看以下代码及测试代码. ...