Log in

View Full Version : Avisynth script deinterlace help


hardkorn
29th October 2010, 20:23
Bare with me guys. Long time since using avisynth advanced features. I have some dvds, which I want to encode them to x264. The video is interlaced, can't tell if it's pure interlaced or hybrid so don't know if "YADIFMod(edeint=nnEDI2())" should be used or "Telecide". Also I didn't understand the "vthresh" option. I think my source is a 3:2 pulldown video, so I used "Telecide", even if the video is interlaced-top field first. Should I use "TFM().TDecimate()"?

Anyway here's the video. Is it a telecined Film? I'd be grateful if someone will guide me setting the best avysynth filter for this.

http://www.mediafire.com/?64hgx5d9xnb7xyf

My avs script looks like this for now:

LoadPlugin("E:\author\megui-0.3.3-setup\tools\dgindex\DGDecode.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\yadifmod.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\nnedi2.dll")
DGDecode_mpeg2source("E:\work\VTS_01_1.d2v", cpu=0)
AssumeTFF()
YADIFMod(edeint=nnEDI2()) or

AssumeTFF()
Telecide(guide=1,post=3,vthresh=25,show=true)


Telecide(guide=1)
Decimate() ??

Thank you all.

TheSkiller
29th October 2010, 22:14
It's perfect telecined film, no hybrid stuff. Easy.


AssumeTFF()
TFM(mode=1, pp=0)
Tdecimate(mode=0)

This does it. (TFM & Tdecimate are more up-to-date than Telecide & Decimate)
You're lucky the fades and text dissolves aren't true interlaced layers on top of the telecined film.

Edit: You can tell easily if something is telecined film or not if you look at a part with steady motion. Are there 3 frames in a row that don't show any interlacing followed by 2 interlaced looking frames? This is the typcial telecine pattern. But if you see something like that don't forget that the video could still be a hybrid...

hardkorn
29th October 2010, 22:43
Thanks.

Some say that megui's internal analyzer isn't very good, but it has detected the video as hybrid (or not ?). This is the output it gave me.

tfm(order=1).tdecimate(hybrid=1)

Is it necessary to leave AssumeTFF() if TFM(order=1) is set? They basically do the same thing, don't they?

Can I rely on megui for detecting stream type?

Regarding tdecimate(hybrid=1). What does this do? The avisynth doc says:

hybrid -

Controls how or if video sections (30p) should be dealt with. Possible settings:

0 - no handling
1 - blend decimation (modes 0 and 1)
2 - vfr via mkv w/ timecodes file output (modes 3 and 5)

I've settled for:

AssumeTFF()
TFM(mode=1, pp=0)
Tdecimate(mode=0, hybrid=1)

TheSkiller
30th October 2010, 08:06
Is it necessary to leave AssumeTFF() if TFM(order=1) is set? They basically do the same thing, don't they?
No, you don't need both, they do the same thing. But since you're using MPEG2Source you actually don't need either one because MPEG2Source reads the field order from your source file and sets the AviSynth internal field order accordingly.


Can I rely on megui for detecting stream type?
I don't know, I don't use megui. All I ever rely on are my own eyes. ;)

Regarding tdecimate(hybrid=1). What does this do?
It sets whether the hybrid or the film parts of your video should be "preferred". Hybrid=1 decimates the hybrid parts down to film frame rate, making them jerky.


I've double checked your sample, it is NOT a hybrid (at least the sample). Trust your eyes, if you get a perfect smooth result (no dupes, no remaining interlacing) without hybrid=1 then it's fine. ;)

hardkorn
26th November 2010, 00:12
Never thanked you. Thanks, you've been of great help.

Back again. I don't want to make a mistake here.
I want to encode my Clint Eastwood collection:),and am not to sure, but I guess my 1st DVD is progressive content. Is it?

http://www.mediafire.com/?tdrnpjyuq0u4pkg

Do I need to add AssumeTFF() if it's progressive or is it enough to just add the path to the d2v file?

Dgindex and Mediainfo detected it as interlaced, Megui as progressive.

Thanks.

manono
26th November 2010, 06:13
The Clint Eastwood one uses a progressive source which was encoded as interlaced. It can be treated as progressive. You don't need to add Assume anything.

Can I rely on megui for detecting stream type?
I wouldn't.

dansrfe
26th November 2010, 07:13
am I going crazy or does that first sample not have a par flag on it and the video without the flag has the right ar? I had no idea that par flags were not required :O