How to convert AMR-WB to mp3

I faced a lot of difficulty in converting amr-wb codec in mp3, so I am adding that short and the easiest way in my pubic technical diary so that others can also get benefit from this. 

Take network traces on your media gateway or and the node which proxy RTP packets through tcpdump or tshark. I prefer using tcpdump

tcpdump -i any -s 0 -w amr-wb.pcap

Open amr-wb.pcap file using Wireshark


Go to Telephony --> RTP --> RTP Streams. 
 

Choose the RTP stream which you want to convert into an mp3 file.


 and click Analyze. Save synchronized stream audio.



Name the file and save the AMR-WB stream in raw format. 



now find an amr.py script from here or download. Open the terminal and execute the following command. 

$ python amr.py -w -v amr-wb.raw 
AMR-WB, bandwidth efficient, 1 channel(s)
Files: amr-wb.raw -> amr-wb.amr
Done, 1607 samples converted

This command will convert raw data to AMR format. now convert amr format to mp3 using ffmpeg library.

$ ffmpeg -i amr-wb.amr amr-wb.mp3
[amr @ 0x7fde98812800] Estimating duration from bitrate, this may be inaccurate
Input #0, amr, from 'amr-wb.amr':
  Duration: 00:00:32.14, bitrate: 23 kb/s
    Stream #0:0: Audio: amr_wb (sawb / 0x62776173), 16000 Hz, mono, flt
Stream mapping:
  Stream #0:0 -> #0:0 (amr_wb (amrwb) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'amr-wb.mp3':
  Metadata:
    TSSE            : Lavf58.45.100
    Stream #0:0: Audio: mp3 (libmp3lame), 16000 Hz, mono, fltp
    Metadata:
      encoder         : Lavc58.91.100 libmp3lame
size=      95kB time=00:00:32.15 bitrate=  24.1kbits/s speed= 207x    
video:0kB audio:94kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232775%

amr-wb.amr has been converted to amr-wb.mp3. You can listen to this file through any media player. 

Enjoy ;)

1 comment:


  1. This site have particular software articles which emits an impression of being a significant and significant for you individual, able software installation.This is the spot you can get helps for any software installation, usage and cracked.
    amr-to-mp3-converter-software-crak//

    ReplyDelete

How to compile and run a next application ?

Install nodejs Use  this  link for further reading curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash nvm inst...