diff options
author | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-03-01 12:47:18 +0000 |
---|---|---|
committer | Jarle Bjørgeengen <jarle@bjorgeengen.net> | 2010-03-01 12:47:18 +0000 |
commit | e468f91c73659940fe2a5da853a72a3f6890d430 (patch) | |
tree | 02f3fe17efd7e3db2b24a69e449fcb0d984476c4 | |
parent | fd886d3bd102cfb94b739b731d7f41ff4681ec8c (diff) |
Fix looping of videos when program finished before slot, and attempt to fix that ezstream dies becaus fk-program.ogv disappears when re-reading playlist
-rwxr-xr-x | frikanalen/bin/scheduler | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/frikanalen/bin/scheduler b/frikanalen/bin/scheduler index b35f9b2..ffc63e3 100755 --- a/frikanalen/bin/scheduler +++ b/frikanalen/bin/scheduler @@ -55,7 +55,8 @@ my $palwidth = 720; my $palheight = 432; my $ezplaylist = "./frikanalen.m3u"; -my $ezpid; +#my $ezpid; +my $ezpid = "4261" ; my $ezcfg = new File::Temp( UNLINK => 0, SUFFIX => '.xml' ); my $ezcfgname = $ezcfg->filename(); @@ -530,19 +531,23 @@ sub generate_program { print $jpg $im->jpeg; my $tmpjpg = $jpg->filename(); close($jpg); + my $tpausevid; my $pausevid; if ( $opts{'s'} ) { + $tpausevid = "program.ogv"; $pausevid = "fk-program.ogv"; } else { - $pausevid = "test.mpeg"; + $tpausevid = "ptest.mpeg"; + $pausevid = "test.mpeg" } # Png input is broken in ffmpeg . Jpg works. - unlink($pausevid); - my @ffmpegcmd = ("ffmpeg", "-loop_input", "-t", "10", "-i", $tmpjpg, "-b", "1800", + unlink($tpausevid); + my @ffmpegcmd = ("ffmpeg", "-loop_input", "-t", "5", "-i", $tmpjpg, "-b", "1800", "-r", "25", "-s", "${palwidth}x${palheight}", "-f", "ogg", - $pausevid); + $tpausevid); print join(" ", @ffmpegcmd, "\n"); system(@ffmpegcmd); + system("mv $tpausevid $pausevid"); return $pausevid; } else { print "Unable to save temporary image file\n"; |