PDA

View Full Version : How to insert an irregular pattern of pulldown flags?


zoinbergs
28th October 2006, 00:25
Okay, so I have been at this for days, and I am stumped. I think my mind is thinking in the right direction, but I have to admit, I need a little help! Does anyone know how this can be done?

Let me elaborate:

I have an interlaced video clip, encoded bottom field first. Some sections of the clip are true 29.97fps footage, while others are 23.976fps with pulldown flags. I believe this is called hybrid footage, right?

Here's my problem: The author of this clip used weaving (when they should have been using blending) to perform scene changes in the 23.976fps footage, thus resulting in a very nasty video feed that's played back when the flags of those interlaced frames are honored. It's like some fields are double pulled down, while others are simply missed, or at least played back in the wrong order. Does that make any sense?

What I'm trying to do is run DGIndex on the clip with "Ignore Pulldown Flags" set, so I can run FieldDeinterlace(full=false) on it, and then re-encode it with the flags honored. My problem is that when I ignore the pulldown flags on the old clip, I have no way of re-inserting them into the newly encoded clip.

Is there any way to, say, run DGIndex on the newly encoded clip, and copy parts of the original clip's d2v file into the new clip's d2vfile? I believe DGIndex reveals where the flags are, but I don't know what parts to copy over.

Also, if there's any way to do a final encode on this clip in TFF, it'd be nice. Not necessary, but nice. I believe a trim(1,0) would work? Or would it somehow mess up the irregular pulling down that's done throughout the clip?

Any insight into a solution is VERY much appreciated! I know I'm close, so the solution has got to be easy. I just can't get there alone!

Thank you so much for reading this post, and good luck to you!

zoinbergs
28th October 2006, 01:03
Okay, so I figured out that I can parse a d2v of the original clip, with flags honored, to give me exactly what fields need to be repeated.

So at least I have that much! But does anyone know how I can use this information somewhere else, like in an avisynth script perhaps, to perform the pulldown?

neuron2
30th October 2006, 23:41
It's like some fields are double pulled down, while others are simply missed, or at least played back in the wrong order. Does that make any sense? Not to me. Can you post an unprocessed VOB fragment that will allow us to see what you are talking about. I'd like to understand the original problem before launching into supporting a solution that may not be the right one.

zoinbergs
31st October 2006, 06:34
Op, my bad! A clip is always nice to have, isn't it?

Here's a clear selection of what I'm working on.. It's BFF, and when played back, the fields appear to be out of order, although they were actually encoded that way....

http://www.sendspace.com/file/c3v0op

If you do SeparateFields() it jumps back and forth really badly.. this kind of thing happens all the time through the clip, especially at scene changes.

I believe the producer weaved some original frames together in TFF, encoded the clip in BFF, and added flags to certain scenes to keep the audio in sync. I could be wrong, but I can't think of a better reason why.

................

Okay, so I have been contemplating a solution for all this... and I think I *might* have one. It would be to....

1. Run DGIndex on the original clip using Honor Pulldown Flags... (this is so I can parse the D2V project for later).

2. Run DGIndex on the original clip using Ignore Pulldown Flags...
(this is so I access and FieldDeinterlace(full=false) the original frames).

3. After deinterlacing the clip (using avisynth pointing to the d2v in step 2), in my script I will add

SeparateFields()
SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)
Weave()

to the sections that need to be pulled down, which I will know which ones need to be, using the parsed D2V project file created in step 1.

Sounds like a plan? I think so! All I gotta figure out now is how to pulldown certain sections of the clip..

Does anybody know how to do that? I know Trim() can be used to select certain parts of a clip, but I don't want to splice together several different clips created that way. I just want to select a certain number of frames inside one clip, in several different areas.

Hmm.... To google I search!

int10h
1st November 2006, 17:44
Trim sounds good to me. I would trim after dinterlacing/pulldown, and then splice every bit.