Reading/Importing Video File (AVI) : VideoReader Error
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
I tried using the script provided in the matlab documentation as follows:
function play_mov()
xyloObj = VideoReader(filename); %avi filename excluded for privacy reasons
nFrames = xyloObj.NumberOfFrames;
vidHeight = xyloObj.Height;
vidWidth = xyloObj.Width;
% Preallocate movie structure.
mov(1:nFrames) = ...
    struct('cdata', zeros(vidHeight, vidWidth, 3, 'uint8'),...
           'colormap', []);
% Read one frame at a time.
for k = 1 : nFrames
    mov(k).cdata = read(xyloObj, k);
end
% Size a figure based on the video's width and height.
hf = figure;
set(hf, 'position', [150 150 vidWidth vidHeight])
% Play back the movie once at the video's frame rate.
movie(hf, mov, 1, xyloObj.FrameRate);
end
And I obtain the following error:
>> play_mov
Error using hgMovie
Could not create movie frame
Error in movie (line 41)
        builtin('hgMovie',varargin{:});
Error in play_mov (line 25)
movie(hf, mov, 1, xyloObj.FrameRate);
Any suggestions?
댓글 수: 1
  Vishesh
    
 2023년 5월 16일
				Can you please confirm whether you are trying to read local or remote video data?
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!