MATLAB Answers

VideoReader can't read "mp4" files?

106 views (last 30 days)
cui
cui on 26 Jan 2021
Answered: cui on 26 Jan 2021
When I read an MP4 video file, the following error appears, how do I solve it, my computer configuration:
win10,x64
matlab2020b
video = VideoReader('D:/test_video/hkvideo/test.mp4');
-------------------------------------------------------------------------------------------------
Error using VideoReader/initReader (line 734)
Could not read file due to an unexpected error. Reason: Error Creating Source Reader
Reason: IDispatch error #64
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Error in mycluster (line 24)
Reference:
  2 Comments
cui
cui on 26 Jan 2021
I think it shouldn’t be the reason for the "bad file name". I also make errors when loading other mp4 videos in the videolabeler app. The content is as follows:
--------------------------------------------------------------------------------------------------
Error using vision.labeler.loading.VideoSource/loadSource (line 113)
Could not read file due to an unexpected error. Reason: Error Creating Source Reader
Reason: IDispatch error #64
Warning: Error occurred while evaluating listener callback.
Both win10 local player and opencv can successfully open MP4 video files!

Sign in to comment.

Accepted Answer

cui
cui on 26 Jan 2021
A solution to the problem has been found. This is because the current video file does not have a corresponding decoding driver under the current system. You need to download and install the decoding driver.
Reference:

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!