Is there software that can detect and export the "real" frame rate of a video file?

If you are given a video file with a frame rate of eg. 59.94 fps, and it needs effects adding and quite a lot of rotoscoping, but when you look at the frames needing rotoscoping you see lots of duplicated frames. eg. maybe there’s 2 duplicated frames, then 3 duplicated frames, or maybe even 4 duplicated frames in a row (the video also had a black frame at the start) what do you do in this situation?.

My guess was the real frame rate recorded in a particular video was about 23.976 fps and at some point someone has rendered it out as 59.94 fps.

In this situation, if you do the rotoscoping on the 59.94 fps video that has the duplicated frames, it will likely get the interpolated positions of masks wrong until you add (eg. copy) enough keyframes.

eg. if you have frames 1,2,3,4 and add a keyframe at positions 1 and 4 it will move the mask positions at frames 2 & 3 if there’s no keyframe added there, but if frames 2 & 3 are duplicated versions of frame 1 those interpolated masks will be incorrect. So you’d need to keep copying keyframes if you rotoscope the 59.94 fps video.

I think an easier way than to do the rotoscoping with the composition set at 59.94 fps is to try and figure out what the actual fps is (eg. though counting of duplicated frames) and then export it then import it maybe (if it can be exported correctly).

Is there any software that can automatically do this detection (of the real frame rate and correct way of exporting it) and export it?

I know another option is to try and get the buyer to give the original lower fps source video but if there’s a way to easily do this that should save having to do that.

1 Like

@danasa @zac @sam:

What are your opinions here?

1 Like

I also thought an option could be to export the frames from the ~59.94 fps video as a bitmap sequence, but at a lower resolution (eg. rendering every x pixels) for speed/space saving, then maybe trying to write a program that could detect the differences between the bitmaps, eg. looking at each pixel and each rgb value in it and comparing them with the previous frame’s rgb values at the same pixel locations. If the total difference in rgb values for the whole bitmap was above a certain threshold then assume it’s a new real frame (with the threshold because if the video was stored in compressed format eg. .h264 before exporting to a .bmp sequence the frames may not have identical values even if they look the same).

So once the program knew which frames looked different enough from the previous frames (were new “real” frames) there may then be a way to figure out the true real frame rate and where it can be exported from (such as removing any black header section), such as by counting the number of “real” (different enough) frames in the bmp sequence and if you gave it the duration of the entire bmp sequence.

But ideally there’s some software that can do this, (and proper software should be faster, and shouldn’t need the converting it to a lower resolution or converting to a bitmap sequence I assume). Another thing that might slightly complicate it is they may give a video with a variable frame (though that could be converted to a constant one).

Or I suppose another option could be to experiment with manually exporting it in various frame rates, import them back and overlay them and see if any match (eg. use a difference matte or something). But while the true frame rate may be eg. 23.976 fps, it might need to be exported in different ways (eg. the sequence may be 3-2-3-2-3… but exporting it at 23.976 fps may export it 2-3-2-3-2-3 etc. (or maybe a different export preset could also be used).

Or maybe a script in some existing video related software may be able to do the frame comparisons etc.

Hey @vfx200! Unfortunately, our team does not know of a program that would be able to do this. My best guess would be to try using a pull-down conversion to change the clip from 59.94 to 24 or 30 fps drop-frame and see if that gives the result you need.

1 Like

Thanks. I’ll try doing that and then importing them and checking if there’s any differences - if there’s no visible difference (of the exported lower fps version compared to the higher fps one that has duplicate frames) I could then create a composition with the lower fps video for the roto work.

I would have have expected there could have been existing software for doing what I was saying since it should save some time for anyone who is doing rotoscoping but have given a file with duplicate frames in, but maybe there isn’t (maybe they don’t think it’s something that enough people would need). But I suppose it’s also partly down to the original person who did any renders of it if they edited / rendered at too high a frame rate compared to the source (so where the original editor did that, ideally they could give the clip with the original fps, but that’s not always easy to get them to). But I’ll try what you said, thanks.

I hope that works for you!

There very well could be some software or plugin that does that, I just personally haven’t ever come across one.

1 Like

I think the real frame rate recorded in a particular video was about 23 fps and the 59 fps video is rendered So, let’s discuss what precisely basic fps is 24 fps is the standard minimum frame rate to capture Video with realistic motion. Any FPS is real provided that displayed frames represent what will be said at the very instant they are displayed
So come to the Software is Wondershare Filmora is the tools which are very flexible in use.

So are you saying Filmora has the function that I was asking about in the original post? If so, do you know where in the software it has that option?
Where it can detect the “true” frame rate contained in a video (the frame rate of the ‘motion’ ie. so that if it was exported at that (possibly lower) frame rate it would play the same as the original, but would omit duplicate frames, so make rotoscoping simpler?