Testing with Wireshark
Before You Start
Download and install Wireshark.
Note: On Mac OS you might have to install XQuartz as well (X11 window system).
Starting Wireshark
Make sure to start it with appropriate permissions (admin/root accounts
usually have access to the network interfaces). Note: On Mac OS/Unix OS’s
you might have to grant read access to the network interfaces (e.g.
sudo chmod +r /dev/bpf*
works but has to be done after every OS restart) as
well, more info can be found here.
Capturing RTP streams
-
Select the network interface currently used for RTP traffic and start a capture.
-
Right click on any package in the capture view and select Decode as.
-
Make sure Both (src/dst port <> src/dst port) is selected in the drop-down menu.
-
On the right scroll down to and select RTP then click OK.
-
RTP packets should now be visible with SSRC details in the info column.
-
If Unknown RTP version 0 appears its most likely not a RTP packet.
-
If Unknown RTP version 1 appears it’s most likely RTP encapsulated in a TURN packet, see the Capturing TURN RTP streams section on how to capture them properly.
-
-
Go to the Telephony menu and select RTP then Show All Streams.
-
A popup window should appear with lots of RTP streams.
-
The RTP payload types indicate which codec is in use. For payload types between 96 and 128, they are assigned in the SDP negotiation setting up the RTP streams, but browsers typically have preferred values.
The ones we are interested in typically have a payload type 96 (VP8 in Chrome), 111 (Opus in Chrome) and 127 (VP8 with RED in Chrome). Firefox and Opera may have different payload types for VP8 etc.
- Sorting by number of packets is usually a good approach to filter out the relevant streams.
-
If an rtcdump file is desired select a stream and click Save As.
Capturing TURN RTP streams
-
First we need to enable the Try to decode RTP outside of conversations option.
-
In Wireshark press Shift+Ctrl+p to bring up the preferences window.
-
In the menu to the left, expand protocols.
-
Scroll down to RTP.
-
Check the Try to decode RTP outside of conversations checkbox.
-
Click OK.
-
-
Now perform the steps in Capturing RTP streams section but skip the Decode As steps (2-4).