VideoReader can't read "mp4" files?

64 visualizaciones (últimos 30 días)
cui,xingxing
cui,xingxing el 26 de En. de 2021
Editada: cui,xingxing el 18 de Feb. de 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 comentarios
Walter Roberson
Walter Roberson el 26 de En. de 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 el 26 de En. de 2021
Editada: cui,xingxing el 26 de En. de 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!

Iniciar sesión para comentar.

Respuesta aceptada

cui,xingxing
cui,xingxing el 26 de En. de 2021
Editada: cui,xingxing el 18 de Feb. de 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 comentario
Stefan Oline
Stefan Oline el 8 de Nov. de 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!

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by