Log in

View Full Version : Smooth Deinterlacer for AVISynth (doubled frame rate) & GK


Wotan
19th February 2003, 16:51
y0! fellas... :D
Nu-bee here.

I did mah homework but I'm stuck at this point, someone help me out, please. I'd really appreciate it 'n' stuph.

I want to deinterlace a purely interlaced (no TeleCine) NTSC DVD.
I'm trying with the Smooth Deinterlacer plugin for AVISynth:

http://home.bip.net/gunnart/video/AVSPorts/SmoothDeinterlacer/

which is based in Gunnar Thalin's Smooth Deinterlace plugin for VirtualDub. I heard that this one is even better, but I won't bother with it by now cause I don't know how to apply it.

The problem is as follow:
I'm trying to double the frame rate to keep as much temporal resolution as posible. But it seems that GK doesn't know what to do with the doubled frame rate, it expects 29.97 fps like the source material (or that's what I think is happening).
Here's an extract from the log (I'm doing both passes):

[After the 1st pass and before starting the 2nd pass]

07:10:38: WARNING: Number of counted frames differs from settings!
07:10:38: WARNING: Settings: 12004
07:10:38: WARNING: Counted: 24007
07:10:38: WARNING: Difference: 12003
07:10:38: Correcting Bitrate...
07:10:38: Original Bitrate = 18110 k(=1000)Bits/s
07:10:38: ERROR: Correction impossible.
07:10:38: Now encoding at 18110 k(=1000)Bits/s

GK managed to finish the second pass anyway.
As you can see, the amount of frames counted is the exact double of those in the settings, when I opened the frame server (*.d2v).

I'm working on a small chapter for testing, I want to know if GK will be able to fit the whole thing on a single CD before I take the hassle to encode the whole DVD.

And now that I'm at it, this is what I entered in the AVISynth script:

LoadPlugin("SmoothDeinterlacer.dll")
SmoothDeinterlace(tff=true, doublerate=true)

as it comes in the URL above as an example.

But I read below some standard conversions like this one:

# NTSC DVD (59.94 fps) to PAL DVD (50 fps)
LoadPlugin("SmoothDeinterlacer.dll")
LoadPlugin(PluginPath + "MPEG2DEC.dll")
InputVideo = MPEG2Source("NTSCDVD.d2v")
SmoothDeinterlace(tff=true, doublerate=true)
BilinearResize(720, 576)
ConvertFPS(50)
SeparateFields()
SelectEvery(4, 1, 2)

Should I bother with ConvertFPS, SeparateFields, etc.?
I already got what I wanted, I doubled the frame rate (29.97 -> 59.94) and it plays smoothly without field ghostings, but I'm not sure if I'm doing it the right way.

Thanks in advance, and sorry for my crappy english. :rolleyes:

OvERaCiD23
19th February 2003, 20:47
In the settings for the GKnot project, change the framerate to double the original source (since you're essentially doubling the output framerate). The problem is, GKnot doesn't know you're putting it to 60fps, and it's bitrate calculation is only for 30fps. Thus, that's why it's saying it's 12000 frames off (exactly double the original frames).

07:10:38: WARNING: Settings: 12004
07:10:38: WARNING: Counted: 24007
07:10:38: WARNING: Difference: 12003

24007/2 = ~12004
12004 * 2 = ~24007

see what I'm saying?

All of your encoding settings are fine. Just inform GKnot of what you're doing and it will work out fine (or just use VDub for encoding and don't depend on GKnot as much).

manono
19th February 2003, 21:01
Hi-

change the framerate to double the original source

But there's no option to set the framerate to 59.94fps. Wouldn't he be better off changing the number of frames as listed in the lower left corner to 24007 and ignoring that the movie will show as twice as long? Or is that what you meant to say? Or did I miss something (very possible)?

hakko504
20th February 2003, 07:52
The bitrate calculations will be correct if you leave GKnot at the original setting. As you noticed, GKnot will not be able to do any correction of the actual bitrate depending on actual number of frames, but that shouldn't be necessary, one frame more or less isn't going to affect your video that much anyway. The bit/(pixel*frame) calculations will be off though (by a factor 2). For a compression test use DivX5Enc instead.

manono
20th February 2003, 09:58
Doh!

I forgot that doubling the number of frames and keeping the framerate constant halves the bitrate. Can I just delete it and pretend I never wrote that?:o

However, at the risk of saying something else stupid, won't filling in the correct number of frames give you correct b/(p*f) and therefore a correct Compress Test percentage?

hakko504
20th February 2003, 10:02
Originally posted by manono
I forgot that doubling the number of frames and keeping the framerate constant halves the bitrate. Can I just delete it and pretend I never wrote that?:o Nope, it will come back and haunt you at every possible (and some impossible) situation ;) :p