Skip to content

Instantly share code, notes, and snippets.

@Haerezis
Created June 26, 2014 12:08
Show Gist options
  • Save Haerezis/18e3ffc2d69c86f8463f to your computer and use it in GitHub Desktop.
Save Haerezis/18e3ffc2d69c86f8463f to your computer and use it in GitHub Desktop.
rtpdump file format backup
rtpdump format :
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment