How to find the time interval between consecutive frames in video
25 views (last 30 days)
Show older comments
I need to extract key frames from video for the purpose of video retrieval. one of the parameters involved for extracting the key frame is the time interval between the frames in video. i am little confused in this step.
0 Comments
Answers (2)
Walter Roberson
on 29 Sep 2015
The time interval between frames is 1 divided by fps (Frames Per Second), and so is Seconds Per Frame. However, you need to take into account that there are Variable Framerate movies. If you are using the VideoReader class then you can access the CurrentTime property of the VideoReader object to determine the timestamp (since the beginning of the video) of the current frame; by recording the previous value you can find the time difference.
0 Comments
Dinesh Iyer
on 29 Sep 2015
The notion of key frames and non key-frames is applicable only in the encoded video stream. Once the video is decoded all frames are effectively key frames. So if you are attempting to detect key-frames after reading videos using VideoReader it is not possible because there is no more notion of key-frames as the video has been decoded.
You need to use tools that explore the encoded stream. The following answer might help:
Hope this helps.
Dinesh
1 Comment
Walter Roberson
on 30 Sep 2015
The notion of key frames applies if you are encoding streams.
I can imagine that there could be algorithms in which a process similar to encoding was followed in order to determine which frames had "sufficient" accumulated change to qualify as "key" frames, and then applying some algorithm to those frames.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!