I get to know this command because my mplayer having problem playing flv downloaded from youtube. Therefore I google it and found that it is a command line can actually convert it into mpg.
To convert flv, let say myvideo.flv to myvideo.mpg, you can do this:
ffmpeg -i myvideo.flv -ar 22050 -b 500 -s 320x240 myvideo.mpg
I check out man for ffmpeg, i couldn’t find at my local machine and I search from the internet, it is quite brief.
Anyway, -i is input, -ar is to set audio sample rate to 22050 Hz, -b is to make it DIVX compatible -s defines its video size.
I turn it into script so that it is easy to trigger next time.
#!/bin/sh if [ -n "$1" -a -n "$2" ] then ffmpeg -i $1 -ar 22050 -b 500 -s 320x240 $2 else echo "Usage: `basename $0` source.flv target.mpg" fi
if [-n “$1” -a -n “$2”] is actually check to see if source and destination video is not specified, then display the usage.
Copy these line into a text file call flv2mpg and change it to executable by doing this
chmod a+x flv2mpg
So next time if want to convert to mpg, just do this