VideoReader: Unrecognized function or variable 'hasFrame'
显示 更早的评论
I am following the VideoReader documentation from https://www.mathworks.com/help/matlab/ref/videoreader.html
When I try to run the example code using R2024a Update 5,
currAxes = axes;
v = VideoReader("xylophone_video.mp4");
while hasFrame(v)
vidFrame = readFrame(v);
image(vidFrame,"Parent",currAxes)
currAxes.Visible = "off";
pause(1/v.FrameRate)
end
the line with while hasFrame(v) throws an error: Unrecognized function or variable 'hasFrame'.
The VideoReader object was created, but the hasFrame(v) line does not work. Was support for this function removed? If so, what replaced it?
5 个评论
Avni Agrawal
2024-7-23
Can you share OS version? Because it is working fine for me on windows 11 R2024a as well as MATLAB Online R2024a
Walter Roberson
2024-7-23
For debugging purposes, try examining
methods(v)
Alexander Brandt
2024-7-23
Alexander Brandt
2024-7-23
Avni Agrawal
2024-7-23
MATLAB Version: 24.1.0.2537033 (R2024a)
Operating System: Microsoft Windows 11 Enterprise Version 10.0 (Build 22631)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!