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)
DirectShowSource("00001.MTS")

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)
DirectShowSource("00001.MTS")

# 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)

Comments

  • Predrag
  • May 6, 2009
  • 9:38 am
If I understood your instructions correctly, your script deals with complete frames; not with individual fields. However, the 24p content in today's popular AVCHD camcorders is telecined into 60 interlaced fields; not 30 progressive frames. Therefore, you would need to remove specific fields from the 60i file and recompose the remaining one into progressive frames (notice the difference between frames and fields). Looking at the simple script, it seems that id throws out every 1 out of 5 frames and leaves the rest intact. This would result in four complete frames and one frame with a mixture of two fields from neighbouring frames, as follows:

24P frames: AA BB CC DD
60i frames: AA BB BC CD DD

So if you drop frame No. 3 from the 60i sequence (the 'BC' frame), you are still stuck with a frame that has a blend of 3rd and 4th original frame ('CD').

How do the resulting files look? Can you see the blended frame (usually easy to spot un fast motion clips)?
Please wait ...

There was an error fetching the requested dialog.