i am looking for some progream to convert masive amount of videos (.asf, .wmv...) to .flv
- which program would you recommand me?
thanks
- which program would you recommand me?
thanks
#!/usr/bin/perl
# converter.pl
my $dir = $ARGV[0];
my $EXT = $ARGV[1];
my $newdir = "out/";
mkdir($newdir) if (!(-e $newdir));
opendir (DOORDIR, "$dir");
my @fls = grep { /\.$EXT/ } readdir DOORDIR;
close DOORDIR;
foreach (@fls){
my $f = $_;
my @x = split(/\./, $f);
system ("mencoder $f -o $newdir$x[0]r.flv -of lavf -vf scale=200:150 -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=400:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate 22050");
system ("flvtool2 -Uv $newdir$x[0]r.flv $newdir$x[0].flv");
system ("ffmpeg -i $newdir$x[0].flv -an -itsoffset 00:00:06 -ss 00:00:01 -t 00:00:01 -r 1 -y $newdir$x[0].%d.jpg");
system ("rm $newdir$x[0]r.flv");
}
user@server$ perl converter.pl ./ avi
user@server$ perl converter.pl ./ mpg
user@server$ perl converter.pl ./ wmv

Comment