#!/usr/bin/perl # # Converts all videos in the current dir to iPod compatable videos # files specified on the command line # #have faac installed, and ffmpeg with faac support #operates on avi files only, change other types to avi if needed print "video to iPod Video convertor\n"; print "by Kevin Lee, www.kevin-lee.co.uk\n"; if (!@ARGV) { @ARGV = ; chop(@ARGV); } foreach $file (@ARGV) { if (!-f $file) { print "Skipping non-regular file: $file\n"; next; } # if (-B $file) { # print "Skipping binary file: $file\n"; # next; # } print $file; $outfile = "./$file"; $outfile =~ s/avi/mp4/; $outfile =~ s/mpg/mp4/; $outfile =~ s/mpeg/mp4/; $outfile =~ s/mov/mp4/; $line = 'ffmpeg -i '.$file.' -vcodec mpeg4 -acodec aac -b 256kbps -ab 128kbps -s 480x360 -aspect 4:3 -f mp4 '.$outfile; print $line; system($line); print "File Converted: $file -> $outfile \n"; } # else { # print "No change to file: $file\n"; # } exit(0);