Hello, I've written a little perl script based on the example at the FFmpeg::Command cpan page. The code is as follows: ----- use FFmpeg::Command; use Carp;
$input_file = "/tmp/NS051.avi"; print "Input file: $input_file\n"; $output_file = "/tmp/NS051.m4v"; print "Output file: $output_file\n"; print "Creating new ffmpeg command instance..."; $ffmpeg = FFmpeg::Command->new('/usr/local/bin/ffmpeg') || die("unable to create instance.\n"); print "success.\n"; print "Setting up file input options..."; $ffmpeg->input_options({file => $input_file}) || Carp::cluck "unable to set options:\n"; print "done.\n"; print "Setting up the timeout to 300 seconds..."; $ffmpeg->timeout(300) || Carp::cluck("unable to set timeout.\n");; print "done.\n"; #convert a video into ipod playable format. print "Setting up the file output options..."; $ffmpeg->output_options({file => $output_file,device => 'ipod'}) || Carp::cluck("unable to set options.\n");; print "done.\n"; print "Executing the ffmpeg command, with the selected options..."; $ffmpeg->exec() || die("unable to execute.\n"); print "completed.\n" exit; ------ When I run it, I get this: Input file: /tmp/NS051.avi Output file: /tmp/NS051.m4v Creating new ffmpeg command instance...success. unable to set options: at /home/rock/bin/shazam line 20 Setting up file input options...done. Setting up the timeout to 300 seconds...done. unable to set options. at /home/rock/bin/shazam line 32 Setting up the file output options...done. Executing the ffmpeg command, with the selected options...unable to execute. ----- Now what I don't understand is why I get the "unable to set options:" before "Setting up file input options" even though in the script the later should have been executed before, so the error message should at least have appeared after the "Setting up file input options". The second thing is, how come setting up the options failed? It is somewhat exactly like the example given on the page at http://search.cpan.org/~mizzy/FFmpeg-Command-0.07/lib/FFmpeg/Command.pm What am I doing wrong? Or is there a problem with the actual module? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/