in reply to Re^2: Copying a hash to an array of hashes.
in thread Copying a hash to an array of hashes.
use FFmpeg::Command; my @gl_thread_queue_arr = (); while (<DATA>) { my @options = split; my $ffmpeg = FFmpeg::Command->new('/usr/local/bin/ffmpeg'); $ffmpeg->input_options({ file => $options[0], }); # Set timeout $ffmpeg->timeout(300); # Convert a video file into iPod playable format. $ffmpeg->output_options({ file => $options[1], device => 'ipod', }); push @gl_thread_queue_arr, $ffmpeg; # Add job to Ffmpeg queue } foreach my $ffmpeg (@gl_thread_queue_arr) { my $result = $ffmpeg->exec(); croak $ffmpeg->errstr unless $result; } __DATA__ input_file1 output_file1 input_file2 output_file3 input_file3 output_file2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Copying a hash to an array of hashes.
by Steve_BZ (Chaplain) on Sep 22, 2009 at 02:02 UTC |