PDA

View Full Version : Delayed Keyframe detection! weirdest thing I've ever seen!


DJ Bobo
25th September 2002, 18:20
Take a look at the picture below, the keyframe is set exactly one frame before there is actually a scene change!! and you see the result!
I wasn't able to reproduce the problem by encoding just 20 seconds around the scene change.
This problem is a first in my whole encoding life and it happens to happen only between 1min37 and 9min05 (8min53 after PAL speed up)which are equivalent to 2 chapters on the DVD, even though the DVD plays back correctly and the AVS output is correct. It's the "Perfect Cell - Temptation" DVD and it's episode158 (the third one on the DVD)
Ripped with SmartRipper 2.41, frameserved through DVD2AVI 1.76 and AviSynth 2.05 (the one from the doom9 download page) and processed this way:

loadplugin("c:\gknot\mpeg2dec.dll") <- from Marc, released yesterday night
loadplugin("c:\av\gknot\ivtc\ivtc.dll")
mpeg2source("3.d2v",cpu=4)
ivtc(44,11,95)
crop(14,6,696,472)
BicubicResize(512,384,0,0.5)
TemporalSoften(2,8,8)
assumefps(25)

Encoding was done with DivX 5.02 pro 2-pass @1500kbps with bidirectional encoding only, 125 frames keyframe distance (the problem has nothing to do with this, there is much less than 125 frames before the last keyframe), and RC averaging on 14914 frames, all other things on default values.

Where is the mistake?

manono
25th September 2002, 18:46
Damn DJ Bobo-

I don't know that you've ever started a thread before asking for help. I've seen things like that when I find interlaced frames in the .avi and redo just the second pass. Sometimes I've seen it when switching from Force Film to IVTC, or switching IVTCs for just the second pass. But since I know you don't do stupid things like that, I would guess that MarcFD's frame counter isn't too reliable. I'd suggest redoing the 2 passes (or maybe just the second pass, but I don't think so) with a different mpeg2dec.dll and see if the problem repeats itself. If using a different mpeg2dec.dll doesn't reproduce the problem, I'd suggest reporting it to him.

DJ Bobo
25th September 2002, 23:58
Well, I'm not even able to reproduce the problem! I reencoded the first 2 minutes again and again and again and not a single one has the problem above, and all of them have a keyframe on 2471!

But I think I found the source of the problem: TemporalSoften!
When I call frame 2471 (using Edit -> Got to) with TemporalSoften on, I get exactly the same picture as above. But when I call the same frame with TemporalSoften off, I get a mix out of 2471 and 2472 (without the blocks of course). On the final AVI, frame 2471 is correct and showing what is 2472 on the above picture (without the blocks of course).

So I guess I must get rid of that damn TemporalSoften!

manono
26th September 2002, 00:44
Hi-

I was thinking later that it probably has nothing to do with frame counting, but with the frame being processed before hitting the IVTC (if indeed, that's what it does), like the picture in the other thread. So, maybe it was throwing off the IVTC or the duplicate detection. I find it hard to believe that it has anything to do with TempSoften though, since it comes well after the IVTC. But who am I to say? Strange, though.

DJ Bobo
2nd October 2002, 20:56
@ manono
You may be right about it not being related to TemporalSoften. I changed everything but the plugin of Marc FD and I'm still getting some of those false keyframes.
I informed him about it in the AviSynth forum and I hope, we will see a corrected version of it soon ;)

manono
3rd October 2002, 03:54
Hi DJ Bobo-

Although I haven't used it yet (although the luma-off option is interesting for dark movies), if my theory is correct, it probably shouldn't be used together with IVTC, but only with Force Film or No Field Operation with PAL material. It seems like it may be messing with the fields before hitting the IVTC.