필터 지우기
필터 지우기

mismatch between calculated and reported Framerate using VideoReader

조회 수: 1 (최근 30일)
KV
KV 2016년 3월 22일
댓글: KV 2016년 3월 23일
I am trying to process video data (wmv format) recorded using a standard consumer grade camera using Matlab (R2014a, on Linux/Ubuntu) using VideoReader
vr = VideoReader('my_movie_file.wmv')
frames = read(vr); % read all frames
size(frames, 4) % gives 4025
vr.NumberOfFrames % gives 4025
vr.Duration % gives 134.7950
vr.FrameRate % gives 15
Now, this does not compute!
I.e,
round(vr.FrameRate*vr.Duration) % gives 2022,
which is half the size of vr.NumberOfFrames -- which means that the reported FrameRate is 1/2 the "calculated" value!
What am I missing?? All help will be appreciated.
  댓글 수: 5
Walter Roberson
Walter Roberson 2016년 3월 22일
Is the file variable framerate? If so then the reported framerate might be the last one in the file (the one in effect at the time you queried)
KV
KV 2016년 3월 23일
Yes, Walter -- the file does have variable frame rate. Is there any way I can get information about "timestamps" on a per-frame basis?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by