Log in

View Full Version : Deinterlacing Impediment


mrsnail
3rd June 2004, 11:37
Hi.

I've never really understood all the various deinterlacing methods available and which one to choose etc, even after spending days upon days reading about them.

I have a PAL DVD movie which has a couple of minutes worth of very interlaced hand held video camera footage I would like to convert to mpeg2.

I modified my Avisynth script with ApplyRange to deinterlace the interlaced section of video with the FieldDeinterlace method. It makes a slight improvement, but there is heavy ghostnig and there is still noticeable combing during movement.

I tried the Telecide method and played around with many of the FieldDeinterlace settings which made little or no difference.

The deinterlacing part of my script is:
ConvertToYUY2(interlaced=true)
ApplyRange(3398, 3921, "FieldDeinterlace", true)

I tried with ConvertToYUY2(interlaced=true) and without it and it made no difference to the outcome.

These are some examples of no deinterlacing (http://insoul.net/nodeinterlacing.jpg) and with FieldDeinterlacing (http://insoul.net/deinterlaced.jpg) after being encoded.

I wondered whether that the outcome I have is likely going to be the best I will be able to achieve, or whether there is somethign else to try which may make a difference.

Thanks very much for you time :)

Bogalvator
3rd June 2004, 12:38
If you set the "blend" option to false, it will solve your issue.

However I receommend you check ot KernelDeint for better results. It is by the same author as FieldDeinterlace and is availiable at:

http://neuron2.net/kerneldeint/kerneldeint.html

Guest
3rd June 2004, 12:41
Blending is enabled by default for FD and you've left it on with your args specification. Try this:

ConvertToYUY2(interlaced=true)
ApplyRange(3398, 3921, "FieldDeinterlace", true, 7, 7, false, false, true, "", false, false)

The argument order is:

full
threshold
dthreshold
map
blend
chroma
ovr
show
debug

Using an interlaced color space conversion on your progressive parts may be problematic. What is the color space of your source? There may be no need to convert it, because FD supports YV12.

mrsnail
3rd June 2004, 13:40
Thanks for the input. I tried both suggestions and unfortuantly there seems to be little gain by turning off blending (http://insoul.net/blendingoff.jpg) :\

The KernelDeint plugin also gave very similar results. The colour code seems to be YUY2. I'm not sure what to do now :|

Didée
3rd June 2004, 14:31
Please post your full script. Furthermore, a short sniplet of the interlaced section of your source would be very helpful.
Only then the deinterlacing experts here (not me) can provide more help.

Because, something is just not right here. Either you make something wrong in your script, or the interlaced section contains blended fields.

- Didée

trevlac
3rd June 2004, 14:32
Do you need to deinterlace?

Generally, people who use mpeg2 are making DVDs or SVCDs to be viewed on a TV. If this is the case, it is better Not to deinterlace footage such as yours.

mrsnail
3rd June 2004, 14:49
Ok, there is a 7 second sample of the source file here (http://insoul.net/sourcesample.vob) (video only) if that is helpful to anyone.

The entire script is:

LoadPlugin("E:\mpeg2dec\MPEG2D~1.DLL")
LoadPlugin("E:\mpeg2dec\Decomb.dll")
mpeg2source("G:\project.d2v")
BicubicResize(480,448,0,0.6,14,1,692,574)
AddBorders(0,64,0,64)
ApplyRange(1498, 3161, "FieldDeinterlace", true, 7, 7, false, false, true, "", false, false)
AddAudio()

As to whether it needs deinterlacing or not, I am more curious about learning how to overcome such a problem and learn more about interlacing and indeed encoding techniques as a whole than watching the film.

Although once encoded, I would be watching it on my computer, and intend to encode it to an AVI file as well, which will definately be played on my computer.

Thanks :)

Didée
3rd June 2004, 15:54
Ah, my suspect was right.

...
mpeg2source("G:\project.d2v")
BicubicResize(480,448,0,0.6,14,1,692,574)
AddBorders(0,64,0,64)
ApplyRange(1498, 3161, "FieldDeinterlace", true, 7, 7, false, false, true, "", false, false)
...
Never ever resize vertically before deinterlacing. Never!

What you actually did was:

- first, destroy the interlacing structure
- then, handle the destroyed video to FieldDeinterlace


You need to handle the NOT resized source to FieldDeinterlace (cropping is OK, though). Afterwards, you can resize so much as you want.


- Didée

mrsnail
3rd June 2004, 16:09
:D :D :D

*jumps up and down*

I feel such a fool now :)

If I had taken the time to look at the script and thought about what each line was doing I wouldn't have needed to bother you all ^-^

I fixed the script as you suggested Didée, and it deinterlaced fantastically (http://insoul.net/fantastic.jpg) with the settings previously mentioned :)

Thanks everyone for all your help, I now see the whole avisynth process in a new way, and will be reading some more about it :)