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

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%


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.

permanent link

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×31
×25

question asked: 26 Oct '12, 06:32

question was seen: 6,440 times

last updated: 29 Oct '12, 05:45

p​o​w​e​r​e​d by O​S​Q​A