Monday, May 15, 2017

Capture and playback AMR packets - wireshark

This is an extremely useful tool found came in handy while integration AMR codec into a system.
To give a basic usage of this, Application sends the encoded frames to the other end and in the middle, AMR frames can be captured and played back. Below is the basic steps as its s described in the git page.

Filter packets of interest (e.g. by 'rtp')
Telephony -> RTP -> Stream analysis
Save -> Forward/Reverse stream audio, Save as type (*.raw)
Guess information about AMR format: AMR vs AMR-WB, octet-align vs bandwidth efficient, number of channels (e.g. from SIP signalization, RTP layer) and provide them to amr.py.

python amr.py -a -n 1 -v -w wb_amr_3.raw

the above command decodes the stream from the wireshark row file and output as wav file. If the file is playing correctly, then done!

amr.py -a -n 1 -v wb_amr_3.raw

references:
https://github.com/suma12/amr

2 comments:

  1. Hey Guys, If any one need for a converter for one file to another file then use this;

    Solo File Converter

    ReplyDelete