Write the output in the given format, which is one
of the following: dump
,
header
, payload
,
ascii
, hex
,
rtcp
, short
.
The dump
format is a binary format
suitable as input for
rtpplay(1).
The generated output file should have a .rtp
filename extension. 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 RD_hdr_t
header 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. The structures are as follows:
typedef struct {
struct timeval start; /* start of recording (GMT) */
uint32_t source; /* network source (multicast) */
uint16_t port; /* UDP port */
} RD_hdr_t;
typedef struct {
uint16_t length; /* length of original packet, including header */
uint16_t plen; /* actual header+payload length for RTP, 0 for RTCP */
uint32_t offset; /* ms since the start of recording */
} RD_packet_t;
The header
format is like
dump
, but does not save the audio/video payload.
The payload
format only saves the audio/video
payload.
The ascii
format, which is the
default, saves text parsed packets, suitable for
rtpsend(1).
See below for an example. The hex
format is like
ascii
, but with a hex dump of the payload. The
rtcp
format is like
ascii
, but only saves RTCP packets.
The short
format dumps RTP or VAT data
in lines such as
[-
]time
timestamp [seq]
where ‘-
’ indicates a
set marker bit, time is the arrival time,
timestamp is the RTP timestamp, and
seq is the RTP sequence number (only used for RTP
packets).