Weblog Archives: December 2008

Inverse Telecine for 24p Video

Canon HF100"24p" files that originate from recent Canon AVCHD camcorders (such as the HF10 and HF100) tend to have a 3:2 pulldown (or 2:3 pulldown) applied to them, which means the file you get from the camera is actually 60i. Fortunately the original 24p data is available in these files, but extracting that data seems to cause lots of problems for new users of these cameras. The best approach depends on the tools you have at your disposal, but as someone with a limited budget, free software is my method of choice. Note: These steps rely on Windows-based technologies and software, so I can't speak for other operating systems.

I prefer using AVISynth and the TIVTC plugin. AVISynth is a powerful scripting language for video editors, but if you've never used it before, I must warn you that this method isn't for the faint of heart. AVISynth is the "command line" of the video world. Still, it's a great tool to learn. TIVTC gives us the filters required for pulldown removal.

The first step is making sure that your computer has the DirectShow filters necessary to play .MTS files natively. That is a topic outside the scope of this document, but if you need help, tools like ffdshow, Haali Matroska Splitter, and Media Player Classic should be helpful. These tools provide AVCHD decoding, M2TS demuxing, and playback, respectively. VLC is not an option here because it uses its own codecs rather than the Windows DirectShow filter architecture that AVISynth relies on.

First, confirm that you can open the file and play it as-is. Create a file named "inversetelecine.avs" in Notepad and put it in the folder with the downloaded MTS files from the camera. Here is the script's contents:

# Open the source file (change the filename as necessary)

In Explorer, open your new .AVS file in Media Player Classic and make sure the video works properly. If you get errors, tinker with the codec settings until things are working. This is often the hardest part of editing a relatively new format like AVCHD.

Next, make sure the TIVTC plugin is installed in AVISynth's "plugins" directory, then complete the script as below. This full script takes in a .MTS file from the camera and outputs uncompressed 24p video (23.976 fps) for use in a video editor or other compression program. You can "play" the script in any video editor that supports AVS files, such as VirtualDub, to produce a recompressed 24p file.

# Open the source file (change the filename as necessary)

# Pull out interlaced frames (the parameter means "find interlaced frames but don't blend any of the other frames")
TFM(PP = 1)

# Remove duplicate frames (the parameters mean "throw out 1 of every 5 frames")
TDecimate(CycleR = 1, cycle = 5)

Please wait ...

There was an error fetching the requested dialog.