VideoReader missing codec problem
I cannot open avi files with VideoReader on my MacBook (OS Ventura 13.5) with a pretty up-to-date version of MATLAB (R2023b; 23.2.0.2365128, 64-bit). When I try to open an avi file with the following code
v = VideoReader(vidFileName.avi)
I get the following error
Error using VideoReader/initReader
Unable to determine the required codec.
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Similarly, if I try to get information about the avi file, the code
info = mmfileinfo(vidFileName.avi)
returns the error
Unable to determine the required codec.
Some important points:
Yes, I know other people have posted similar problems. No clear solution to my problem is found there
Yes, this video file is valid and uncorrupted. It plays fine on VLC Player. It does not play on QuickTime, which does not support the avi format
Yes, I am aware that the solution might be "installing new codecs"–a solution mentioned in some other posts–but I need more information than that
Here’s the deal: The MATLAB Central "solutions" mention installing codecs from mediaplayercodecpack.com…but that only support Windows systems. I tried installing 3rd party Mac codecs from 3ivx.com, but they didn’t work. FWIW, they didn’t allow QT to play avi files either, as it was supposed to do. I know nothing about video codecs, but teh interwebs tell me they are usually stored in Library/QuickTime on Macs. Sure enough, the 3ivx installation did add "3ivxVideoCodec.component" to that folder, but again, it doesn’t work. The fact that VLC Player does work suggests that the necessary codec does exist somewhere on my Mac, but apparently MATLAB can’t use it.
In closing, I pose these fundamental questions: Doesn’t the MATLAB installation include the video codes required for the video formats VideoReader/VideoWriter supposedly supports? If yes, why am I getting this probelm? If no, where do I find the relevant codecs and how do I install them in a way that MATLAB can use?I cannot open avi files with VideoReader on my MacBook (OS Ventura 13.5) with a pretty up-to-date version of MATLAB (R2023b; 23.2.0.2365128, 64-bit). When I try to open an avi file with the following code
v = VideoReader(vidFileName.avi)
I get the following error
Error using VideoReader/initReader
Unable to determine the required codec.
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Similarly, if I try to get information about the avi file, the code
info = mmfileinfo(vidFileName.avi)
returns the error
Unable to determine the required codec.
Some important points:
Yes, I know other people have posted similar problems. No clear solution to my problem is found there
Yes, this video file is valid and uncorrupted. It plays fine on VLC Player. It does not play on QuickTime, which does not support the avi format
Yes, I am aware that the solution might be "installing new codecs"–a solution mentioned in some other posts–but I need more information than that
Here’s the deal: The MATLAB Central "solutions" mention installing codecs from mediaplayercodecpack.com…but that only support Windows systems. I tried installing 3rd party Mac codecs from 3ivx.com, but they didn’t work. FWIW, they didn’t allow QT to play avi files either, as it was supposed to do. I know nothing about video codecs, but teh interwebs tell me they are usually stored in Library/QuickTime on Macs. Sure enough, the 3ivx installation did add "3ivxVideoCodec.component" to that folder, but again, it doesn’t work. The fact that VLC Player does work suggests that the necessary codec does exist somewhere on my Mac, but apparently MATLAB can’t use it.
In closing, I pose these fundamental questions: Doesn’t the MATLAB installation include the video codes required for the video formats VideoReader/VideoWriter supposedly supports? If yes, why am I getting this probelm? If no, where do I find the relevant codecs and how do I install them in a way that MATLAB can use? I cannot open avi files with VideoReader on my MacBook (OS Ventura 13.5) with a pretty up-to-date version of MATLAB (R2023b; 23.2.0.2365128, 64-bit). When I try to open an avi file with the following code
v = VideoReader(vidFileName.avi)
I get the following error
Error using VideoReader/initReader
Unable to determine the required codec.
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Similarly, if I try to get information about the avi file, the code
info = mmfileinfo(vidFileName.avi)
returns the error
Unable to determine the required codec.
Some important points:
Yes, I know other people have posted similar problems. No clear solution to my problem is found there
Yes, this video file is valid and uncorrupted. It plays fine on VLC Player. It does not play on QuickTime, which does not support the avi format
Yes, I am aware that the solution might be "installing new codecs"–a solution mentioned in some other posts–but I need more information than that
Here’s the deal: The MATLAB Central "solutions" mention installing codecs from mediaplayercodecpack.com…but that only support Windows systems. I tried installing 3rd party Mac codecs from 3ivx.com, but they didn’t work. FWIW, they didn’t allow QT to play avi files either, as it was supposed to do. I know nothing about video codecs, but teh interwebs tell me they are usually stored in Library/QuickTime on Macs. Sure enough, the 3ivx installation did add "3ivxVideoCodec.component" to that folder, but again, it doesn’t work. The fact that VLC Player does work suggests that the necessary codec does exist somewhere on my Mac, but apparently MATLAB can’t use it.
In closing, I pose these fundamental questions: Doesn’t the MATLAB installation include the video codes required for the video formats VideoReader/VideoWriter supposedly supports? If yes, why am I getting this probelm? If no, where do I find the relevant codecs and how do I install them in a way that MATLAB can use? video, codec, mac, matlab MATLAB Answers — New Questions