Log in

View Full Version : Deinterlacing Euro-pulldown


Blastfrog
16th July 2022, 00:45
Hi, so, I'm a total newbie to AVIsynth, etc, so please be patient with me.

I have a video source ripped from DVD that is using Euro-pulldown and has 4:2:2 chroma sub-sampling. I don't know if this is standard or not, but interestingly enough, the chroma itself seems to be interlaced (despite being half of the resolution of the luma).

I figure the best thing to do is to de-interlace the chroma separately and merge it back into the (deinterlaced) luma once both steps are done. I've already exported the video to a PNG image sequence, and downscaled it to half without any resampling using Irfanview in preparation for this.

Problem is, AVIsynth is extremely unintuitive to me. I'm sure I'll get the hang of it as I use it, but basically, I need someone to hold my hand for a short while so I can learn the basics.

I already have VirtualDub2, so how do I set up AVIsynth with it, and what script should I use to remove every 25th field and reconstitute the pulldown'd frames back into proper frames? My goal is to bring it back to native 24FPS in the rawest way possible. I don't want any kind of blending, etc.

Sharc
16th July 2022, 11:16
Hi, so, I'm a total newbie to AVIsynth, etc, so please be patient with me.

I have a video source ripped from DVD that is using Euro-pulldown and has 4:2:2 chroma sub-sampling. I don't know if this is standard or not, but interestingly enough, the chroma itself seems to be interlaced (despite being half of the resolution of the luma).

I figure the best thing to do is to de-interlace the chroma separately and merge it back into the (deinterlaced) luma once both steps are done. I've already exported the video to a PNG image sequence, and downscaled it to half without any resampling using Irfanview in preparation for this.

Problem is, AVIsynth is extremely unintuitive to me. I'm sure I'll get the hang of it as I use it, but basically, I need someone to hold my hand for a short while so I can learn the basics.

I already have VirtualDub2, so how do I set up AVIsynth with it, and what script should I use to remove every 25th field and reconstitute the pulldown'd frames back into proper frames? My goal is to bring it back to native 24FPS in the rawest way possible. I don't want any kind of blending, etc.
I have some doubts. DVD's are never 4:2:2. It's always 4:2:0. How did you rip it?

Pulldown removal:
Apply IVTC (Inverse Telecine). Vdub2 has an IVTC filter which you can try.
In Avisynth, IVTC would be
TFM()
TDecimate()

Or upload a sample (few seconds) of your video for collecting more help.

Blastfrog
16th July 2022, 17:41
I have some doubts. DVD's are never 4:2:2. It's always 4:2:0. How did you rip it?I was tired when I wrote that post last night, I definitely meant 4:2:0, not 4:2:2. I ripped it from the disc using MakeMKV, separated out the chapter I wanted with MKVToolNix, and then turned that into an AVI without any reencoding using FFmpeg.

Pulldown removal:
Apply IVTC (Inverse Telecine). Vdub2 has an IVTC filter which you can try.
In Avisynth, IVTC would be
TFM()
TDecimate()Isn't that more for 2:3 pulldown? The video I'm dealing with is using 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.

Or upload a sample (few seconds) of your video for collecting more help.This should demonstrate the kind of interlacing the video has: link (https://drive.google.com/file/d/1QQQx84OmFarPuYmghTI9EnV7UWqGhpkF/view?usp=sharing)

manono
16th July 2022, 20:22
You don't make people jump through hoops to help. Request Access? If it's real Euro Pulldown, then:

TFM()
TDecimate(Cycle=25,CycleR=1)

Blastfrog
16th July 2022, 21:35
You don't make people jump through hoops to help. Request Access?Whoops, I forgot to set it so that anyone with the link can download it! Sorry about that. Fixed.

If it's real Euro Pulldown, then:

TFM()
TDecimate(Cycle=25,CycleR=1)Thanks. Unfortunately, I can't seem to get it to work.

This is what happens when I precede the lines you provided with AviSource("17.avi"):
https://i.imgur.com/KB8FYbP.png

EDIT: This first error does not occur if I export the AVI without any sound. I actually don't need it anyway, since I intend to replace the audio using a different source in post.

And this is what happens when I precede the lines with DirectShowSource("17.avi"):
https://i.imgur.com/t3HQJsB.png

And no, I'm not using Windows 98, I'm just using a theme that looks like it. I'm actually on Windows 10.

EDIT 2: Second error does not occur when I put TIVTC into the plugins folder, it was missing.

It seems to work for the most part, but there is still the occasional interlaced frame still present... Perhaps it's off by a little bit? Is there a way I can offset it by some amount of fields?

Sharc
16th July 2022, 22:41
You have to download the TIVTC package and copy the TIVTC.dll from that package to the avisynth plugins folder.

Edit: Also, your link does not point to your .avi but to a recompressed .mp4 version.

Sharc
17th July 2022, 11:34
It seems to work for the most part, but there is still the occasional interlaced frame still present...
Try something like
TFM()
Tdecimate(cycle=25,cycleR=1)
blur(0,1.5) #blur vertically
awarpsharp(depth=30) #resharpen

StainlessS
17th July 2022, 16:22
Maybe this is not totally out of place in this thread, and could maybe do with a mention here.

Exotic Interlacing by Scharfis_Brain:- https://app.mediafire.com/wl30b5ghmomaw
English and German versions in PDF form.
Also Web Page [cant remember if Eng or German version, maybe both. Original disappeared off the web, but I think Ligh has reposted it on his site].

EDIT: A bit more here:- https://forum.doom9.org/showthread.php?p=1865607&highlight=Exotic+Interlacing#post1865607

And link to it on Ligh's site [link posted by Selur]:- https://www.ligh.de/scharfis_brain/ExotischesInterlacing/