Log in

View Full Version : Deinterlacing nightmare


bokonon
21st April 2008, 22:26
My source is a PAL DVD which i want to deinterlace - however most of the video is progressive (megui's 'analyse' detected it as partially interlaced with varying filed orders!).

MeGUI recommended Yadif(order=-1) so my script looked something like this:
# Set DAR in encoder to 1111 : 625. The following line is for automatic signalling
global MeGUI_darx = 1111
global MeGUI_dary = 625
DGDecode_mpeg2source("E:\[ enc ]\Life in Cold Blood - Disc 1\disc1.d2v",info=3)
ColorMatrix(hints=true,interlaced=true)
Load_Stdcall_Plugin("C:\Program Files\megui\tools\yadif\yadif.dll")
Yadif(order=-1)
crop( 10, 2, -8, -2)

Spline36Resize(704,576) # Spline36 (Neutral)
Undot() # Minimal Noise


Now this worked fine on the interlaced scenes, however it really ruins the progressive ones! Just look at the screenshots below, this is what happens to every single progressive frame (most of the DVD)

Example of affect on PROGRESSIVE frames
source | yadif=-1
http://xs226.xs.to/xs226/08165/source512.png.xs.jpg (http://xs226.xs.to/xs226/08165/source512.png) http://xs226.xs.to/xs226/08165/yadif_-1433.png.xs.jpg (http://xs226.xs.to/xs226/08165/yadif_-1433.png)

I have tried other deinterlacers which seem to have a minimal affect on the progressive frames - but I don't know which one i should be using. Here are the results i've been getting:

Example of affect on PROGRESSIVE frames
no deinterlacing | yadif(order=-1) | Telecide() | Tdeint(order=1)
http://www.imageshadow.com/images/21042008min/source294720_1e2.jpg (http://www.imageshadow.com/view.php?image=source294720_1.png) http://www.imageshadow.com/images/21042008min/P_yedif_order_1_294720_2e2.jpg (http://www.imageshadow.com/view.php?image=P_yedif_order_1_294720_2.png) http://www.imageshadow.com/images/21042008min/P_Telecide_294720_3e2.jpg (http://www.imageshadow.com/view.php?image=P_Telecide_294720_3.png) http://www.imageshadow.com/images/21042008min/P_TDeint_order_1_294720_4e2.jpg (http://www.imageshadow.com/view.php?image=P_TDeint_order_1_294720_4.png)


Example of affect on INTERLACED frames
no deinterlacing | yadif(order=-1) | Telecide() | Tdeint(order=1)
http://www.imageshadow.com/images/21042008min/_nodeinterlacing_294707_1e2.jpg (http://www.imageshadow.com/view.php?image=_nodeinterlacing_294707_1.png) http://www.imageshadow.com/images/21042008min/yedif_order_1_294707_2e2.jpg (http://www.imageshadow.com/view.php?image=yedif_order_1_294707_2.png) http://www.imageshadow.com/images/21042008min/Telecide_294707_3e2.jpg (http://www.imageshadow.com/view.php?image=Telecide_294707_3.png) http://www.imageshadow.com/images/21042008min/TDeint_order_1_294707_4e2.jpg (http://www.imageshadow.com/view.php?image=TDeint_order_1_294707_4.png)

Please advise!

Ranguvar
21st April 2008, 22:52
Try yadifmod with NNEDI, or even better, MCBob with NNEDI.

http://forum.doom9.org/showthread.php?t=129953

Here is MCBob+NNEDI:
http://forum.doom9.org/showthread.php?p=1055263#post1055263
http://forum.doom9.org/showthread.php?p=1055264#post1055264

Mystery Keeper
22nd April 2008, 14:43
You may use my plugin to apply filters only to certain frames ranges. http://forum.doom9.org/showthread.php?t=136415 It may take you much time to create the list of ranges depending on the clip's duration though.

bokonon
22nd April 2008, 14:50
Try yadifmod with NNEDI, or even better, MCBob with NNEDI.

http://forum.doom9.org/showthread.php?t=129953

Here is MCBob+NNEDI:
http://forum.doom9.org/showthread.php?p=1055263#post1055263
http://forum.doom9.org/showthread.php?p=1055264#post1055264

This method seems a bit advanced form me - I'm only a noob!

You may use my plugin to apply filters only to certain frames ranges. http://forum.doom9.org/showthread.php?t=136415 It may take you much time to create the list of ranges depending on the clip's duration though.

Thanks, this plugin is very useful! But it would take far too long for me to select every scene thats interlaced

Based on the screenshots and the fact that my source is PAL DVD would Telecide() be suitable? To me it looks right, but I'd like someone to confirm this so I don't ruin my encode!

Ranguvar
22nd April 2008, 16:28
If Telecide makes the video look good, use it. It means your video is not truly interlaced at all.

And if it is indeed interlaced, challenge yourself with NNEDI. It's not hard at all to use simply. Slow, but NNEDI+MCBob is probably the highest quality deinterlacer available.

All you need to do for MCBob+NNEDI is copy+paste the MCBob script into a .avsi file, put that in your AviSynth plugins directory along with its dependencies, and call it like this:

MCBob()
or
MCBob().SelectEven()

bokonon
22nd April 2008, 18:07
If Telecide makes the video look good, use it. It means your video is not truly interlaced at all.

And if it is indeed interlaced, challenge yourself with NNEDI. It's not hard at all to use simply. Slow, but NNEDI+MCBob is probably the highest quality deinterlacer available.

All you need to do for MCBob+NNEDI is copy+paste the MCBob script into a .avsi file, put that in your AviSynth plugins directory along with its dependencies, and call it like this:

MCBob()
or
MCBob().SelectEven()

Thanks, but if this isn't interlaced, then what is it? If u look at my original screenshots u can see that Telecide() does seem to deinterlace it

http://www.imageshadow.com/images/21042008g/_nodeinterlacing_294707_1.png http://www.imageshadow.com/images/21042008g/Telecide_294707_3.png

I will try MCBob though, does anyone know if i should use SelectEven or not?

Blue_MiSfit
22nd April 2008, 18:33
We can suppose all we want, but without an unprocessed sample, we can't really say!

Let's see a sample. Since it's a DVD, use DGIndex to select a small range, and export an elementary stream. Post it somewhere and link us to it.

~MiSfit

Didée
22nd April 2008, 18:55
1) The "interlacing" might as well be a phase shift. If so, fieldmatchers like Telecide() or TFM() are the recommended tools to correct it.
(Check if "DoubleWeave().SelectOdd()" makes the interlaced sections progressive. If yes, then it's dynamic phase shift.)

2) Do NOT use MCBob on
- progressive (phase shifted) content
- telecined content.

MCBob isn't aware that something like "progressive" does exist at all. 'True' interlacing is the only thing it knows about.

bokonon
22nd April 2008, 19:20
We can suppose all we want, but without an unprocessed sample, we can't really say!

Let's see a sample. Since it's a DVD, use DGIndex to select a small range, and export an elementary stream. Post it somewhere and link us to it.

~MiSfit

I hope i did it right....

File: VTS_02_1.demuxed.m2v
DownloadLink: http://rapidshare.com/files/109588819/VTS_02_1.demuxed.m2v

2Bdecided
23rd April 2008, 11:08
Life in Cold Blood (which this is - and the waving frogs were my favourite part!) is mixed interlaced and progressive. There aren't too many jumps between the two (though I haven't watched all episodes).

I hope someone else can provide a good way to handle it - I didn't find that mcbob with nnedi was very good for mixed content - great for interlaced, a waste for progressive.

Cheers,
David.

thehug
23rd April 2008, 14:14
Looks a bit like the interlaced parts have been encoded as progressive, you can kind of see blocking in that video.

Using TDeint looks ok for me, some slight artifacts in places.

vid = mpeg2source("VTS_02_1.demuxed.d2v")
vid = TDeint(vid, mode=2, order=1, type=3)
return vid

setarip_old
23rd April 2008, 15:51
@bokonon

Hi!

I am aware that this is the Avisynth sub-forum but, as an experiment, if you run your sample through MPEGMediator (Using "Open DML .AVI", with "Deinterlace" set to "Auto"), I believe you'll be quite pleased with the resultant output...