I have a bunch of 60i video that needs to be IVTC'd to recover the progressive frames.
My problem is, depending on what IVTC method I use, I occasionally get duplicated frames for some reason. I can use one method on one clip and it's completely fine. And using that on another will cause duplicated frames.
I've been using
uncomb()
decimate(5)
telecide(1)
decimate(5)
tfm()
tdecimate()
I know they were all originally shot at 23.976p, but I'm guessing the way it was broadcast is throwing that IVTC filters for a loop.
What I'm looking for is a script that I can use to find out which works best with each video. Ideally it would output a text file and show me, if there are any duplicated frames. Then I can decide based on that which IVTC method will work best for that specific video.
Is there an avisynth script that will do just that?
Thanks
+ Reply to Thread
Results 1 to 16 of 16
-
-
The potential issue is "duplicates" are detected based on a threshold value. With broadcast noise and temporal compression a true duplicate might "look" different due to compression differences. If you set the wrong value you will either miss some or detect false positives. You can use WriteFileIF() with YDifferenceFromPrevious() . Use show=true to tweak the threshold value that is appropriate for your source
Or another approach would be to look at the actual differences detected between frames e.g. look at the dedup log file. You can examine it in spreadsheet program - that way you don't miss any -
Sometimes unusual pulldown patterns are used so the usual "remove 1 of every 5 frames" decimation doesn't work. You can often get around this with TDecimate(Cycle=10, CycleR=2) rather than the default TDecimate(Cycle=5, CycleR=1). Progressive PAL is sometimes converted to NTSC with with a 3:2:3:2:2 pulldown and can be converted to 24.975 fps with TDecimate(Cycle=12, CycleR=2), or 25 fps with TDecimate(mode=2, rate=25). Be aware that pulldown can be used to convert any frame rate from 19.98 fps to 29.97 fps progressive to 29.97i. So you need to decimate to the right frame rate to get no duplicates and no drops.
-
Thanks guys
I will give the WriteFileIF() and YDifferenceFromPrevious() a try. And also changing the TDecimate parameters.
jagabo - I know the source is definitely a 23.976 source...as it was a North American production. I'm thinking it may be an issue with the broadcast noise and compression that is causing the IVTC to fail in certain spots. The show was originally shot on 16mm film so there is definitely some grain in the picture. That combined with mpeg2 compression is likely causing my issue. -
So here is an example of a shot where telecide().decimate(5) causes jerkiness.
However, uncomb().decimate(5) properly matches fields and removes the duplicate frames.
I have others that are the exact opposite. Problem is, I don't know if its the same throughout...because it's only at certain spotsLast edited by nesburf; 26th Aug 2015 at 20:15.
-
I don't seem to have a problem with that sample.
Code:AssumeTFF().TFM().TDecimate()
- My sister Ann's brother -
nesburf - how are you loading the videos? What is the source filter used ?
There doesn't seem to be any problems with any method
EDIT: sorry, telecide().decimate() does have a duplicate , at least at default settings. Probably the noise pattern is giving it problems. A "duplicate" can be confused as a non duplicate because of different noise patterns. In this specific case, it's a field matching issue with Telecide
Did you say TFM.TDecimate fails on other sections at default settings?Last edited by poisondeathray; 26th Aug 2015 at 22:00.
-
here is my script
SetMemoryMax(512)
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll")
SetMTMode(6,8)
dgsource("test1.dgi")
uncomb() or telecide(1)
decimate(5)
SetMTMode(2,8)
crop(4,6,-4,-4)
LanczosResize(640,360)
That's why I was looking for a way to detect if there was any duplicate frames and output it to a text file. I could try different IVTC methods, and then pick which one would work best for each video. This way I wouldn't have to watch each episode to find out if there are duplicates. -
I don't know if you noticed this but your source has a field location problem -- the top field is below the bottom field rather than above it. You need to SwapFields() before ivtc.
The 14+ logo doesn't have this problem so it looks like it was broadcast this way!Last edited by jagabo; 27th Aug 2015 at 07:14.
-
Like poisondeathray and jagabo said, you run into all kinds of things with frame rate work. With an HD PVR I recorded a whole season 1 of an Australian import broadcast as NTSC on PBS. For every season 1 episode I noted what looked like 3 "interlaced" frames in a row, very consistent for the whole 50 minutes. None of the IVTC routines worked. I got 23.976 fps progressive and no glitches with this code:
Code:QTGMC(whatever preset) sRestore(frate=23.976)
Code:QTGMC(whatever preset) sRestore(frate=25) AssumeFPS("ntsc_film",sync_audio=true)
Then I have another BBC import series from the UK recorded off PBS with the HD PVR, and plain old TFM().TDecimate() works every time.
There are umpteen threads here and at doom9 about routines to detect one kind of frame problem or another. None are perfect, many gives unpredictable results. And sometimes you run into nightmares like blended frames/telecine and other whacky stuff that can't be totally fixed.Last edited by LMotlow; 27th Aug 2015 at 07:29.
- My sister Ann's brother -
the cap is actually an HDMI capture from a cable box. So I'm wondering if the encoder is actually screwing up the field order.
-
One of the reasons for the differences between telecide() and uncomb() is an orphaned field at the first field of the fade in. Uncomb() passes that through without any post processing. telecide() matches the next pair of fields leaving no combing. Both also fail to match one frame later in the sequence, leaving comb artifacts. Lowering vthresh to 40 in telecide() takes care of that.
-
But the 14+ logo doesn't have the problem. So if the capture device swapped the fields, the logo was overlaid with the fields swapped and the capture device fixed it. You should check other caps from the same device.
I'd be curious to see if swapping the fields takes care of your problem with telecide().decimate(5) on the other clips. -
I will give that a shot and see.
Also going to try recording some other channels and see if they exhibit the same issue
Similar Threads
-
Script to detect duplicate frames?
By kieranvyas in forum EditingReplies: 30Last Post: 22nd Aug 2015, 20:01 -
Remove duplicate text from SRTs
By cal_tony in forum SubtitleReplies: 8Last Post: 4th Jun 2014, 10:31 -
Delete duplicate frames in a pattern
By dexter30 in forum Newbie / General discussionsReplies: 2Last Post: 19th Sep 2012, 08:53 -
Help deleting duplicate frames in a pattern
By dexter30 in forum Video ConversionReplies: 7Last Post: 5th Jun 2012, 11:17 -
Deleting duplicate frames on clip
By Jonz in forum EditingReplies: 4Last Post: 9th May 2012, 21:32