Log in

View Full Version : interlace - blending - telecine on the same source


martinfrombern
10th August 2009, 03:39
I'm having troubles with this source (historical documentary), so I need a help from you guys.
Source is NTSC and most of it is pure interlace. Additionaly, there are quite a few scenes with historical footage which were telecined in usual 3p-2i fashion. So I started to create a vfr encode (using timecodes in mkv container), when I realized there is also a "third type of scenes". these ones also seem to be some sort of telecine, but with 3i-2p pattern. When I use TFM, I get 1 interlaced and 4 progressive frames pattern (1 interlaced being equal to the first one in the original row of 3). Additionaly, inspecting problem more deeply, it also seems that there are also blended fields in this "problematic type" of scenes.
So the problem is obvious - how to ivtc/deinterlace this type of scenes? what was its "base" framerate? additionaly, how to create vfr encode with this source?
sample here (http://www.sendspace.com/file/j1347u)

shoopdabloop
10th August 2009, 04:18
i've never done hybrid sources before, but maybe find a way to isolate the scenes of each 'type'? then deal with each accordingly?

thewebchat
10th August 2009, 04:55
[this post contains wrong information]

manono
10th August 2009, 15:54
The "base" framerate is 23.976fps and can be easily achieved using SRestore:

Yadif(Mode=1,Order=1)#or your favorite bobber
SRestore(Frate=23.976)

I don't make VFR encodes for MKV, so I can't help there.

thewebchat
11th August 2009, 17:13
manono, how did you reach that conclusion? When I inspected the black/white section, I found 2 progressive frames + 1 progressive frame with rearranged fields + 3 unpaired fields in every 5 frames.

Ah, I took a closer look and was confused by the low contrast. There is indeed further blending and it is a 24fps source.

martinfrombern
12th August 2009, 04:15
thank you both for your effort. i must say i'm quite shocked it's 24 fps, considering that there is a lot of other scenes which are originally 24 fps and all of them were treated with usual 3:2 pulldown.
ok, so manono's srestore tip should obviously work for this scene. however, it seems that now the real problem arises.
as mentioned before, there are three types of scenes

(1) pure interlace 29.97, originally 29.97
(2) 3:2 pulldown, originally 23.976
(3) "weird something", originally 23.976

now, thanks to you guys, i know how to solve each of them separately ((1) - usual deintelacer, (2) - tfm, (3) - srestore).
however, the problem is how to create a script which would check which type a scene is, and then treat it adequately. if there were only scenes (1) and (2) the answer would be something like good old

deinterlaced = yadif(...)
tfm(..., clip2 = deinterlaced, ...)
tdecimate(...)

however, with scenes (3) also present, i really have no idea. additionaly, for vfr encode in mkv container, i need a timecodes file. again, if there were only scenes (1) and (2) it would be relatively simple (using tdecimate option with timecodes output). however, with scenes 3) the problem is that srestore also decimates some frames (prior to tdecimate).
any ideas, even partial?

thewebchat
12th August 2009, 05:36
Do this the old way. Load your d2v to YATTA, make a preset for Bob + SRestore and another one for plain old deinterlacing. Let it use automatic metrics to handle the normal telecine. Mark the NTSC sections as "NO DECIMATE" (unless you want to use bobbers, then you have to do this the really manual way). For the blended sections, set all matches to "c" (no field rearranging) and apply the bob+srestore preset. For the NTSC sections, also set them to "c" and apply your deinterlacing preset. At the end, you can "save all overrides" which will include an automatically generated v1 timecodes file. This works because all sections in your source are either FILM or NTSC.

The other possibility is to go through your source scene by scene and do this:

MPEG2Source("lolwut.d2v")
FILM_FRATE = last.framerate*4/5
Trim(0,100).Bob.SRestore(frate=FILM_FRATE) + \
Trim(101,200).Bob.AssumeFPS(FILM_FRATE) + \
Trim(201,300).TFM.TDecimate + \
Trim(301,400).Bob.SRestore(frate=FILM_FRATE) + \
[...]
Trim(8900,9001).Bob.AssumeFPS(FILM_FRATE)

Then, you can go write your v1 timecodes file with overrides. I recommend not using bobbing as it can make timecodes writing very ugly. Although, since you are changing the frame count, it will always be kind of nasty.

Also, SRestore does its own kind of decimation, so do not use TDecimate after it.

Edit: There is a third, often overlooked, solution. It's actually quite simple. Just don't decimate the film sections. The results are usually not particularly jerky and it will save you a lot of time.