Log in

View Full Version : What's this interlace pattern?


gte024h
31st January 2005, 08:48
I have a few Region 1 NTSC DVD's that I am trying to process into Xvid and they have a peculiar interlace pattern that has stumped me.

Here is a sample taken from one of the VOB's (using TMPGEnc's MPEG Tools to cut it).

The clip is a horizontal pan that clearly shows a pattern. I have proccessed this particular clip using fielddeinterlace, Telecide&Decimate, and Dgbob&Repal and each time it looked like ass.

Fielddeinterlace looked best, but it still had uneven ghosting. If the source were originally fully interlaced, the ghosting would be uniform throughout the pan.

For those unable or unwilling to d/l the test file, the effect looks like a progressive frame, then the following frame has a slight interlace, the next is more interlaced, then very interlaced, then less interlaced, then less interlaced, then progressive. This is for a steady continuous pan, so if it were just straght interlaced, the pattern should show a steady amount of "interlace offset" from frame to frame.

In the past repal has worked well for odd patterns, but it doesn't look very good at all for this one. I also tried using restore24, but I couldn't make it work (and I couldn't find any good instructions on how to use it). I have tried all the different telecide guide settings and none of them seem to work either.

Anyone have some experience dealing with this?

Leak
31st January 2005, 09:54
Originally posted by gte024h
I have a few Region 1 NTSC DVD's that I am trying to process into Xvid and they have a peculiar interlace pattern that has stumped me.

Here (http://parametric.org/~gte024h/clip.m2v) is a sample taken from one of the VOB's (using TMPGEnc's MPEG Tools to cut it).

The clip is a horizontal pan that clearly shows a pattern. I have proccessed this particular clip using fielddeinterlace, Telecide&Decimate, and Dgbob&Repal and each time it looked like ass.

Fielddeinterlace looked best, but it still had uneven ghosting. If the source were originally fully interlaced, the ghosting would be uniform throughout the pan.

What exactly is this from? Looks to me like it was converted from PAL to NTSC (i.e. blending 5 frames into 6 to do 25->30 FPS), which would explain the fields themselves containing blends.

manono
31st January 2005, 12:56
Hi-

It's definitely PAL to NTSC. RePAL worked well on that short clip, but, of course, I don't know how it would do on the whole thing. If you want to try Restore24, I guess you'll have to get it to work for you. If you can be specific about the kinds of error messages you get when loading the Restore24 script into VDubMod, and your script, I'm sure scharfi or Didée can diagnose it.

I guess you've seen scharfis_brain's Restore24 all-in-one package by now. It includes good instructions how to set it up:

http://forum.doom9.org/showthread.php?s=&threadid=75432&highlight=restore24

gte024h
31st January 2005, 21:17
This clip is from "All Night Bodega" which according to IMDB was made in the US. So it's suprising that it was originally PAL. I took another look at repal and it does an OK job except for this effect (magnified 200% to make it clear):

http://parametric.org/~gte024h/clip.jpg

I think a decent spatial smoother might take care of it though. I would like to see if restore 24 would look better, but I can't get it to work.

I downloaded the Restore24 package and put the plugins into my windows directory (so that they would be in the PATH and accessible from any program). I put restore24.avs and r24-example.avs in the same folder with my rips, then changed the example to look like this:

setmemorymax(768)
import("C:\rips\restore24.avs")
loadplugin("masktools.dll")
loadplugin("tdeint.dll")
loadplugin("leakkerneldeint.dll")
loadplugin("dgdecode.dll")
loadplugin("avisynth_c.dll")
loadcplugin("smartdecimate.dll")
loadCplugin("ibob.dll")

mpeg2source("C:\rips\All Night Bodega.d2v",cpu=4,iPP=true)

a2=r24kernelbob(0)

b2=TDeint(mode=1,tryweave=false)

restore24(a2, b2)


I get "Unable to load "MaskTools.dll" that way (even if I specify the full path for each dll), so then I thought maybe the dll's included in the package go in the Avisynth plugins directory, but if I move them there, I get: "Avisynth: script open failed!"

I'm using Avisynth 2.5.5 with VirtualDubMod 1.5.10. Any ideas?

scharfis_brain
31st January 2005, 21:21
your picture clearly shows, that your deinterlacing filter uses a FAR too high threshold. lower it!

I would not recommend repal anymore.
sure, it is fairly easy to use, but it returns 24.975fps instead of 25fps, also restore24 has a better stability and image quality, due to the deinterlacers used.

when using restore24 with PAL content in NSTC Video, you need to adjust the decimation ratio as shown in the information file!

regarding masktools: Do you use a P4 with Hyperthreading enabled?

gte024h
31st January 2005, 22:04
Yes, I am on a P4 with hyperthreading. Does that matter?

gte024h
31st January 2005, 22:12
Just did a search on masktools and hyperthreading... I have the latest version now. I'm going to see if I can make restore24 work.

I noticed in the restore24 readme file it says that with the 2997,6520 ratio, you can only process about 50 minutes of video... it also mentions using 24,50 instead to work around that problem (but it makes the video 24FPS instead of 25). Any advice on which one to use? (I'm not looking foward to chopping this movie into pieces and then stitching it back together).

EDIT: Ignore that paragraph... the correct ratio is 1250,2997, I was confused.

gte024h
31st January 2005, 22:25
Just checked it out with restore24 using:

restore24(a2, b2, 1250, 2997)

and the result is better than repal:

http://parametric.org/~gte024h/clip2.jpg

I think I might need to tweak the TDeint parameters. I just started reading the TDeint readme and there are a lot of parameters. Perhaps someone could point out the one(s) that are likely to clean this up the most?

scharfis_brain
31st January 2005, 22:25
uhm.
you didn't read the readme carefully enough!


25fps blended into NTSC:
1250, 2997
this is similar to rePAL, exept that it has better blend recognition
and matches the 25fps perfect (rePAL puts out 24.975 fps)


this means, you need to use

restore24(a2,b2,1250,2997)

I did NOT made any tests how long the video can be with this decimation ratio.
but I think it will be at least 100 minutes of video that can be processed with this ratio.
Test it yourself!

note: r24 will not work with the latest masktools by default.

read more here:
http://forum.doom9.org/showthread.php?s=&threadid=88012&highlight=masktools

gte024h
31st January 2005, 22:34
Sorry about the confusion, I got it all working now, and it looks better. I just redid the second screenshot above and it looks better... still I think a little smoothing might help.

As it is, it will take days to process these dvd's so I might just live with it, any more processing and my CPU might melt ;-)

Restore24 is some neat stuff, I thank you scharfis_brain. Perhaps someday it can be packaged as a dll to make it easier and faster? For now this will do just fine.

gte024h
31st January 2005, 22:47
BTW, can I use the setmemorymax to allocate more memory and speed things up? I commented it out and it seems to work fine.

manono
1st February 2005, 00:43
Hi-

So it's suprising that it was originally PAL.

Surprising maybe, but not at all uncommon. I see that kind of thing all the time. As near as I can tell, the PAL DVD of the movie probably came out first, and then rather than going back to the original film elements to create a proper NTSC master, the already existing PAL master was used instead. Saved someone a thousand bucks, with the result that a crappy R1 NTSC DVD was created. This is especially common with R1 DVDs of Japanese movies (an NTSC country), although I've also seen quite a few American movie DVDs like this.

I did NOT made any tests how long the video can be with this decimation ratio.

I've done a number of whole movies using that ratio. I didn't pay much attention to the movie lengths, but haven't had any problems.

...can I use the setmemorymax to allocate more memory and speed things up?

Someone better than I will have to answer that one. I also don't notice any difference in encoding speed with or without it.

By the way, about adding additional smoothing; my opinion is this kind of DVD is smoothed quite a bit to begin with, and shouldn't be smoothed any more. Take that with a grain of salt. :)

gte024h
2nd February 2005, 19:54
Well after 28 hours of processing my 90 minute DVD, it is done and restore24 did a fine job! The restore24 "package" should be updated and put in the download area (either on doom9 or on avisynth.org).

Thanks guys for helping me out once again with my IVTC woes :-)