I've got an old VCR capture from a UK TV show (thus it was broadcast at 25 fps).
The video is 29.97 fps.
It has a timecode which shows the original frame numbers (confirming the original 25 fps ).
I see the pattern of frames:
1 2 3 3 4 5 6 7 8 8 9 10 11 12 13 13 ....
i.e. every 5th frame is duplicated.
I think that Decimate can do this, but I can't find an intelligible explanation of how to configure it.
So I used SrestoreWhich works, but the result gives a noticeable jerk about once a second.Code:AssumeFPS(30,sync_audio=true) dclip=Crop(218, 26, -332, -398) # detection clip srestore(frate=25, dclip=dclip)
Is there a better way to do this?
+ Reply to Thread
Results 1 to 15 of 15
-
Last edited by AlanHK; 11th Jul 2013 at 04:38.
-
If you're using Decimate from Decomb, then the DecombReferenceManual says:
Decimate(parameter_list)
cycle (2-25, default 5) selects the decimation ratio, that is, decimate 1 frame in every cycle frames.
Or, using TDecimate from TIVTC:
Tdecimate(Mode=0,Cycle=6,CycleR=1)
And you'll get back 24.975fps from both, not 25fps. -
Thanks, I'll give it a try.
I'm sure it works, but I'll have to render it to see if it's smooth.
I first did AssumeFPS(30,sync_audio=true) so I do get 25 after decimation.
PS -- comparing the Srestore and Tdecimate output, Tdecimate seems to be doing a better job, Srestore drops some non-duplicate frames that Tdecimate keeps. And encoding now: TDecimate is more than twice as fast as Srestore.
Of course, in more weird videos it can be a lifesaver.Last edited by AlanHK; 11th Jul 2013 at 07:49.
-
SRestore works a lot better if you're using it with 60fps instead of 30fps. For me, I use yadif(mode=1) get rid of combing while doubling the number of frames. This, paired with srestore(frate=25,cache=10) gives a lot better calculation and prevents jerkiness.
Also, I've been testing this out against tfm(mode=1).tdecimate(cycle=6).changefps(25) and both seem to work, but sometimes they both cause audio sync problems. does anyone have any experience with this? -
-
-
-
I think any type of filter will change the runtime by at least 20ms, if not more. I've tried a few methods and noticed that when converting 29.970 -> 25fps, if the source contains blended frames, I get almost no change in runtime if I use srestore. However, if the source is simply duplicating every 6 frames, no matter what I try (srestore or tdecimate) I get changes in runtime, and sometimes this causes a noticeable audio sync issue.
-
-
I'm reencoding audio from MP3 to AAC anyway (AVI source, making MKV). Also adjusting the volume by doing ReplayGain. Downmixing to mono (since it's a 1970s TV show, it was never real stereo.) And making a few Trims on the video, so never was using the original audio track.
-
-
How do you know this is the pattern?
How could I check? I tried to jump 1000 frames and see if one had been adropped, but hard to pinpoint.
I converted 8 50-minute videos using the first method and they seem quite smooth.
The second method also works, but I can see it gets out of step with the mode=0 version.
Though I'm a tyro with decimation, I'm trying to read the docs. It seems that mode 2 would be more like SRestore.
But does it really catch the 1001 cycle (if it exists)? That's a hell of a lot of frames to analyse. -
Since I haven't seen the video I don't know for sure. But it's very common for someone to take a 25 fps video and convert it to 29.97 fps with simple duplicates -- that's the way most programs does it. Essentially the same thing as ChangeFPS(). The end result is what I described.
You'd have to step through the video frame by frame. Of course, you can start with the assumption that if frame 4 is a duplicate of frame 3 then frame 10 should be a duplicate of frame 9, frame 502 should be a duplicate of frame 501, etc. So you can zip through the video and spot check until you find a break in the pattern. Unfortunately, if the video was edited after the frame rate conversion there may be many breaks in the pattern unrelated to the frame rate conversion.
It doesn't analyze 1001 frames at a time. And it may make mistakes. So it's not likely to be perfect either. But it will leave you with exactly 25 fps and the same running time (within the +/- one frame error you always get with frame rate conversions). -
And does Tdecimate(mode=2,rate=25) usually do a good job at keeping the untouched AC3 audio in sync with the video without making the video jerk? I've found that even if I keep the same script using either sreset(frate=25,cache=10) or tdecimate(cycle=6,mode=1).changefps(25) they both seem to work differently depending on the video, from one video to the next. I've found some of my videos without a sync problem, and others get progressively desynced. These are actually only 11 minute videos so I'd hate to think what would happen with a 22min video or longer. The reason I had been hesitant on using tdecimate(mode=2,rate=25) was because I was unsure how well it calculated the video to output smooth playback.
Last edited by ChibiBoi; 15th Jul 2013 at 21:12.
Similar Threads
-
Any decent way to convert higher fps movies to a lower 29.97 fps ? (or othe
By Jonz in forum Video ConversionReplies: 1Last Post: 5th Nov 2012, 02:01 -
mixing 1280 x 720 29,97 fps and 1440 x 1080 25 fps in final cut
By perik in forum EditingReplies: 6Last Post: 17th Nov 2010, 22:42 -
how to change fps in mp4 without reencode (maybe ps3 cannot handle 24 fps)?
By redout66 in forum Newbie / General discussionsReplies: 1Last Post: 14th Sep 2010, 04:53 -
Changing FPS of .h264 loaded in MeGUI w/Avisynth
By karpodiem in forum Video ConversionReplies: 8Last Post: 6th Apr 2009, 10:27 -
Avisynth IVTC and fps
By snidwar in forum Video ConversionReplies: 5Last Post: 27th Sep 2008, 22:11