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 |
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: 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 ♦♦ |
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).