[wplug] ripping mp3 audio track from video (flv)

Robert E. Coutch vze57qmg at verizon.net
Tue Feb 17 10:28:14 EST 2009


On Monday 16 February 2009 02:21:07 pm Brian Sammon wrote:
> So I have a .flv file I downloaded from youtube.  I'd like to pull the
> audio track from it, which is already mp3-encoded, to put on my audio-only
> mp3 player.
>
> Does anyone know of any tools for doing this other than playing the video
> and re-encoding the output?  It seems to me that this should be a really
> quick operation if I find a program that doesn't re-encode the data.
>
> My first guess was the ffmpeg program, but I can't really tell whether it
> does the re-encoding thing, and in general, I'm a bit overwhelmed by its
> hundreds of commandline options.
>
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug

Be careful with the other suggestions given.

While they will play on players such as MPLAYER, they may not work on other 
players.

The reason is because they are audio stored in a video container (file).

To make a true MP3 you not only need the audio encoded to mp3 but the 
container (file) needs to be a proper mp3 file. Not just a renamed movie 
container with an mp3 extension tacked on.

mplayer/mencoder is my favorite but does not include an audio only container 
unless you encode to .wav

ffmpeg DOES include the ability to encode to an mp3 file so try this:

ffmpeg -i movie.flv -f mp3 audio.mp3

This assumes the audio is already in mp3 format, if it isn't it would need to 
be converted which ffmpeg can do.

One way to see how you did encoding is to play files with mplayer in a console 
and read the output which will show the encoding formats detected.

Hope this helps.


BTW - I couldn't test this since ffmpeg is broken on my OpenSuSE 11 system.
If you have problems, I can try this on my UbuntuStudio system.


More information about the wplug mailing list