Variable frame number in 2 different machines

vidObj = VideoReader('video_file.avi');
numFrames = 0;
while hasFrame(vidObj)
readFrame(vidObj);
numFrames = numFrames + 1;
end
numFrames
I am getting a variable numFrames (number of frames) in running the same code on two different machines
i.e. I am reading the number of frames using the above code snippet in two separate machines both with Matlab2017 installed, on the same video file. However, I am getting two different values of frame numbers on each machine. Could you please let me know why that is so?

8 件のコメント

KSSV
KSSV 2017 年 10 月 25 日
is the video same?
Akshay Ravindran
Akshay Ravindran 2017 年 10 月 25 日
Yes the video is the same. I checked it with a couple of friends I am seeing the pattern there as well.
KSSV
KSSV 2017 年 10 月 25 日
I checked same video in two different pc's..I got same number of frames.....is version same on all pc's? (I don't think this is going to affect anyways)
Akshay Ravindran
Akshay Ravindran 2017 年 10 月 25 日
Hereby attaching the results from multiple workstations. It is not like it alters between every machine. There is a discrepancy in select few machines, the cause of which is what I am trying to understand here.
FYI > Everything is the same in both systems except that in my laptop its matlab2017b and in my workstation its matlab2017a if that helps
Duncan Lilley
Duncan Lilley 2017 年 10 月 27 日
Hi, are you able to provide an example file which you are noticing this issue with?
What operating systems are you using on the machines which you are testing this on?
Akshay Ravindran
Akshay Ravindran 2017 年 10 月 28 日
Unfortunately, the data is part of the research work and will not be able to share. Is there any other way in which this can be figured out? My personal laptop is running on windows 10 whereas the other workstation has windows7.
Walter Roberson
Walter Roberson 2017 年 10 月 28 日
I suggest using VLC to transcode the file. I suspect that it is either corrupt or uses some video feature that was not available in Windows 7 readers.
Akshay Ravindran
Akshay Ravindran 2017 年 10 月 28 日
When I tried the vision.VideoReader function I am getting the same value in both systems.

サインインしてコメントする。

回答 (0 件)

質問済み:

2017 年 10 月 25 日

コメント済み:

2017 年 10 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by