VideoReader can't read "mp4" files?

68 vues (au cours des 30 derniers jours)
cui,xingxing
cui,xingxing le 26 Jan 2021
Modifié(e) : cui,xingxing le 18 Fév 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 commentaires
Walter Roberson
Walter Roberson le 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 le 26 Jan 2021
Modifié(e) : cui,xingxing le 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!

Connectez-vous pour commenter.

Réponse acceptée

cui,xingxing
cui,xingxing le 26 Jan 2021
Modifié(e) : cui,xingxing le 18 Fév 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 commentaire
Stefan Oline
Stefan Oline le 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!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by