Convert FLV's to MP3

15-06-2008 | Remy van Elst

Table of Contents

If you've got a large folder of .flv files (lets say you've ripped them from youtube) and you want to put them on a music player, you can use this script. First make a file called


Then paste the following in it:

for f in *.flv; do
    echo "Converting $f"
    ffmpeg -i "$f" "${f%.flv}.mp3"

Save, and make it executable:

chmod +x ./

Now copy all your FLV's in that folder, and then open a terminal there:


Then, when finished remove all the flv's you copied:

rm ./*.flv

Now you have a folder full of mp3's instead of .flv's.

So, who needs The Pirate Bay anyway if you've got youtube ;)

Tags: bash, flv, loop, mp3,