MATLAB: Avi audio plot

image processing

i have an .avi video...i need to plot the audio of it.. in simple i need to analyse the audio of an .avi video... please suggest a method for it... i have tried all sort of searches and unable to get it done

Best Answer

I'm going to assume that you mean the Signal Processing Blockset, since the DSP System Toolbox did not exist in R2010a.
In R2010a with SP blockset, you can use the System object signalblks.MultimediaFileReader.
For example:
filename = 'youravifile.avi';
hmfr = signalblks.MultimediaFileReader(filename,...
'AudioOutputPort',true,'VideoOutputPort',false);
while ~isDone(hfmr)
audio = step(hfmr);
end
Every time step is called audio contains one frame of the audio. In the above, the next frame is overwriting the previous one, but you can save the audio frames or directly write them to a file with signalblks.MultiMediaFileWriter