Playing Video in GUI - Indeo5 Codec Issue?

Hello -
I have been trying to use a GUI to show a basic video demonstrating that VideoReader can be utilized to show a video in a GUI. I was successful in playing a .mp4 file, however, when I tried the code with a .avi file, the following message regarding the Indeo5 codec:
Error using VideoReader/init (line 619) The file requires the following codec(s) to be installed on your system: Indeo5
In light of this, I included a call to VideoWriter so that I could create an uncompressed version of the .avi file, however, this did not correct the problem. I am hoping that someone can guide me through whatever issue I may be encountering. My goal is for this basic code to be able to play various video types, however, I have no experience working with GUIs, unfortunately. I have included the code segment from the GUIDE editor relevant to my issue below.
Thank You!
% --- Executes on button press in LoadVideo.
function LoadVideo_Callback(hObject, eventdata, handles)
% hObject handle to LoadVideo (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
readerObj = VideoReader('c7movieu.avi');
writerObj = VideoWriter('transcoded_c7.avi','Uncompressed AVI');
open(writerObj)
for k = 1:readerObj.NumberOfFrames
img = read(readerObj,k);
writeVideo(writerObj,img);
end
close(writerObj);
vid = VideoReader('transcoded_c7.avi')
nframes = vid.NumberOfFrames;
sz = [vid.Height vid.Width];
mov = read(vid, [1 nframes-1]);
movv = struct('cdata',squeeze(num2cell(mov,[1 2 3])), 'colormap',[]);
movie(movv,1,vid.FrameRate)

Answers (1)

You would have to be able to read the file in order to transcode it. You will need to install the Indeo5 codec for that.
Note: Indeo5 is not available for any 64 bit system. The manufacturers of the codec do not want the codec to continue existing, as the design of it is strictly limited to 32 bit files; they would like people to upgrade to a more modern codec.

2 Comments

So what is the solution for windows 7 64 bits ?
You would have to use 32 bit MATLAB together with a 32 bit Indeo5 codec; or you would have to us an external program to convert it to something that could be read.

Sign in to comment.

Products

Asked:

on 15 Jun 2015

Commented:

on 3 Aug 2016

Community Treasure Hunt

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

Start Hunting!