Convert FLV video to MP3 audio

Printer-friendly versionPrinter-friendly version
flv - /> mp3

Many times we download a song we like from YouTube, or other sites, as a FLV video. But how to convert it to a regulare audio-only MP3 file? Here is a nice solution I found on the net, using FFMPEG.

The syntax of the command is:

ffmpeg [[infile options][-i infile]]... {[outfile options] outfile}

So, to convert a flv video to mp3, we could use something like:

ffmpeg -i filename.flv -acodec mp3 -ac 2 -ab 128 -vn -y filename.mp3
-i filename
Specifies the input file name
-ac 2
Specifies the number of audio channels to use
-ab 128
Specifies the audio bitrate (in k). For youtube videos, 64 is enough.
-vn
Disables video recording.
-y
Overwrites output file.
-f fmt
Force format.
-metadata key=value
Set a metadata key/value pair.

You could also use:

ffmpeg -i filename.flv

to see informations on the input file, before converting it

ffmpeg -filters

to see all available codecs/filters

Bibliography/Links

Extracting an MP3 From a YouTube Flash (FLV) Download
A nice post I found on the youtube-to-mp3 topic I've found
http://vixy.net/
An online FLV-to-* converter, that should enable direct-download from youtube videos.

Who Am I?

~redShadow~ A.K.A. Samuele Santi is an Italian Open Source developer, currently working as a freelance developer, mainly in the web applications sector. Favourite programming languages: PHP and, of course, Python!

documentation (2) cartoons (1) contact manager (1) arduino (1) 3d (3) address book (2) caos (1) code (3) C++ (2) camera mia (1) como lake rovers (1) blogroll (7) circuits (1) doku (1) Drupal (21) archive (1) debian (1) citroen (1) dmcrypt (1) awstats (3) cocktails (1) aoe (1) development (11) backup (3) database (3) Drupal Forms (1) aircrack (1) alcool (1) apt (1) audio (1) e-mail (2) bash (11) cryptography (1) 2v (1) debug (1) blender (3) curl (1) algorythms (1) cars (1) apache (1)