2009年3月29日星期日

Command Line Flash 8 FLV Encoding

I have been searching for a command line Flash 8 (VP6) FLV video creation tool for a long time. I've bought On2's Flix Pro - but even though it is a mile better than Sorenson's horrible Squeeze, it still had some serious issues with AviSynth input for instance. In general it was good for one-at-the time encoding, but batch processing was tedious and buggy.

So for a while I had actually went back to Flash 6, and batch encoding via ffmpeg's built-in FLV-encoder. While browsing for some info on VP6, I found an ffmpeg patch, that allowed for VP6 AVI to FLV muxing. Even though it's a few months old, it hadn't been included in ffmpeg, so I merged it myself, and after learning how to build ffmpeg, I got a working version. Here are the tools you need:

ffmpeg win32 binary including VP6 FLV mux patch.
Toolpack with example avs and bat.

You also need: Avisynth 2.5.6 or later, and last but not least the On2 VP6.2 VFW codec. The On2 codec is free for personal use, but for some strange reasion it is no longer offerered at On2's website. For commercial use, you should be (morally) ok, if you just buy Flix Pro.

Short how-to:
  1. Install AviSynth.
  2. Install VP6.2 codec.
  3. Unpack ffmpeg and the toolpack from above in the same directory.
  4. Put an AVI file called "example.avi" (that is readable by AviSynth) into the directory with ffmpeg.
  5. Run "example.bat".
  6. Wait.
  7. You should (with a bit of luck) have an "example.flv" by the time the bat file finishes.
You can use the excellent FLV Player by Martijn de Visser to watch your result offline, or use Jeroen Wijering's great Flash Video Player and put your result online.

Customization.

The important part of video encoding is of course customization. There are three main points. The AviSynth script providing the input - the video encoding parameters and the audio encoding parameters. I will cover how you can modify these settings, as there are many good guides on what settings to use for good quality.

没有评论:

发表评论