[leveller] Notes on using ffmpeg to make Flash video

  • From: Ray Gardener <rayg@xxxxxxxxxxxxxxxxxx>
  • To: leveller@xxxxxxxxxxxxx
  • Date: Fri, 22 May 2009 16:14:14 -0700

For those who prefer viewing Flash video in their browser directly, this Flash clip of the camera paths animation example is available:


http://www.daylongraphics.com/products/landshaper_golf/gallery/path_cam_example.swf

It may pause or jerk a bit on the first loop depending on your connection speed, if you are streaming it directly.


Converting Leveller animation frames to Flash video with ffmpeg can be done using, e.g., this command line in DOS:

ffmpeg -r 24 -i c:\animdata\frame_%02d.bmp
       -b 750k -r 24 c:\videos\anim.swf

The above assumes outputting from Leveller a set of BMP format frames
named "frame_00.bmp", "frame_01.bmp", etc. If the frames number over 99, then use "%03d" or "%04d" in the input filespec to handle up to 999 or 9999 frames, respectively.

The "-r 24" sets a 24 fps frame rate.

The "-b 750k" sets a quality bitrate that shows some artifacts,
but not enough to make captions unreadable. The bitrate can be set higher of course, but then the Flash file becomes bigger.

I'll add a feature to Leveller to automate the above.

ffmpeg for Windows can be downloaded from
http://ffmpeg.arrozcru.org/builds/

Ray

Other related posts:

  • » [leveller] Notes on using ffmpeg to make Flash video - Ray Gardener