Using tshark to extract wav from voip call

asked 2020-03-02 13:02:42 +0000

voiping gravatar image

I see several command line scripts and old code (that I can't compile) for extracting audio from a PCAP. (, pcap2wav, rtp-break)

I've had issues with some of those and they are not particularly maintained.

However, it seems that the wireshark gui (which is actively maintained) can sufficiently extract an AU file of the audio (which sox should be able to convert). E.g. basic instructions of:

Highlight the RTP Line within Wireshark. Selected Telephony menu item> Select RTP drop down menu item> Select RTP Streams menu item> Highlight both Streams (To/From)> Select Analyze> Select Save> Select Audio> Save as .AU file.

How would I do that with tshark from the CLI? I'm assuming that the wireshark gui is mostly a wrapper around tshark. (Also asked here.)

The closest I see available is tshark -r rtp.pcap -q -z rtp,streams which only gives you stats on each stream.

edit retag flag offensive close merge delete


Chuckc gravatar imageChuckc ( 2020-03-02 13:28:45 +0000 )edit