Log in

View Full Version : Help with IVTC and de-interlacing


Moodilic
29th August 2010, 20:50
Hi!

I lack enough knowledge about this but I'd like help on a source I can't figure out how to de-interlace properly.

The source is a NTSC 29.97 fps but it has been telecined (that is my understanding) and it is interlaced, so these two are mixed together.

P P P I I and in other scenes I I I I I.

So what I understand is that they have used film and then interlaced other parts of the video.

I've managed to make it progressive in the telcined scenes but the 5th frame remains.

So what I'd like to do is remove the 5th frame in those scenes and only de-interlace the other scenes so it doesn't remove a frame from the interlaced scenes, if anyone understand what I mean?


Here's a sample:
http://www.speedyshare.com/files/24045934/vts_01_1.vob

Look in the scenes where he passes the construction worker and running towards the tree.
There you have interlaced frames and telcined frames where he jumpes.

Inspector.Gadget
29th August 2010, 21:35
Look into TFM/TDecimate's hybrid handling. That said, a sample showing both types of content would help.

MrVideo
30th August 2010, 05:14
Look in the scenes where he passes the construction worker and running towards the tree.
There you have interlaced frames and telcined frames where he jumpes.

Based upon what you have posted, and the little tidbit I quoted, I do not think you understand interlaced video and the transfer of film to the video medium.

First off, NTSC analog, and PAL analog, are interlaced mediums, period. Every video frame consists of two fields that are interlaced together.

What makes you think you are seeing interlaced frames only at certain points is a result of the 2:3 pulldown (http://en.wikipedia.org/wiki/Telecine) to transfer the 23.976 fps film to 29.97 fps video.

All of the video is interlaced.

Here is a sample script, one that I use to IVTC 29.97 interlaced video to 23.976 progressive video:

LoadPlugin("C:\Program Files\DGAVCDecNV\DGDecodeNV.dll")
dgsource("=DRIVE=\=FILENAME=.dgi")
assumetff()
telecide(post=0)
decimate()

Modify the first two lines accordingly.

Blue_MiSfit
30th August 2010, 11:15
If he's seeing a standard 3:2 pulldown pattern then of course the whole thing is ENCODED interlaced (but maybe never passed over an analog connection in native NTSC).

It doesn't sound like he's seeing a standard 3:2 pattern throughout - it sounds like he's seeing sections of standard 3:2, and then substantial sections that appear to be natively interlaced - i.e. temporally distinct images in each field.

Hybrid video is nothing new. It's actually a fairly common sin; for which the punishment should be eternity in the tenth layer of hell.

I think the OP should pursue the method suggested by Inspector.Gadget. There are well developed tools for handling hybrid video in AviSynth.

Derek

MrVideo
30th August 2010, 17:02
It doesn't sound like he's seeing a standard 3:2 pattern throughout - it sounds like he's seeing sections of standard 3:2, and then substantial sections that appear to be natively interlaced - i.e. temporally distinct images in each field.

I'll need to view the sample he was pointing at to be sure. But it really reads as though he is seeing the classic 2:3 pulldown pattern while stepping through the NTSC frames, i.e., 3 frames that look like still images (no interlace breakup) and then 2 frames that are broken up by interlaced fields (best seen with action).

While it looks like the 3 frames that don't look like they are interlaced, are in fact interlaced.

What leads me to this observation is that he appears to be describing the same scene, not a program like an old Doctor Who where the outside scenes were shot on film and the studio shots were done using video tape (yes I know both were done at 25 fps, but if it was done in the states, it would be 23.976 for the film and 29.97 for the video). From the description it doesn't sound like hybrid material.

Moodilic
30th August 2010, 20:17
Based upon what you have posted, and the little tidbit I quoted, I do not think you understand interlaced video and the transfer of film to the video medium.

First off, NTSC analog, and PAL analog, are interlaced mediums, period. Every video frame consists of two fields that are interlaced together.

What makes you think you are seeing interlaced frames only at certain points is a result of the 2:3 pulldown (http://en.wikipedia.org/wiki/Telecine) to transfer the 23.976 fps film to 29.97 fps video.

All of the video is interlaced.

Here is a sample script, one that I use to IVTC 29.97 interlaced video to 23.976 progressive video:

LoadPlugin("C:\Program Files\DGAVCDecNV\DGDecodeNV.dll")
dgsource("=DRIVE=\=FILENAME=.dgi")
assumetff()
telecide(post=0)
decimate()

Modify the first two lines accordingly.

I've done that already and with tweaks to make sure I get all the frames properly IVTCed however, the rest of the natively interlaced fields now has one frame less which makes it "jumpy" and yes I know that is what you have to live with when making that choice. I also read that you can make the other way around and keep the 5th frame but blend it with the 4th so not to make the other section loose a frame and thus not "skip" a frame.


However I think the best minds is on this forum, isn't there a little more aggresive way of removing the 3:2 pulldown and just de-interlace the rest (in which I see as pure interlaced fields), or can I keep the framrate of 29.97 fps seeing this is the native framerate in Japan so I'd like to keep it that way if possible.

Moodilic
30th August 2010, 20:19
Also, I'm seeing halo effect when there are outdoor-scenes, can I remove or diminish the effects?

MrVideo
30th August 2010, 20:27
I've done that already and with tweaks to make sure I get all the frames properly IVTCed

Did you use my script? Like I said, I really believe that the whole video is 2:3 pulldown built from 23.976 film material.

however, the rest of the natively interlaced fields now has one frame less which makes it "jumpy" and yes I know that is what you have to live with when making that choice. I also read that you can make the other way around and keep the 5th frame but blend it with the 4th so not to make the other section loose a frame and thus not "skip" a frame.

See my above note. I do not believe there is any native 29.97 video in the source. When doing IVTC, you don't throw away every fifth frame.


However I think the best minds is on this forum, isn't there a little more aggresive way of removing the 3:2 pulldown and just de-interlace the rest (in which I see as pure interlaced fields), or can I keep the framrate of 29.97 fps seeing this is the native framerate in Japan so I'd like to keep it that way if possible.

When doing IVTC, you DO NOT DEINTERLACE. If you want 29.97 fps, just don't do anything to it.

More after I look at your sample. I started the download at lunch and will look at it when I get home tonight.

Moodilic
30th August 2010, 20:56
Here's a test sample I made only using TDeint().
http://www.speedyshare.com/files/24046017/test-sample.mkv


MeGUI: x264 DXVA SD profile with CQ @ 20.0.

Script
------

TDeint(order=1)
crop( 2, 2, -2, 0)
Spline64Resize(704,396)

__film = last
__t0 = __film.trim(2037, 2878)
__t0

Nightshiver
30th August 2010, 21:46
That's not what we need. Post an ORIGINAL, un-tampered with source file.

TheRyuu
30th August 2010, 21:59
That's not what we need. Post an ORIGINAL, un-tampered with source file.

Use a non-shitty sharing site too like speedyshare or mediafire.

Moodilic
30th August 2010, 22:09
That's not what we need. Post an ORIGINAL, un-tampered with source file.

No no, this is just a sample during a test encode so you could see if the result is okay if I only use TDeint().

And you can find a sample.vob in my first post.
I'll update the post with a better filesharing site.


Use a non-shitty sharing site too like speedyshare or mediafire.
Sure thing, will update my post shortly.

TheRyuu
30th August 2010, 22:45
Waited 18 minutes for that thing to DL from that first bad sharing site.

Anyway, looks pure interlaced, doesn't look hybrid. Use tdeint, yadif, nnedi, *insert deinterlacer of choice here*. Don't IVTC it.

Moodilic
30th August 2010, 23:25
Waited 18 minutes for that thing to DL from that first bad sharing site.

Anyway, looks pure interlaced, doesn't look hybrid. Use tdeint, yadif, nnedi, *insert deinterlacer of choice here*. Don't IVTC it.

As you could see with the test-sample.mkv, I used tdeint and I thought the result was acceptable, but could you extend your explanation a bit with nnedi for example.

And another Q, why is yadif (for me it is) worse than tdeint? It produces some weird white artefacts on the edges sometimes.

Blue_MiSfit
31st August 2010, 00:16
In that clip:

The opening shot of the buildings is 30p.
The next shot of the woman brushing her teeth is 60i, as are the rest (from the looks of it, I didn't do an extensive analysis).

So, deinterlace it. Here are examples of TDeint / YADIFMod with NNEDI interpolation. Pick one.


# TDeint with NNEDI interpolation
TDeint(edeint=NNEDI())

#YADIFMod with NNEDI interpolation
YadifMOD(edeint=NNEDI())


Derek

MrVideo
31st August 2010, 00:33
In that clip:

The opening shot of the buildings is 30p.
The next shot of the woman brushing her teeth is 60i, as are the rest (from the looks of it, I didn't do an extensive analysis).

So, deinterlace it.

I agree. That source is 100% video. There is zero 23.976p material. I have no idea how the OP determined that there was 23.976 material in that video.

Personally I would do nothing to the source material. Deinterlacing it will reduce the 59.94 motion to 29.97 motion. IMHO, nothing is accomplished deinterlacing video.

TheRyuu
31st August 2010, 00:37
I agree. That source is 100% video. There is zero 23.976p material. I have no idea how the OP determined that there was 23.976 material in that video.

Personally I would do nothing to the source material. Deinterlacing it will reduce the 59.94 motion to 29.97 motion. IMHO, nothing is accomplished deinterlacing video.

I'd rather have it stored on my HD as progressive than interlaced. With nnedi or some other high quality deinterlacer the quality will be fine. If you want to keep all the temporal information just bob it then.

Moodilic
31st August 2010, 00:37
In that clip:

The opening shot of the buildings is 30p.
The next shot of the woman brushing her teeth is 60i, as are the rest (from the looks of it, I didn't do an extensive analysis).

So, deinterlace it. Here are examples of TDeint / YADIFMod with NNEDI interpolation. Pick one.


# TDeint with NNEDI interpolation
TDeint(edeint=NNEDI())

#YADIFMod with NNEDI interpolation
YadifMOD(edeint=NNEDI())


Derek

What version of NNEDI do I need? I've seen NNEDI2 and NNEDI3, besides the original NNEDI.

EDIT:

Okay, I tried with NNEDI and the jagged edges are pretty much gone so for that I'm glad you helped me about that.

However, the NNED2 & 3, can I use them also instead of NNEDI? If so, how does that work with the script code?

Blue_MiSfit
31st August 2010, 02:16
Edge-directed interpolation is a truly amazing thing, huh? Thank tritical for making such awesome avisynth plugins!

Just change NNEDI() to NNEDI2() or NNEDI3() if you want to mess with the other versions.

They all use the same basic parameters, but their internal algorithms are all different. Feel free to try them all :)

Derek

MrVideo
31st August 2010, 03:05
I'd rather have it stored on my HD as progressive than interlaced. With nnedi or some other high quality deinterlacer the quality will be fine. If you want to keep all the temporal information just bob it then.

Do you really save anything by going to progressive from the interlaced source? Once you've done that to the source, there is no going back.

poisondeathray
31st August 2010, 03:22
Do you really save anything by going to progressive from the interlaced source? Once you've done that to the source, there is no going back.

Most people don' t throw out their originals (or at least they shouldn't) .

Moodilic
31st August 2010, 03:33
Edge-directed interpolation is a truly amazing thing, huh? Thank tritical for making such awesome avisynth plugins!

Just change NNEDI() to NNEDI2() or NNEDI3() if you want to mess with the other versions.

They all use the same basic parameters, but their internal algorithms are all different. Feel free to try them all :)

Derek
Awesome, thanks for the help! :thanks:
I will try this. And yes, thanks tritical for making this awesome plugin!

TheRyuu
31st August 2010, 04:42
Do you really save anything by going to progressive from the interlaced source? Once you've done that to the source, there is no going back.

You kill interlacing which should be everyone's goal in life.

MrVideo
31st August 2010, 15:47
You kill interlacing which should be everyone's goal in life.

While I don't disagree with that point, the problem is that if the progressive file is ultimately played back on an analog TV, it has to be interlaced. The original interlaced info has been lost.

But, if it will never be played on an analog device again...

Didée
31st August 2010, 16:43
You kill interlacing which should be everyone's goal in life.
But you're also killing one half of the information that's present in the source. Reducing information should be noone's goal in life.

Moodilic
31st August 2010, 17:25
Okay, now that I've been helped with my needs. There's no need for this thread to stay open and go off topic.

Thanks everyone that helped me!

MrVideo
31st August 2010, 20:57
Okay, now that I've been helped with my needs. There's no need for this thread to stay open and go off topic.

Did you ever answer the query as to why you want to deinterlace the video in the first place? As pointed out, deinterlacing does throw information in the video away, forever.