avi codec issues in 64-bit Windows 7 environment

조회 수: 8 (최근 30일)
Chris Taylor
Chris Taylor 2011년 5월 10일
댓글: Brad 2015년 4월 17일
Hello all,
In an algorithm I am collaborating on the data sequence is outputted as an avi file with the line
film = avifile([PathName,FileName],'compression','Indeo5','quality', 100,'fps',fps);
While this algorithm runs fine on 32-bit Windows XP I am trying to modify it to run on 64-bit Windows 7 as the Indeo codecs are not available. I have read various MathWorks articles that seem to skip over what is the preferred codec for this OS, and it seems other people have similar problems.
I have tried the following codecs:
- The Cinepak codec is not available for use on 64-bit Windows 7
- The MSVC and RLE codecs create errors as they do not work for truecolour images
- Indeo 2, 3, 5 codecs have been tested and they create errors as are not supported by 64-bit Windows 7
- FFDShow (FFDS) has been installed and tested, and while this produces a video it is skewed and stretched at 45 degrees (this was suggested as a solution for another user on the google group for MATLAB but has failed)
As it stands I can currently only output an avi file using no compression ('None'). Is there are codec that will output avi files correctly on 64-bit Windows, or a workaround that does not include post-processing by third party software?
Thanks for your time,
Chris
  댓글 수: 2
David Tarkowski
David Tarkowski 2011년 5월 11일
What version of MATLAB are you using?
Chris Taylor
Chris Taylor 2011년 5월 12일
I am running MATLAB R2010a.

댓글을 달려면 로그인하십시오.

답변 (3개)

bram desmet
bram desmet 2011년 8월 15일
Hi,
I work on a Win7 64 bit machine with Matlab R2009a, and I am able to compress avi files using the Intel Indeo4 codec, referring to it with the appropriate fourcc code 'i420':
movie2avi(mov,'test.avi','Compression','i420');
I don't remember how I got a hold of the 64 bit version of the Indeo4, though, ... could have been in some codec package
good luck
bram
  댓글 수: 2
Wyken Seagrave
Wyken Seagrave 2014년 5월 14일
The secret of creating high quality videos on Windows is to use VideoWriter, an object compressed with Motion JPEG, and not movie2avi, which produces low quality video.
Brad
Brad 2015년 4월 17일
Bram, agreed. I, too, use a Windows 7, 64-bit machine running R2012b. In an effort to get any compression out of the movie2avi function I utilized the same Intel CODEC you did, i420 - and it finally worked!!
I then produced the same AVI file using VideoWriter. Both methods produced quality videos. But the VideoWriter file was 883KB vs. 37.5MB for the movie2avi file.

댓글을 달려면 로그인하십시오.


Nick Haddad
Nick Haddad 2011년 5월 19일
편집: John Kelly 2013년 11월 13일
Chris,
Unfortunately in R2010a and earlier there is no strong compressed solution using avifile on 64-bit windows.
If you are able to upgrade to R2010b, you'll have access to the new VideoWriter object, which supports Motion JPEG AVI files across all platforms.
  댓글 수: 1
leila
leila 2014년 5월 16일
편집: leila 2014년 5월 16일
I encounter this error and I have R2010b, Do you know how to change and fix the code?
mov = avifile(outFile, 'COMPRESSION', 'Indeo5', 'FPS', iftp.FramesPerSecond, 'QUALITY', 100);
Error
Indeo codecs are not supported in this version of Windows. Please specify a different codec.

댓글을 달려면 로그인하십시오.


Martijn
Martijn 2011년 5월 12일
The Xvid codec works pretty well in combination with MATLAB. A 64-bit version can be downloaded from:
Note that you cannot configure all setting of Xvid from within MATLAB, but the Xvid settings are persistent so you could for example first configure it from inside VirtualDub.
  댓글 수: 1
Chris Taylor
Chris Taylor 2011년 5월 12일
Hi Martijn,
After installing XViD 1.3.1 and changing the codec from 'None' to 'XVID' in the algorithm, I've encountered the following error:
--------------------
??? Error using ==> avi
Failed to set stream format. Try specifying a different codec.
Error in ==> avifile.addframe at 188
avi('addframe',rot90(frame,-1), aviobj.Bitmapheader, ...
Error in ==> BF_experiment_rotation at 671
film = addframe(film,F);
--------------------
The final part of this error in BF_experiment_rotation is not my code, so I'll have to chase up with the person responsible any potential reason why it could be throwing up this error for the XViD codec. However, I've not seen this error before for any of the other codecs I've tried and so am at a loss to explain what could be causing it. Any ideas?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by