convert audio encoding format with ffmpeg
June 30th, 2007 mysurface Posted in ffmpeg, Misc | Hits: 74818 | 4 Comments »
ffmpeg is a very powerful tools, as it is a general tool for audio/video encoding and decoding as well as ripper, converter and even provided API for programmers. I came across a tutorial uses ffmpeg libs for writting a video player less than 1000 lines of codes, which is cool.
I have one time needed to convert a wave file from one encoding format to another because the stream servers at mobile back-end switch only plays wav with a-law encoding format. I have no idea what format is a-law (an ITU standards encoding audio format) at first, and it doesn’t matter. First check the wav file’s encoding info with command call file.
file amazing_grace.wav
The outcomes is this:
amazing_grace.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz
The target wav must be in this format. So, first of all I would like to check whether is it support a-law encoding?
ffmpeg -formats
Bare in mind, encoder and decoder is not always come in pair, ffmpeg may sometimes only support for decoding but not encoding.
DEA pcm_alaw
D - Decoder, E - Encoder and A is audio. Apparently it does support for a-law. So, let us convert it with ffmpeg.
ffmpeg -i imaging.wav -acodec pcm_alaw -ar 8000 imaging1.wav
-i is input file, -ar is audio rate in Hz. Just a slides of time, and you are done. And good thing about command line is you can put that into a bash script to do a batch converts.







June 30th, 2007 at 4:58 pm
[...] Yahoo Link to Article youtube convert audio encoding format with ffmpeg » Posted at Linux By Examples – We explain every GNU/Linux command line by examples on Saturday, June 30, 2007 ffmpeg is a very powerful tools, as it is a general tool for audio/video encoding and decoding as well as ripper, … get to know this command because my mplayer having problem playing flv downloaded from youtube. Therefore View Entire Article » [...]
July 12th, 2007 at 8:10 am
This Week on the Command Line: Lieutenant Worf’s favourite distro is?…
I was at the LugradioLive 2007 conference this last weekend which was fab, see here for my take on it.
I am famous, well no, but at the end of the JakAttack podcast 55 [ogg | mp3], they read out my email, rock on!
This post is another of my occasional…
May 24th, 2010 at 10:02 am
Not that I would want to make too easy on you guys but you could try http://www.oggconvert.com =)
all online,
December 7th, 2010 at 12:24 am
Get baby possesses ongoing studying music, heard some of the objects this guy provided that and made and heard he has been with Denver a few years prior to he kicked the bucket. I believed it truly is excellent in stun items son with another thing because of that check out.