From a time in a video, can you get the frame number?
조회 수: 9 (최근 30일)
이전 댓글 표시
I want to know what frame number we have from a video at certain time stamps. For example from 1:42 to 1:45 mark. How do I obtain this?
댓글 수: 2
Mathieu NOE
2025년 4월 1일
hello
I suppose that you know the total number of frames and the start / end time stamps
then it's just a matter of linear interpolation
Walter Roberson
2025년 4월 1일
Knowing the total number of frames and the total video length and the start and end time stamps... assumes constant video frame timing.
If you do assume constant frame rate, then converting timestamp to frame number becomes possible by using the FrameRate property. However, if the frame rate is nominally 30 frames per second then the true frame rate might only be 29.97 frames per second, and it is questionable as to whether the header video frame rate will be 30/1 or 2997/100 or 30000/1001
답변 (1개)
SACHIN KHANDELWAL
2025년 4월 23일
Assuming that you want to get the number of frames in a video file using MATLAB, the following MATLAB Answers posts might be helpful for you:
Also, check out the official documentation for: https://www.mathworks.com/help/matlab/ref/videoreader.html
If this does not resolve the issue, could you please include your files and a more detailed problem statement? This will help in providing a more specific solution.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!