diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-02-15 10:00:26 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-02-15 10:00:26 +0000 |
commit | 180d9a97882bb86ad0f7cb17dc1bf779ad5c783f (patch) | |
tree | da2df4c2b865f2718653d3b68df36027d122fa93 | |
parent | bee547bdd6c8a6ca6d419380e71f355b295f7e5a (diff) |
Make sure pause screen generation uses the same size all over.
-rwxr-xr-x | frikanalen/bin/scheduler | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frikanalen/bin/scheduler b/frikanalen/bin/scheduler index 7b30ebd..6f87255 100755 --- a/frikanalen/bin/scheduler +++ b/frikanalen/bin/scheduler @@ -48,6 +48,10 @@ use SOAP::Lite on_action => sub {sprintf '%s/%s', @_}, ; use vars qw(%opts %downloadreq); +# PAL 16:9 +my $palwidth = 720; +my $palheight = 432; + getopts("g", \%opts); binmode STDOUT, ":utf8"; @@ -288,7 +292,7 @@ sub schedule_video { sub generate_program { my ($vlc, $startseq) = @_; - my $im = new GD::Image(720,432); # PAL 16:9 + my $im = new GD::Image($palwidth,$palheight); my $white = $im->colorAllocate(255,255,255); my $black = $im->colorAllocate( 0, 0, 0); my $fontsize = 20; @@ -344,7 +348,7 @@ sub generate_program { my $pausevid = "test.mpeg"; # Png input is broken in ffmpeg . Jpg works. unlink($pausevid); - system("ffmpeg -loop_input -t 10 -i $tmpjpg -b 1800 -r 25 -s 720x576 $pausevid"); + system("ffmpeg -loop_input -t 10 -i $tmpjpg -b 1800 -r 25 -s ${palwidth}x${palheight} $pausevid"); return $pausevid; } else { print "Unable to save temporary PNG file\n"; |