Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Thread Tools Search this Thread Display Modes
Old 15th May 2013, 23:01   #1  |  Link
Registered User
ChiDragon's Avatar
Join Date: Sep 2005
Location: Vancouver
Posts: 600
WeaveMan: remove arbitrary pulldown patterns manually

WeaveMan v0.2 download link

This is something I wrote 6 years ago to undo TNT HD's bizarre speedup and telecine patterns that sometimes changed at every commercial break. The idea was inspired by a more basic arbitrary Weave filter that I believe was written by a Japanese fellow. Eventually I got fed up with how much time I was spending on figuring out the patterns and opted to just throw all the raw captures on an external drive.

Since it was so long ago and I was too busy setting up encodes to think of distributing it, I have no documentation to share. I'm mainly posting it now just in the hopes of inspiring someone else to write an AviSynth filter. If I can do it, so can you!

Here are a few things that I've gleaned from skimming my old scripts:
  • It was designed to be used in conjuction with TFM (to determine matched fields) and TDeint (to deinterlace by hinted frames).
  • The workflow involves running a TFM output-file pass, opening that text file into WeaveMan, generating a human-readable output file, and slowly analyzing that to determine the pattern.
  • Then you would take that pattern and make an "ovr" file similar to one for TFM/TDeint, that specifies which fields to weave, which fields to drop, and which fields to hint for deinterlacing. (One nice thing is that I allow negative numbers for the pattern start, so that you can determine the way that the pattern repeats starting at any frame and just tack on a minus at the start to indicate that you want this same cycle to be used all the way back to frame 0.)
  • My use case involved a lot of cadences where the film frame existed in only a single field. I specified "X" as a frame that needs to be top-field deinterlaced and "Y" as a frame that needs to be bottom-field deinterlaced in order to restore the film image.
  • Since the weave pattern can be whatever you choose, you may either incorporate frame dropping into your pattern (preferred) or create duplicates and allow TDecimate to handle them afterward (sometimes this is the only sane option)
  • Normal 3:2 cadence was defined as "CCC-P" (or "CCCPP" if drops are disabled) and shortened to "N" for brevity.
  • A calculation of the audio pitch shift from 24 fps to your output frame rate is available from the Display option, so that you may slow a sped-up source back down and apply pitch correction in external software.

TFM analysis pass:
Convert TFM analysis to WM analysis to read through:
Example usage:
I'll try to add some more info as I can.

Definitions for frame types: (based on top-field-first source)
c and C (and every other undefined character) = current frame
p and P = weaved top from current + bottom from previous
u and V = weaved reverse parity?
X = deinterlaced top from current
Y = deinterlaced bottom from current
W = reverse parity...?
Z = reverse parity...?

Definitions for patterns:
N = normal CCC-P or CCCPP
R = rarely-used CYC-P or CYCPP
S = sometimes-used CZC-P or CZCPP

Change log:
v0.2 (2013-12-08)
- Fix: embarrassing bug where "order" cannot be set to its own default value.
- Fix: compiler warning for int to bool cast.

v0.1 (2013-05-15)
- Initial release.

Last edited by ChiDragon; 11th December 2013 at 19:56.
ChiDragon is offline   Reply With Quote
Old 9th December 2013, 00:05   #2  |  Link
Registered User
ChiDragon's Avatar
Join Date: Sep 2005
Location: Vancouver
Posts: 600
I put off posting v0.2 because I was planning to add something to it at the same time, but now I forget what that was. So here is the "order" parameter bug fix version.
ChiDragon is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 08:32.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.