This is a static archive of our old Q&A Site. Please post any new questions and answers at

pcap to au-file in command line


i wondering to know is there any way to convert a pcap file containing RTP packets to au-file in command line? I know i can do it with wireshark GUI but i m trying to write a script in python so i think i need to do that through command line.

asked 26 Oct '12, 06:32

reza's gravatar image

accept rate: 0%

One Answer:


I think there is no good way right now, at least not using tshark, which is usually the way to go for scripting. There is a similar question here:

Maybe the answer in that thread can help you, too.

answered 27 Oct '12, 02:58

Jasper's gravatar image

Jasper ♦♦
accept rate: 18%

thanks Jasper, i think Gstreamer might be the answer but the audio quality decreases after i convert the pcap to audio, may be i should change some parameters to get a better quality.

gst-launch-0.10 -m -v filesrc location=moh.pcap ! pcapparse src-port=40012 \ ! "application/x-rtp, payload=8" ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! avimux ! filesink

(Converted to a comment as per the format of Please see the FAQ).

(29 Oct '12, 05:35) reza