Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum Question: Identifying FPS on arbitrary samples
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 13th February 2011, 18:57 #1  |  Link osgZach Registered User   Join Date: Feb 2009 Location: USA Posts: 680 Question: Identifying FPS on arbitrary samples I've been kind of curious for a while now, about how this is typically done.. i.e Sometimes someone posts a sample and someone will comment "Well this section looks like its xx FPS" and was just curious about how people are able to identify that kind of stuff. Is there some kind of mathematical algorithm you go by? Is there a certain number of frames that needs to be taken into account? What are the steps to follow during the analysis? I'd like to learn how to identify FPS changes in my videos if possible. It's mostly a curiosity I'd like to indulge. edit: just to clarify I'm talking about odd framerates in animation (like 12, 14, 17, etc), not Film/Video (30/24) Last edited by osgZach; 13th February 2011 at 22:50.
 14th February 2011, 13:50 #2  |  Link pbristow Registered User     Join Date: Jun 2009 Location: UK Posts: 262 Basically, you look at a long enough sequence of frames, and look to see how many actual changes of picture there are ina given number of frames. For example: If I have a file that's encoded at 24fps, and on stepping through the frames (on a sequence taht has plenty of motion going on) I see that the characters only move on screen on every second frame, then clearly the sequence is 24 * 1/2 = 12 fps. If another file, again encoded at 24 fps, has a pattern of frames that goes "move, move, don't move; move, move, don't move ..." repeating , then I can see that the actual number of new frames (moves) is only 2/3 of the encoded frame rate. 24fps *2/3 = 16 fps However, to be sure of the exact pattern, and thus the exact rate, you really need to look at several cycles, perhaps 10 or even more, to make sure it doesn't change. For example, if in the above case I look more carefully, I see that the full sequence of 24 encoded frames in one second is: Move, move, don't move; move, move, don't move; move, move, don't move; move, move, don't move; move, move, don't move; move, move, move; move, move, don't move; move, move, don't move; ...so there's an extra move in there breaking up the pattern. I've got 17 movements, i.e. 17 original frames, in one second, suggesting that the original frame rate is 17fps. But again, be cautious: I now know that the cycle is at least 18 encoded frames long (because the pattern changed happened on the 18th frame I looked at), and if the original frame was an exact number of fps then it should repeat every 24 frames... but to be sure I've found the real pattern I need to make sure it contnues the same way. If look at the next block of 24 frames, and it has exactly the same pattern, and the next, and the next, then it looks like I've found the real frame rate... But to be certain I would either keep checking several more cycles, OR try decimating the whole video file down to my "best guess so far" of 17fps, and then playing back the result to see if everything ran smoothly. If I find there's an odd jump happening every, say, 13 seconds or so, then I'd go back check the sequence more over a stretch covering about 39 seconds (3x13 = 39), and so on... Or I might just say "I can live with a tiny glitch every 13 seconds" and make do.
 14th February 2011, 15:39 #3  |  Link osgZach Registered User   Join Date: Feb 2009 Location: USA Posts: 680 That's real helpful, thank you
 15th February 2011, 12:05 #4  |  Link pbristow Registered User     Join Date: Jun 2009 Location: UK Posts: 262 You're welcome!
 16th February 2011, 17:32 #5  |  Link jmac698 Registered User   Join Date: Jan 2006 Posts: 1,867 This does come up in real life as tv stations use 'time compression' to shorten movies by deleting a few frames a minute.