I have a BFF 1080i source running at 29.97 fps that exhibits an obvious standard telecine pattern of 3:2 (see source)
[Attachment 50564 - Click to enlarge]
However, when running TIVTC using the following script: DGSource("VOB\V02.dgi") AssumeBFF() TFM(slow=2, pp=0) TDecimate() I am left with a video that still displays extreme combing and some sort of blending, on a 3:1 pattern.
[Attachment 50566 - Click to enlarge]
What could be wrong here? I must point out that the m2ts only has one specific scene that is telecine, I'm wondering if the process is failing because the pattern starts on an odd frame or something, but I'm not sure what to do about it. (Also, I'm sorry, but the source being what it is, I cannot upload a safe sample )
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
You have an interlaced YV12 chroma problem. Do you have any color format conversions in your script? If so make sure you specify "interlaced=true". Maybe the source was encoded incorrectly? Otherwise, a sample is needed.
-
Hmm, this is what MediaInfo reports for the source
Code:ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : VC-1 Format profile : Advanced@L3 Codec ID : 234 Duration : 27 min 37 s Bit rate : 21.0 Mb/s Width : 1 440 pixels Height : 1 080 pixels Display aspect ratio : 2.000 Frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Bottom Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.451 Stream size : 4.06 GiB (95%)
It could be an issue with the source I'll try to get a SFW sample. -
Okay, this is SFW https://mega.nz/#!ch5BQICJ!iECHQsQV2ddw1TseuTFut7FKo_2djCMX9jHmRKJBF1A
Funny thing, I cut this sample using DGIndexNv > Output trimmed TS, and MediaInfo now reports it as TFF instead of BFF? -
Step through it viewing the fields after SeparateFields(). You'll see that your fields are corrupted with what looks like chroma ghosting.
-
Yes, the chroma was screwed up before you got it. I came up with this as a possible fix:
Code:########################################################################## # # Every frame is replaced by a motion interpolated frame from the frame # before and the frame after. # ########################################################################## function InterpolateAll(clip c) { e = SelectEven(c).DoubleFPS2().SelectOdd() o = SelectOdd(c).DoubleFPS2().SelectOdd() Interleave(e,o) Loop(2,0,0) } ########################################################################## LWLibavVideoSource("D:\Downloads\sample2.m2ts") TFM() TDecimate(chroma=false) interp = MergeChroma(last, InterpolateAll()) ConditionalFilter(last, last, interp, "current_frame%4", ">", "0")
-
Oddly, I'm lacking the DoubleFPS2 function, and I can't find it anywhere :thinking:
Is this that one?
Code:function DoubleFPS2(clip source){ super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4) backward_1 = MAnalyse(Cnr2(Cnr2(super)), chroma=true, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24)) forward_1 = MAnalyse(Cnr2(Cnr2(super)), chroma=true, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24)) backward_2 = MRecalculate(super, chroma=true, backward_1, blksize=8, searchparam=1, search=3) forward_2 = MRecalculate(super, chroma=true, forward_1, blksize=8, searchparam=1, search=3) backward_3 = MRecalculate(super, chroma=true, backward_2, blksize=4, searchparam=0, search=3) forward_3 = MRecalculate(super, chroma=true, forward_2, blksize=4, searchparam=0, search=3) MBlockFps(source, super, backward_3, forward_3, num=2*FramerateNumerator(source), den=FramerateDenominator(source), mode=0, blend=false) }
-
Unfortunately the result is inconsistent, whenever there's a little too much motion it simple does not work.
EDIT: Spoke too soon, I had a AssumeBFF() left that messed up the result. It's not perfect but considering the source it's quite acceptable, unless someone comes up with a better solution. Thanks jagabo. -
Yes, the code worked ok for this clip but I expected it to mess up when motions got to large. I have a better idea (one that avoids motion interpolation) but not working code yet...
-
Ok, got it:
Code:LWLibavVideoSource("D:\Downloads\sample2.m2ts") SeparateFields() PrevChroma = MergeChroma(last, last.loop(2,0,0)) # replace chroma of each field with the chroma of the field before it Interleave(last, PrevChroma) # interleave the two streams so we can easily pick the fields we want SelectEvery(20, 1,2,5,6,8,10,12,14,16,18) # pick the good ones Weave() TFM() TDecimate()
-
OK, yeah this produces better results, but I'm afraid I don't understand enough of it to apply the process to different sections properly. The telecine pattern does break in between sections, so I would need to offset it. I suppose it's only about changing the selection pattern in SelectEvery but watching field by field I am unsure how you came to the current pattern. I'm using only this portion
Code:SeparateFields() PrevChroma=MergeChroma(last, last.loop(2,0,0)) Interleave(last, PrevChroma)
-
-
Alright, for anyone wondering, I ended up splitting the video by finding where the pattern was resetting and IVTC those segments individually. After that I was left with some combing during the fade transitions so I used QTGMC on those segments. Result is quite good, thank you again jagabo for your precious help!
Code:DGSource("VOB\V02.dgi") SeparateFields() PrevChroma=MergeChroma(last, last.loop(2,0,0)) Interleave(last, PrevChroma) P1=Trim(0,8431).SelectEvery(20, 1,2, 5,6,8,10,12,14, 16,18).Weave().TFM(pp=0).TDecimate() P2=Trim(8432,24423).SelectEvery(20, 1,2, 5,6,8,10,12,14, 16,18).Weave().TFM(pp=0).TDecimate() P3=Trim(24424,136751).SelectEvery(20, 1,2, 5,6,8,10,12,14, 16,18).Weave().TFM(pp=0).TDecimate() P4=Trim(136752,183303).SelectEvery(20, 1,2, 5,6,8,10,12,14, 16,18).Weave().TFM(pp=0).TDecimate() P5=Trim(183304,0).SelectEvery(20, 1,2, 5,6,8,10,12,14, 16,18).Weave().TFM(pp=0).TDecimate() P1++P2++P3++P4++P5 PA=Trim(0,1677) PB=Trim(1678,1691).QTGMC(preset="Slower", FPSDivisor=2) PC=Trim(1691,4878) PD=Trim(4879,4893).QTGMC(preset="Slower", FPSDivisor=2) PE=Trim(4894,27336) PF=Trim(27337,27354).QTGMC(preset="Slower", FPSDivisor=2) PG=Trim(27355,36652) PH=Trim(36653,36666).QTGMC(preset="Slower", FPSDivisor=2) PI=Trim(36667,0) PA++PB++PC++PD++PE++PF++PG++PH++PI
-
For others who might be reading, this "fix" is copying the good chroma of a top field to a bottom field with messed up chroma (or vice versa). It works here because the two fields are from the same film frame. The chroma is slightly displaced vertically (not temporally) but that's better than the blended chroma of the source.
Similar Threads
-
IVTC for dummies
By olpdog in forum User guidesReplies: 3Last Post: 30th Sep 2018, 23:25 -
2 questions about IVTC in Avisynth
By Megafox in forum Newbie / General discussionsReplies: 13Last Post: 22nd Feb 2018, 21:56 -
2 questions about IVTC in Avisynth
By Megafox in forum Newbie / General discussionsReplies: 0Last Post: 21st Feb 2018, 16:24 -
Help to IVTC this source
By Imy in forum RestorationReplies: 20Last Post: 6th Nov 2017, 11:24 -
I have a problem with IVTC
By thakingspeez5 in forum Newbie / General discussionsReplies: 5Last Post: 15th Aug 2017, 16:28