Why do I receive an error when using the AVIREAD function?
조회 수: 12 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2009년 6월 27일
편집: MathWorks Support Team
2024년 5월 30일
When I use the AVIREAD function, I receive the following error:
ERROR: ??? Unable to locate decompressor to decompress video stream
채택된 답변
MathWorks Support Team
2024년 5월 30일
편집: MathWorks Support Team
2024년 5월 30일
Windows AVI files can be compressed using an infinite number of compression methods, depending on the application where the file originated. In MATLAB, you can only specify which compression method to use when writing the file, but not when reading. When reading, AVIREAD will figure out how to decompress the movie based on how it is compressed. It will use a codec that is installed on your machine; you cannot install codecs in MATLAB.
The compressors/decompressors (codecs) can be installed (as dll's) on Windows machines for media players/editors to use. During playback, the media player looks for the codec. If the player can not find the codec needed to decompress the video, an error occurs. This is what is happening in MATLAB. AVIREAD is making some Windows API calls to try and find the installed codec to decompress the video.
By using the AVIINFO function, you can determine the codec used to compress the file.
All codecs have a four character code (fourcc) to describe them. A list of fourcc's can be found at
You need to have the correct codec installed to view or load the movie. Contact the manufacturer of the codec to obtain the necessary codec files, or go to
Some customers have reported that some applications can open and play their AVI files, but MATLAB cannot because it is unable to locate the decompressor. Most likely the working application has methods to read the AVI even though the codec is not installed. To resolve this issue, use the information in this solution to install the appropriate codec.
This error is commonly encountered when trying to decompress a DVSD codec AVI file. Digital cameras commonly use this codec, and their software can read it without the codec. However, MATLAB requires the operating system to have this codec installed.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!