OS: Windows 10
Matlab ‘9.10.0.1739362 (R2021a) Update 5’
PTB: '3.0.17 - Flavor: beta - Corresponds to SVN Revision 12153
I have been trying to preload the textures from .mp4 files for an experiment, but the last texture of my movies is never loaded. I have this same issue when using the demo LoadMovieIntoTexturesDemo.m, i.e.
LoadMovieIntoTexturesDemo([pwd filesep ‘test.mp4’])
…loads 119 textures, but the test.mp4 has 120 frames.
I’m positive it has 120 frames, b/c:
x = VideoReader([pwd filesep ‘test.mp4’]);
disp(x)
VideoReader with properties:
General Properties:
Name: ‘test.mp4’
Duration: 2
CurrentTime: 0.0167
NumFrames: 120
Video Properties:
Width: 1920
Height: 1080
FrameRate: 60
BitsPerPixel: 24
VideoFormat: ‘RGB24’
also
size(read(x))
ans =
1080 1920 3 120
Can anyone explain why the demo isn’t giving me the last frame, and is there some way to get it?
Thanks