7 use File::Path qw(rmtree);
15 my $frame_fmt = '/tmp/blank/f%08d.jpg';
17 foreach my $pos ( 0 .. $length * $fps ) {
19 my $im = Graphics::Magick->new( size => '320x200' );
20 $im->ReadImage( 'xc:black' );
22 my $hh = int( $t / 60 / 60 );
23 my $mm = int( $t / 60 );
24 my $ss = $t - $mm * 60 - $hh * 60 * 60;
27 font => 'Sans', pointsize => 24,
28 text => sprintf("%02d:%02d:%06.3f", $hh, $mm, $ss ),
31 my $path = sprintf $frame_fmt, $pos;
32 $im->Write( filename => $path );
33 # warn "# $hh $mm $ss $path ", -s $path, $/ if $t % $fps == 0;
34 print STDERR '.' if $pos % $fps == 0;
39 #system "oggSlideshow -f $fps -o /tmp/blank.ogv -d 20000 -e -l $fps -t p /tmp/blank/f*";
40 system "ffmpeg2theora --framerate $fps --keyint $fps -o /tmp/blank.ogv $frame_fmt";