read and play AVI

I have a problem when playing videos (AVI) on GUI
function aviaxes_OpeningFcn(hObject, eventdata, handles, varargin)
mov = aviread('Shania.avi')
movie(handles.axes1, mov);
??? Error using ==> aviread at 76 Unable to locate decompressor to decompress video stream
Error in ==> aviaxes>aviaxes_OpeningFcn at 54 mov = aviread('Shania.avi')

5 Comments

David Young
David Young on 19 Jun 2011
What happens if you execute aviread('Shania.avi') at the command line?
pink
pink on 19 Jun 2011
when I run in case of error,why?
??? Error using ==> aviread at 76
Unable to locate decompressor to decompress video stream
Error in ==> aviaxes>aviaxes_OpeningFcn at 54
mov = aviread('Shaniaxvid.avi')
pink
pink on 19 Jun 2011
hi david
I want to run avi files on the axes, what function to play the avi on the axes?
Which Windows version are you using, and are you running the 32 bit or 64 bit windows?
pink
pink on 19 Jun 2011
hi walter
I'm running windows XP2 32 bit

Sign in to comment.

 Accepted Answer

Walter Roberson
Walter Roberson on 19 Jun 2011

2 votes

(Note to Windows 64 bit users: most codecs are not available in 64 bit versions, and some common codecs like Indeo5 are not available for Windows 7 at all; however it is reported that R2011b will have a new class that will relieve some of the codec issues.)

6 Comments

pink
pink on 20 Jun 2011
I've tried to install the codec pack, but the error still occurs.
??? Error using ==> aviinfo>errorWithFileClose at 609
'RIFF' did not appear as expected.
Error in ==> aviinfo at 92
errorWithFileClose(msgID,msg,fid);
pink
pink on 20 Jun 2011
if I use the function implay ('Shania.avi') can run but his voice is not an ad, why? please advice
It sounds as if you do not have the audio codec used by that AVI. Does aviinfo() give you any information about the codecs of the file?
pink
pink on 20 Jun 2011
>> aviinfo('Shania.avi')
ans =
Filename: 'Shaniampg4.avi'
FileSize: 37624982
FileModDate: '20-Jun-2011 14:50:18'
NumFrames: 6174
FramesPerSecond: 25
Width: 352
Height: 240
ImageType: 'truecolor'
VideoCompression: 'DIV3'
Quality: 4.2950e+007
NumColormapEntries: 0
AudioFormat: 'Format # 0x55'
AudioRate: 44100
NumAudioChannels: 2
Can you advise a suitable converter AVI with matlab
That's the MPEG-1 Layer 3 MP3 audio codec, but it appears that it is most often generated by Unix software that produces incorrect audio headers when encoding.
Try the codec at http://www.moviecodec.com/download-audio-codecs/mpeg-1-layer-3-codec-18/
pink
pink on 21 Jun 2011
thanks walter

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!