View Full Version : Need a good frame decimator
NorthPole
5th December 2008, 04:02
I have been looking for a good way to frame decimate from 59.94 fps to 23.976 fps.
I have tried TIVTC, SmartDecimate and Decomb, but none of these methods have the ability (at 59.94 fps) to decimate frames when duplicates are found but blend when no match is found to achieve 23.976.
Both TIVTC and Decomb can decimate and blend from 29.97 to 23.976 but not from 59.94.
Anybody have any ideas....
kemuri-_9
5th December 2008, 04:15
what kind of video are we talking about?
is it similar to 29.97 with every frame duplicated to 59.97 or is it exhibiting more fluidity?
BTW, samples work wonders around these parts....
fbgd
5th December 2008, 08:27
I think FDecimate can do what you are looking for.
scharfis_brain
5th December 2008, 09:59
EDIT: tdecimate(mode=2, rate=23.976) can do what you want...
Comatose
5th December 2008, 10:34
TFM can decimate?
I use TDecimate(cycleR=3) for decimating 59.94 to 23.976... but you should check if you even need to decimate.
NorthPole
5th December 2008, 14:59
what kind of video are we talking about?
is it similar to 29.97 with every frame duplicated to 59.97 or is it exhibiting more fluidity?
BTW, samples work wonders around these parts....
Mostly just 720p hd tv captures... about 98% of the content has a repeating frame pattern of 2 3 2 3... but every once in a while you will get a section of no dups.
@scharfis_brain
I thought TFM was just the frame matcher part of TIVTC
@fbgd
Thanks, I'll try FDecimate
NorthPole
5th December 2008, 15:44
Well, FDecimate is similar to the other three methods that I have tried in that it can decimate from 59.94 to 23.976 but it doesn't have a blend option.
Decomb's Decimate option says:
Decimate(mode=3) is useful for hybrid clips having mostly film. It allows you to decimate the clip to film rates and
treat the film normally while doing a blend decimation of video sequences to retain their smoothness.
This mode would work if you could set the decimation to 3 out of a cycle of 5. However, it is limited to 1 out of a cycle of 5.
TIVTC's TDecimate says
hybrid -
Controls how or if video sections (30p) should be dealt with. Possible
settings:
0 - no handling
1 - blend decimation of 30p sections into 24p and leave 24p untouched (modes 0 and 1)
2 - vfr via mkv w/ timecodes file output (modes 3 and 5)
3 - blend conversion of 24p sections into 30p and leave 30p untouched (modes 0 and 1)
* The hybrid option is not used when mode = 2 or mode = 4, and hybrid > 0
is only currently supported for cycleR = 1!
The hybrid mode could also work if you could set the decimation to 3 out of a cycle of 5. However, it has the same limit of 1 out of a cycle of 5 as Decomb does.
Comatose
5th December 2008, 15:49
No, it doesn't...
I use TDecimate(cycleR=3) for decimating 59.94 to 23.976... but you should check if you even need to decimate.
kemuri-_9
5th December 2008, 15:58
@Comatose
he's looking to use a blend hybrid mode and that mode is only allowed for when the decimation pattern is 1/n for most (if not all) current filters.
@NorthPole
if you post a sample that reflects what you need to be done (exhibits the duplication and fluidity) for the decimation, we could help out better.
Comatose
5th December 2008, 16:00
My bad. I interpreted it as "it's always limited to 1/5"
NorthPole
5th December 2008, 17:38
if you post a sample that reflects what you need to be done (exhibits the duplication and fluidity) for the decimation, we could help out better.
Here are 4 different clips that do not have straight 3-2 decimation.
Clip1
http://www.mediafire.com/?xlbyxadlgrz
Clip2
http://www.mediafire.com/?x6d5xxff0vb
clip3
http://www.mediafire.com/?uvchhmmxooj
clip4
http://www.mediafire.com/?nlzyb5m9tfg
NerdWithNoLife
5th December 2008, 17:43
TFM can decimate?
I use TDecimate(cycleR=3) for decimating 59.94 to 23.976... but you should check if you even need to decimate.
I do that too, it works almost in realtime, while scaling down to SD. The only problem I have is when animated graphics come up on the screen at 30p. If I have time, I use an override file in those cases.
NorthPole
28th December 2008, 22:51
Well, I think that this is the solution that gives me the results I was looking for from the above clips..
loadplugin("c:\program files\media\avisynth\plugins\fdecimate.dll")
loadplugin("c:\program files\media\avisynth\plugins\tivtc.dll")
dgdecode_mpeg2source("__vid__",info=3)
fdecimate(rate=29.97,threshold=3)
tdecimate(mode=1,hybrid=1,noblend=false,nt=1,concycle=1,dupthresh=3,vidthresh=3,vidDetect=2)
NorthPole
3rd January 2009, 03:21
Tweaked the script a bit and have finally settled on ...
loadplugin("c:\program files\media\avisynth\plugins\tivtc.dll")
dgdecode_mpeg2source("__vid__",info=3)
tdecimate(mode=7,rate=29.970029,hint=false,nt=1,dupthresh=2.5,vidthresh=3.5)
tdecimate(mode=1,hybrid=1,hint=false,nt=1,concycle=1,dupthresh=2.5,vidthresh=3.5,vidDetect=2)
csdesigns
6th January 2009, 19:10
So, did that script work for you in properly decimating your sources to 23.976? It looks like you are only decimating to 29.97?
I have a clip that has been giving me fits as well. I have posted it here (http://www.filefactory.com/file/a00hg92/).
I have tried numerous scripts, filters, and methods to bring this clip back to its original frame rate. The problem is that the footage (720p60 MPEG-2 from HDTV capture) was originally shot at 24, then brought to 59.94, and then edited at 59.94, so the cadence is all over the place in this source. I have tried 1, 2, and 3 pass scripts but have thus far been unable to find anything that would be suitable.
Any help that could be provided in creating a script would be greatly appreciated. I'd be willing to settle for a VFR script if that meant that the motion and action was going to remain smooth. Thanks.
csdesigns
6th January 2009, 19:26
I just tried NorthPole's script and I like it very much. There are still a few repeated frames that remain in the result, but it seems to be much cleaner than anything I was able to generate before. If anyone downloads my source, the main area that I am having problems with in the source is frames 465 to 610.
csdesigns
6th January 2009, 20:13
So I have been trying to tweak NorthPole's script, and with the following I have been able to achieve a nice result with frames 465-610. But frames 0-100 are still giving me fits with remaining duplicates.
dgdecode_mpeg2source("F:\Redemption.d2v",info=3)
tdecimate(mode=7,vfrdec=0,hint=false,nt=2,dupthresh=3,vidthresh=5)
csdesigns
7th January 2009, 00:59
I stepped through the only section that is still giving me fits, and for those playing along at home, here is what I counted. At frames 115 through 218, the source has the following pattern of repeated frames (the most likely reasoning for this very odd pattern is that the editor took 24p material that had pulldown applied to it to 59.94, and then slowed some frames even further for effect and then applied some vfx onto the scene at 59.94):
22221111112132534343434343525321112112211212
With such a varying pattern, is it beyond hope to think that getting something "perfect" is impossible? I understand that some "good" frames would be lost from a process like this, but that is more acceptable to me than leaving some of the duplicated frames in the end result. Thanks again for any help anyone can provide.
NorthPole
20th January 2009, 15:36
So, did that script work for you in properly decimating your sources to 23.976? It looks like you are only decimating to 29.97?
@csdesigns
Sorry, I didn't see your earlier posting. I see you have tried the script...
I often get 720p HD caps that do not decimate well because of high pattern variability. I have been tiring to acheive a generic script to get a 23.976 framerate without jerkiness and as a result I have to live with some blending. It's the choice between two evils and I guess I would rather have the blending then the jerkiness. I settled on the above method because:
1. tdecimates only supports hybrid mode (blended) decimation when moving from 29.97 fps to 23.976 fps.
2. I found that tdecimates mode 7 leave a more consistent frame pattern when moving from 59.94 fps to 29.97 fps then mode 0, 1. Additionally, fdecimate works very similar to tdecimates mode 0 or 1. By using mode 7, I got significally less bending in the second decimation from 29.97 to 23.976.
I actually felt that if I was just going to use only one decimation and live with the jerkiness (no blending) that mode 1 with a longer cycle, gave very good results. (however, I didn't check any audio sync issues).
Hope that helped.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.