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

pcap to au-file in command line

0

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

reza
1224
accept rate: 0%


One Answer:

1

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:

http://ask.wireshark.org/questions/10493/can-tshark-extract-voice-data-from-an-rtp-stream

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

answered 27 Oct '12, 02:58

Jasper's gravatar image

Jasper ♦♦
23.8k551284
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 location=test1audio2.au

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

(29 Oct '12, 05:35) reza