1#!/usr/bin/perl -w 2 3use SWF qw(:ALL); 4 5die "Usage: ".$0." <sourcedir>\n" unless @ARGV; 6$mediadir="$ARGV[0]/../Media"; 7 8$m = SWF::Movie::newSWFMovieWithVersion(7); 9 10$stream = new SWF::VideoStream($mediadir."/video01.flv"); 11 12$m->add($stream); 13 14$numFrames = $stream->getNumFrames(); 15for ($i=0; $i<$numFrames; $i++) 16{ 17 $m->nextFrame(); 18} 19 20$m->save("test01.swf"); 21