Converting a Raw g722 File to a .wav with SOX
Solution 1
As per my comment, SOX doesn't support g722.
I ended up creating my own converter using internal codec support within the company I work for. For this reason I can't release that version.
I then re-wrote it using the open source library NAudio.
You can find it here: https://github.com/shanepowell/G722Converter
You can download a compiled version here: https://github.com/shanepowell/G722Converter/releases/latest
It requries the .net framework v4.5 to be installed to run.
Solution 2
FFMPEG works well, but the suggested arguments do not work. I used:
ffmpeg -f g722 -i input.raw -acodec pcm_s16le -ar 16000 output.wav
Options applying to input files should precede the file name, using .wav
on the output file defines the format.
Solution 3
FFMPEG can do the job as well
ffmpeg -i g722_input_file.raw -f g722 -acodec pcm_s16le -ar 16000 out.pcm
Related videos on Youtube
Joel Lewis
Updated on September 18, 2022Comments
-
Joel Lewis over 1 year
I am trying to troubleshoot some VOIP issues, and have been capturing the packets for the trouble calls. However my calls are all encoded in g722 and I am having trouble decoding this.
I have extracted the RTP payload, and have it currently as a raw file. The only information I can find is this link:
https://ask.wireshark.org/questions/26607/coverting-g722-payload-to-wav
But I cant seem to figure out how to get the g722 raw to a usable wave file. Any points in the right direction would be helpful.
-
Shane Powell over 8 yearsI've been down the same track as well. What I found was that SOX doesn't support g722!! I ended up having to write my own converter :(
-
Joel Lewis over 8 years@ShanePowell Any chance you want to share with the world?
-