Log in

View Full Version : De-interlacing dropping single frame


dcxero
21st November 2018, 08:09
I'm trying to frame match a few widescreen PAL DVD sources to their full frame NTSC DVD cousins, so I can get the proper audio with the proper picture. In some of my sources, I noticed the PAL source having an extra frame or two on scene changes when frame matching in AviSynth. I was using a simple "TFM().TDecimate()" on the NTSC source since they're 100% FILM per DGIndex, so instead I threw in "SeparateFields().SelectEven()" to investigate if it was really missing, and sure enough there's the missing frame in the NTSC source (doesn't show using "SeparateFields().SelectOdd()")

My question is, since I don't really care about the NTSC video being properly preserved, what's the best way to de-interlace it to best match its (NTSC) audio? Ie, would a normal set top DVD player ignore that frame as well during playback/would I want to keep it out of my PAL frame-matched encode to best keep audio sync?

Here's my current script I was using to frame match that was working until my trouble discs :D:

#Sources
#PAL source
PAL=MPEG2Source("D:\Files to Edit\Source\PAL\S01E01\PALsource.d2v",cpu=0).Crop(2,4,-2,-4).z_Spline36Resize(960,540).AssumeFPS("ntsc_film")

#NTSC DVD for frame matching
NTSC=MPEG2Source("D:\Files to Edit\Source\NTSC\NTSCsource.d2v",cpu=0).TFM().TDecimate().z_Spline36Resize(768,576).AddBorders(128, 0, 128, 0, color=$000000).z_Spline36Resize(960,540)


#Cuts
Part01=PAL.Trim(39,20280)
Part02=PAL.Trim(20284,37870)
Part03=PAL.Trim(37892,53660)
Part04=PAL.Trim(53671,67030)
Part05=PAL.Trim(67073,74560)
Part06=PAL.Trim(74566,91300)
Part07=PAL.Trim(91314,105310)
Part08=PAL.Trim(105331,124515)


#Merge cuts
Film=Part01+Part02+Part03+Part04+Part05+Part06+Part07+Part08


#Uncomment for DVD frame matching / comment for final cut
#StackVertical(Film,NTSC)
#Interleave(Film,NTSC)


#Uncomment for final cut / comment for DVD frame matching
Film

manono
21st November 2018, 21:35
I was using a simple "TFM().TDecimate()" on the NTSC source since they're 100% FILM per DGIndex...

If it's really 100% FILM, set the field operation for Forced Film and get 23.976fps without the IVTC.

My question is, since I don't really care about the NTSC video being properly preserved, what's the best way to de-interlace it to best match its (NTSC) audio?

Either I'm not understanding or you miswrote something. Neither an IVTC nor a Forced Film changes the film length so nothing has to be done with the original NTSC audio to keep it in synch with the original NTSC video.

If I'm understanding correctly, you're slowing the PAL source to film speed and hoping to match the NTSC audio with it? And the NTSC audio is longer than is the slowed PAL video? Or shorter? And by about how much by the end? Have you considered stretching the audio to match the video length?

hello_hello
22nd November 2018, 00:41
I'm trying to frame match a few widescreen PAL DVD sources to their full frame NTSC DVD cousins, so I can get the proper audio with the proper picture. In some of my sources, I noticed the PAL source having an extra frame or two on scene changes when frame matching in AviSynth. I was using a simple "TFM().TDecimate()" on the NTSC source since they're 100% FILM per DGIndex, so instead I threw in "SeparateFields().SelectEven()" to investigate if it was really missing, and sure enough there's the missing frame in the NTSC source (doesn't show using "SeparateFields().SelectOdd()")

Maybe I'm having a stupid, but how do you see a missing frame after SeparateFields().SelectOdd()? You'd see a missing field rather than a missing frame, but could it be a repeated or orphaned field?

https://upload.wikimedia.org/wikipedia/commons/d/d2/Three-two_pulldown_diagram_%28telecine%29.png

Using the picture above as an example, what if the original frame B was the last frame of a scene? SeparateFields().SelectOdd() applied to frame #3 of the telecined version would show you a field from the "current" scene, while SeparateFields().SelectEven() would show you a field from the next scene. I'm wondering if that's partly the sort of thing you're seeing.

I assume the extra PAL frames on scene changes are in addition to the frames you've already skipped in your posted script? I'm sure I've seen that sort of thing several times before, and even when comparing progressive 25fps and 23.976fps HD versions. I don't know why, but the last time I combined 25fps video with 23.976fps audio I found the 25fps video often had one less frame at the end of scenes, and they were both 1080p. If decoding with Force Film as manono suggested doesn't make a difference, all you can do is drop or repeat a frame at the beginning or end of scenes as required. If the scene changes are lined up that way it should be close enough.