sudo apt-get install ffmpegI'm not going to into too much depth with ffmpeg here other than to convert an flv to an mpg, I recommend checking out the ffmpeg documentation for anything specific, you can also google it from here:
Another option is, if your looking for the GUI way to convert videos in Linux, to use WinFF which you easily install by adding a repository in ubuntu: http://code.google.com/p/winff/wiki/UbuntuInstallation
What I wanted to be able to do was convert all of the flv's I had in a directory to mpg's, to do this using ffmpeg simply:
ffmpeg -i input.flv output.mpgffmpeg's clever enough to figure the rest out for itself, there are many options you can us, I decided just to set the frame size to 800x600 for simplicity (-s 800x600) so my final ffmpeg command was:
ffmpeg -i input.flv -s 800x600 output.mpgIn another post I posted a script to extract flash videos from the web browser cache and put them into a separate directory for storage (click here to read this post) so this script is an extension of that script to convert all flv's into mpeg and put them into a video directory:
#!/bin/bashThis may take some time to complete depending on how many flash flv files you have the input directory.. I generally use my cache flash extractor bash script then sift through the flvs directory deleting what I don't want, then convert the videos I want to keep.
INPUTDIR=~/Videos/flvs
OUTPUTDIR=~/Videos
for f in $INPUTDIR/*.flv
do
a=$(basename $f | cut -f1 -d '.')
ffmpeg -i "$f" -s 800x600 "$OUTPUTDIR/$a.mpg"
done
If you find it useful let me know..
No comments:
Post a Comment