annotate doc/RTP-analysis @ 2:210dfa39f573

rtp-gsmfr-extr: support new TRAUlike RTP payload format
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 16 Apr 2023 04:18:14 +0000
parents 05ff0f7ac977
children 5216e7fb1c9e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The present package includes a number of utilities for analyzing RTP streams
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 that have been captured with tcpdump or equivalent tools in pcap format. In
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 order to use any of these utilities, you need to have a pcap file (obviously),
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 and you need to identify the RTP stream to be analyzed or extracted by either
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 source or destination IP:port. All tools begin by applying a filter,
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 considering only those packets that are UDP in IPv4 (no IPv6 support currently),
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 and only those that match the specified source or destination IP:port. Every
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 matched packet is checked for a valid RTP header, and then the actual RTP stream
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 analysis or extraction takes place, depending on the specific tool:
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 rtp-cont-check This program checks the selected RTP stream for continuity. It
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 verifies that every matched packet has the same SSRC, that the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 sequence number always increments by 1 from each individual
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 packet to the next, and that the RTP header timestamp always
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 increments by 160 units. (The assumption is that the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 application at hand is in the traditional telephony domain,
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 with a sampling rate of 8000 samples/s and 20 ms packetization
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 for RTP.) This tool also looks at the capture time deltas
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 between successive packets and reports the observed minimum and
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 maximum; by seeing min and max delta-T, a developer can easily
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 notice timing aberrations that aren't caught by RTP header
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 sequence number and timestamp checks.
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 rtp-g711-extr This program focuses on a single selected RTP stream like the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 others, enforces its continuity just like rtp-cont-check, and
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 then further enforces that every RTP packet be a 160-byte
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 payload, presumed to be either PCMU or PCMA. (The payload type
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 number is NOT considered, only the payload length.) The
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 selected G.711 RTP stream is then extracted and written into a
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 raw binary file.
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 rtp-gsmfr-extr This program focuses on a single selected RTP stream like the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 others, enforces its continuity just like rtp-cont-check, but
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 then further enforces that every RTP packet be one of these 3
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 possibilities: a GSM FR1 codec frame, a GSM EFR codec frame or
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 a Themyscira BFI marker as defined in the RTP-BFI-extension
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 document. (The payload type number is NOT considered, only the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 payload length and the characteristic signature of each of the
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 3 allowed possibilities.) The selected RTP stream is then
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 extracted and written into a gsmx file (see Binary-file-format),
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 which can then be analyzed with gsmrec-dump or decoded to
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 playable WAV with gsmfr-decode or gsmefr-decode.
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 rtp-jitter-view This program analyzes a single selected RTP stream just like
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 rtp-cont-check, but instead of reporting minimum and maximum
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 time deltas for the entire stream, it prints the individual
05ff0f7ac977 initial commit: split from gsm-codec-lib
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 capture time delta between every successive pair of packets.