Archive for the ‘ffmpeg’ Category

capture an audio stream

December 19, 2007

mplayer -playlist <stream> -ao pcm:file=mystream.wav -vc dummy -vo null

i.e.

mplayer -playlist http://www.bbc.co.uk/radio4/realplayer/media/fmg2.ram -ao pcm:file=mystream.wav -vc dummy -vo null

How to Convert .FLV Files to MPG or MP3

December 15, 2007

If you have ffmpeg and lame installed, you can easily convert flash video files (.flv) such as youtube videos to mpeg or mp3 files. Ok, in case you don’t know where these videos are stored. Firefox has a Cache directory. Under In Linux, you have a good chance of finding it under .mozilla/firefox/=somealphanumeric=.default/Cache This is where the Flash videos are usually stored. They won’t have the .flv ending though! To convert an flv file to mp3, use ffmpeg. I guess, you will also need lame in order to encode mp3 correctly, ffmpeg has tons of options. I used i (inputfile), ar (sample rate), ab (audio bitrate) and ac (audio channels).

Note: In more receent ffmpeg version you might need to add an extra “k” for kilobyte, e.g. “-ab 160k

[chris@hismachine:~]$ ffmpeg -i flashvideo.flv -ar 44100 -ab 160k -ac 2 output.mp3

In order to convert an flv file to mpeg, you can use something like this.

[chris@hismachine:~]$ ffmpeg -i flashvideo.flv -s 352x288 -b 512 -ab 128 output.mpg

The options here are s (size) and b (video bitrate). Play around with ffmpeg’s options and try different bitrates etc. However, bear in mind that if the input video is bad quality then the output won’t be any better 😉