Howto:Convert wave files in to G722 coder files: Difference between revisions
m (→Examples) |
m (→Examples) |
||
Line 37: | Line 37: | ||
===Examples=== | ===Examples=== | ||
Conversion of a wav-sample into a g722-coded audio file | Conversion of a wav-sample into a g722-coded audio file (this is the only supported by innovaphone devices G722 codec at the moment) | ||
ffmpeg -i /tmp/sample.wav -ar 8000 -acodec g722 /tmp/sample.g722 | ffmpeg -i /tmp/sample.wav -ar 8000 -acodec g722 /tmp/sample.g722 | ||
Revision as of 17:47, 16 January 2014
Applies To
This information applies to
- All innovaphone gateways (IP302, IP305, IP800, IP30x0, IP60x0) Version 9 and later.
More Information
Problem Details
As mentioned in the related article, softcod is used for conversion of WAV files to G711/G723/G729 formatted files.
When aiming for the new G722 and G722.2 (AMR-N/AMR-WB) codecs, softcod does not fit.
Therefore, another commandline tool called ffmpeg can be used.
At the ffmpeg-builds site you will find different variants for your appropriate Windows OS version (tests have been done with "static" build).
Usage
After successful download and installation, the following commands can be used to convert any wav-files:
- Step to the directory where you've installed ffmpeg, step down to the subdirectory bin.
- The command line format is:
ffmpeg -i <inputfile>.wav -ar <sampling rate> -ab <bitrate> -acodec <codec> <outputfile>
- Explanation:
- <inputfile> : location and filename of the standard wave file
- <sampling rate> : set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. Possible values would be 8000 / 16000
- <codec> : "g722" for G722, "libopencore_amrnb" for G722.2 AMR-NB, "libvo_amrwbenc" for G722.2 AMR-WB
- <bitrate> : set bitrate (in bits/s) depending on the used G722.2-codec
- for G722.2 AMR-NB : 4.75k, 5.15k, 5.90k, 6.70k, 7.40k, 7.95k, 10.20k, 12.20k (default)
- for G722.2 AMR-WB : 6.60k, 8.85k, 12.65k, 14.25k, 15.85k, 18.25k, 19.85k, 23.05k, 23.85k (default)
- <outputfile> : name and optional location of the resultfile
Examples
Conversion of a wav-sample into a g722-coded audio file (this is the only supported by innovaphone devices G722 codec at the moment)
ffmpeg -i /tmp/sample.wav -ar 8000 -acodec g722 /tmp/sample.g722
Conversion of a wav-sample into a g722.2 AMR-NB-coded audio file
ffmpeg -i /tmp/sample.wav -ar 8000 -ab 5.90k -acodec libopencore_amrnb /tmp/samplenb.amr
Conversion of a wav-sample into a g722.2 AMR-WB-coded audio file
ffmpeg -i /tmp/sample.wav -ar 16000 -ab 19.85k -acodec libvo_amrwbenc /tmp/samplewb.amr
Known Problems
Related Information
Howto:Installing_the_voicemail/music_on_hold_on_a_compact_flash_card
Howto:General_information_for_compact_flash_cards