VideoReader can't read "mp4" files?

73 Ansichten (letzte 30 Tage)
cui,xingxing
cui,xingxing am 26 Jan. 2021
Bearbeitet: cui,xingxing am 18 Feb. 2023
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 Kommentare
Walter Roberson
Walter Roberson am 26 Jan. 2021
I am not at all certain, but to the extent that I can find error lists, that one might possibly be "bad file name"
cui,xingxing
cui,xingxing am 26 Jan. 2021
Bearbeitet: cui,xingxing am 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!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

cui,xingxing
cui,xingxing am 26 Jan. 2021
Bearbeitet: cui,xingxing am 18 Feb. 2023
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:
-------2023.2.18 update---------
A more efficient alternative is to use the ffmpeg tool to convert the video format, which corresponds to most avi format videos and is supported by matlab! See my answer below for details!
  1 Kommentar
Stefan Oline
Stefan Oline am 8 Nov. 2022
The software in this link installed 4 malware programs onto my computer in addition to the codec pack, and turned off my antivirus. Users beware!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by