Error: Error using VideoReader/init Failed to initialize internal resources.
Show older comments
I am trying to save a part of a video from an online IP cam as an avi format. When trying to read the avi file an error pops up:
Error using VideoReader
Failed to initialize internal resources.
I tried to change the format of the written video several times with no luck.
here is the code for writing and reading the video:
% Read video
cam = ipcam('http://138.188.39.235:88/mjpg/video.mjpg', '', '', 'Timeout', 200);
vidWriter = VideoWriter('frames.mp4');
open(vidWriter);
for index = 1:0.25:50
% Acquire a single frame.
Image = snapshot(cam);
% Write frame to video.
writeVideo(vidWriter, Image);
end
clear cam
obj = VideoReader('frames.mp4');
Answers (0)
Categories
Find more on Video Formats and Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!