Offline converter for FLV to MP3.

kuhla

Limp Gawd
Joined
Nov 21, 2005
Messages
472
For a while I used to use a program for converting FLV (flash) files to MP3 files. The program could convert to other formats too but I mainly used it for that. I appreciated that I had some control over the process (quality, video size, etc.), unlike many online web-based converters, and it was much much faster.

I went and looked for that program again but can't find it anymore.

Does anyone have any alternatives they would recommend?
 
VLC? It does export MP4 to CD/MP3 all the time, and it can play flvs.
 
I always known of VLC as a player and didn't know of its converting capabilities, I don't use it myself, but I will give it a shot. Thanks.
 
If the audio is already MP3 then all you need to do is do a passthrough with FFmpeg.
ffmpeg -i video.flv -vn -acodec copy -f mp3 -y outputfile.mp3

If the audio is not MP3 then you can convert it:
ffmpeg -i video.flv -vn -acodec libmp3lame -ab 360k -a4 44100 -ac 2 -y outputfile.mp3
-i is the input
-vn ignores video
-acodec specifies the audio codec
-ab sets the audio bitrate
-ar sets the audio frequency. Flash supports 44100, 22050, 11025 frequency audio.

Valid audio codecs for Flash can be found here:
http://helpx.adobe.com/flash/kb/supported-codecs-flash-player.html

If you need to do batch encoding you can do that with the scripting language of your choice. I would recommend using MediaInfo CLI for extracting information from the source file. This will help you to not encode the audio when it is already MP3 audio. Saves time and no degradation happens to the audio.

A scripting example from one line I have in my bash shell script that runs under Cygwin. It encodes H.264 video with stereo AAC audio and puts it into an MP4 container. I stripped out the video stuff and put the audio portion below:

----------------------------------------
ffmpeg.exe -i $inputfile -sn -vn -strict experimental -acodec aac -map $audio -b:a:$audio $audiobitrate -ac 2 -ar $audiofrequency -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -map_metadata -1 -f mp4 -y $outputfile
----------------------------------------

I hope that helps.
 
Back
Top