Error: Error using VideoReader/init Failed to initialize internal resources.

13 ビュー (過去 30 日間)
Nisreen Tannous
Nisreen Tannous 2019 年 3 月 28 日
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');

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by