diff options
author | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-09-22 13:28:44 +0000 |
---|---|---|
committer | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-09-22 13:28:44 +0000 |
commit | b60c5481e4072a6f2cbc4d5d2e89ed7d06ecd73b (patch) | |
tree | e621c873e2bab624fd562cc315dc5e15aff5eac5 | |
parent | 9f9e5fa178c34374f7056a5140fe50913494d69c (diff) |
encode to tempfile instead of stdout
-rwxr-xr-x | tools/gen_frikanalen_video.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/gen_frikanalen_video.pl b/tools/gen_frikanalen_video.pl index 1290fb8..58c572b 100755 --- a/tools/gen_frikanalen_video.pl +++ b/tools/gen_frikanalen_video.pl @@ -23,7 +23,7 @@ use Data::Dumper; use Getopt::Std; my %opts; -my $intro_length = 3; +my $intro_length = 5; my $pid = $$; getopts('i:m:o:b:s', \%opts); @@ -243,9 +243,12 @@ sub normalize_sound { sub glue_dv { my $outfile = shift; my @infiles = @_; - my $cmd = 'cat '.join(' ',@infiles).' | ffmpeg -i - -aspect 16:9 -acodec pcm_s16le -vcodec dvvideo -y '.$outfile.' -f avi' ; -# my $cmd = 'cat '.join(' ',@infiles).' | dvgrab -size 0 -stdin -f dv2 -opendml '.$outfile ; - my $f = `$cmd || echo -n -1`; + my $cat = 'cat '.join(' ',@infiles)." > $workdir/complete.dv "; + my $f = `$cat || echo -n -1`; + if ( $f eq -1 ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } + my $ffmpeg = "ffmpeg -i $workdir/complete.dv -aspect 16:9 -acodec pcm_s16le -vcodec dvvideo -y ".$outfile.' -f avi' ; + # my $cmd = 'cat '.join(' ',@infiles).' | dvgrab -size 0 -stdin -f dv2 -opendml '.$outfile ; + $f = `$ffmpeg || echo -n -1`; if ( $f eq -1 ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } if ( -d $workdir ) { `rm -rf $workdir`; |