« アラートウィンドウへフォーカスを移さない | メイン | オーディオストリームの多重化 »

2005年03月30日

ツール開発メモ:: 連番画像からMPEGファイルを

    

PerlMagickでいきなりMPEGを作るのは厳しそうなので、まずは次のようなスクリプトで連番JPEGファイルを作った。

use Image::Magick;
for( $i = 0; $i > 1800; $i++ )
{
  my $image = Image::Magick->new(size=>'640x480');
  $image->ReadImage('xc:black');
  $text = sprintf("%05d",$i);
  print "Create image #".$text.".\n";
  $image->Annotate(font=>'Century', pointsize=>100, fill=>'green', text=>$text, gravity=>"Center" );
  $image->Set(quality=>90);
  $filename = sprintf("img%05d.jpg",$i);
  $x = $image->Write($filename);
  warn "$x" if "$x";
}

で、連番画像からムービーを作るツールを探したのだが、見つからず、自分で作ることを考えていたのだが、TMPGEncで作れることがわかった。
これで、テスト用のムービーが手軽に作れる。



投稿者 Takenori : 2005年03月30日 22:38




comments powered by Disqus
Total : Today : Yesterday : なかのひと