Harry Sukumar's Weblog

Archive for February, 2012

How to batch convert rm real media files to mp3 using ffmpeg

Posted by hsukumar on 15/02/2012

save this lik m4a2wav.sh then you have to give it executable permission
and the execute in a terminal ./ m4a2wav.sh

for f in *.m4a; do mplayer -ao pcm:file=”${f%.m4a}.wav” “$f”; done

 

Or run the above in the command prompt

 

you can also use it for whole different formats

 

for f in *.rm; do ffmpeg -i “$f” “${f%.rm}.mp3″; done

 

just spent some time researching the best way to do a batch convert of flv files to another type. After searching I ended up writing this bash script.

#!/bin/sh
for f in *.flv;
do
echo “Processing $f”
ffmpeg -i “$f” -target ntsc-dvd “${f%.flv}.mpg”
done

This converts all files with extension flv to a ntsc dvd format with file extension mpg. You can tweak it for your needs.

Happy flashing!

Posted in CentOS, Debian, General Linux | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.