View Full Version : srestore() proper frate
johnmckee
25th October 2012, 19:38
Hello. If I deinterlace a video(29.97fps) and end up with a framerate of 59.94 then srestore() will turn it into 25fps video.. In some cases I am sure this is correct. But in others it must not be, no? So unless one is happy with 25fps are there any tips in choose the correct final framerate? Is it a matter of taste? output device? I suppose for a given clip length, one could pick any rate right? Would one look for a panning scene and evaluate the smoothness of the video? Any tips? Why not just go back to 29.97?
Asmodian
25th October 2012, 20:21
Srestore() (http://avisynth.org/mediawiki/Srestore) should be set to output the correct frame rate.
manono
26th October 2012, 09:48
Srestore() (http://avisynth.org/mediawiki/Srestore) should be set to output the correct frame rate.
For PAL, yes, but not all NTSC sources should be converted to 25fps. I run across from time to time field-blended NTSC stuff which started life as 23.976fps. In such cases you have to set Frate=23.976.
How to tell? Sometimes it can be difficult. With PAL to NTSC stuff it's usually a 6-frame cycle. That is, open an unfiltered version of the video, scroll to a place with movement, and advance a frame at a time. Then you'll find one or maybe 2 progressive frames out of every 6. With field-blended stuff that's supposed to be 23.976fps, it's a 5-frame cycle. That's one way, maybe the easiest, but it doesn't work every time.
Another is to bob the video. PAL to NTSC repeats in a 3 2 3 2 2 pattern. Film to NTSC repeats in a 3 2 3 2 pattern. And the blends make the counting difficult.
Or set Frate=29.97fps and figure the pattern of duplicates left behind to tell you what it's really supposed to be.
And if using RePAL to do the unblending of a PAL to NTSC source, you'll get 24.975fps which is, I believe, the true framerate of most of the PAL to NTSC stuff.
In some cases I am sure this is correct. But in others it must not be, no?
You have, of course, already figured out it's field-blended before using SRestore on it, haven't you?
Asmodian
26th October 2012, 19:29
I sorry am for my lack of clarity, I meant one should determine the correct output frame rate and set it.
manono
26th October 2012, 19:58
I sorry am for my lack of clarity, I meant one should determine the correct output frame rate and set it.
Oh, now I see how it can be read like that. I apologize for misunderstanding you.
Asmodian
30th October 2012, 00:41
Just so long as the OP knows I agree with you. ;)
Your answer is much better and includes a method to determine the correct rate.
johnmckee
6th November 2012, 04:50
Yes I was looking for tips on the "figuring it out" part, not the obvious "setting the parameter" part. Thank you. And yes the material I have been working on has blends...
johnmckee
6th November 2012, 19:27
Another is to bob the video. PAL to NTSC repeats in a 3 2 3 2 2 pattern. Film to NTSC repeats in a 3 2 3 2 pattern. And the blends make the counting difficult.
So one should ignore the blends?
Asmodian
6th November 2012, 19:53
You are looking for the repeat pattern of the original fields so ignore the blends if you can.
manono
6th November 2012, 19:57
Yes, ignore them if possible and count them as duplicate frames. When I say 3 2 3 2 2, I mean after bobbing you'll get 3 frames the same followed by 2 the same, followed by 3, by 2, by 2, before the cycle begins again.
Related to that is another way, and a pretty good one at that. You have a 29.97fps source, so there are 30 frames per second. After bobbing there are 60 frames per second. In every 60 frame cycle count the number of good unique (non-dupe) unblended bobbed frames. If 25 it's from a PAL source; if 24 it's from a film source. And if you work with silent films, it could be less. However, unless you work with silent films, at least 90% of the time the source is PAL. Only the worst fly-by-night studios field-blend film sources.
atra dies
7th November 2012, 04:03
If you use srestore without setting frate and it outputs 25 you get nearly the same total duration as repal, which outputs 24.975. The timeline is to the hundredth of a second close at the end between them. Shouldn't it be off by .001 percent of total duration? For a 90 minute movie: 5 seconds.
So if you are going to assumefps 24000/1001, you should stretch audio by 25/(24000/1001) instead of 24.975 as the numerator? I could have swore I did the latter once and there were no sync issues.
This may mean even though srestore says 25fps it adjusts number of frames to match the drop frame or I have made a mistake.
EDIT....................................
The plot thickens:
original 168662
srestore 140692
repal 140551
tfm tdecimate cycle=6 140551
manono
7th November 2012, 04:12
If you use srestore without setting frate and it outputs 25 you get nearly the same total duration as repal, which outputs 24.975.
You should get exactly the same duration. The length is the same; the frame count is slightly different.
So if you are going to assumefps 24000/1001, you should stretch audio by 25/(24000/1001) instead of 24.975 as the numerator?
You stretch it based on the framerate of the source after SRestore or RePAL.
atra dies
7th November 2012, 07:06
OK but does srestore have repeated frames or repal have dropped frames or would I have to scan 1001 frames to see if there is a repeat or have you already answered this question above?
manono
7th November 2012, 07:29
OK but does srestore have repeated frames or repal have dropped frames or would I have to scan 1001 frames to see if there is a repeat or have you already answered this question above?
Hehe, no, I've purposely avoided the question. If you think as I do that:
30fps is to 29.970fps as
24fps is to 23.976fps as
25fps is to 24.975fps then:
much of the time 24.975fps is correct. It's what RePAL always gives. SRestore only gives it if you set up the Frate to do it. If 24.975fps is correct then SRestore at default settings gives a duplicate frame every once in a while. However, as I'm sure you'll agree, extra frames are better than missing frames. There have been a few occasions when 24.975fps with either RePAL or SRestore left too many blended frames and doing it for 25fps gave a 'cleaner' result. Generally, unless the results don't look good, I prefer using RePAL. Just my opinion, worth about what you paid for it. However, I've probably worked with a thousand or so such field-blended DVDs.
johnmckee
7th November 2012, 20:15
Very interesting. So is there a technique for looking for this 1 in 1000 duplicate frame. Some trick with avisynth or virtualdub. Or must one do it by hand?
manono
7th November 2012, 20:25
Back in my silent film days I counted through hundreds of frames trying to find the pattern/cycle that would help me determine the true framerate. But, no, I've never counted 1001 frames looking for dupes or missing frames, and there's no automatic way to do it, as far as I know (MultiDecimate, maybe). These unblenders aren't accurate enough anyway, for that to be able to work, and instead of a duplicate frame you're just as liable to find a blended frame. If you have a problem, meaning usually too many blended frames left over, then you can experiment a bit to try and find something better. Otherwise, put on an unblender, check a bunch of frames in various places around the video, and if it looks OK go ahead and encode.
johnmckee
8th November 2012, 08:15
OK. So all things being equal, is there a consequence when it comes to output? Is 24.975fps more "TV friendly" (I live in the US) and 25fps more "computer friendly"?
manono
8th November 2012, 09:45
OK. So all things being equal, is there a consequence when it comes to output? Is 24.975fps more "TV friendly" (I live in the US) and 25fps more "computer friendly"?
I don't know what that means. Eventually I slow them all down to 23.976fps to return them to film speed and natural pitch.
johnmckee
8th November 2012, 17:55
I guess I am just trying to figure out the consequences of choosing 25fps vs 24.975...
It seems that if I serve the same clip at the 2 different rates, then stack them, the one at 24.975 is going by faster. The scene changes pull ahead of those in the clip running at 25fps.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.