OT: Batch converting .flv to .mp3 using ffmpeg

Nigel Ridley nigel at prayingforisrael.net
Sun Nov 16 19:19:24 UTC 2008


Matthew Flaschen wrote:
> Willy K. Hamra wrote:
>> i'm not very knowledgeable in bash scripts and it's loop functions, but
>> it seems reasonable for me to do a:
>>
>> for i in *.flv; do ffmpeg -i $i -vn $i.mp3
>>
>> not sure if $i.mp3 is a legal option
> FFMPEG isn't interpreting the variable, the shell is.
> 
>> create a file.flv.mp3 name. still needs some minor editing :P
> 
> Right.  To handle the extension, use:
> 
> for i in *.flv; do ffmpeg -i "$i" -vn "${i%flv}mp3"; done
> 
> Matt Flaschen
> 

That worked a treat :-) Thank you!

Nigel

-- 




More information about the kubuntu-users mailing list