File Exchange

image thumbnail

Vorbis ogg audio encoding/decoding

version (280 KB) by Alfredo Fernandez
ogg audio encoding/decoding

1 Download

Updated 21 Feb 2006

View License

Includes 2 functions to write and read OGG Vorbis files. It works like the commands WAVWRITE and WAVREAD.

1.- Just unpack in the toolbox folder under the MATLAB directory.
2.- Set the MATLAB search path to include that folder.

This version was made in MATLAB for WINDOWS only.

Cite As

Alfredo Fernandez (2020). Vorbis ogg audio encoding/decoding (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)


Hi all,

It works fine with mono files.
However, it seems that there is a problem with stereo files.

I have data collected from a stereo WAV file and stored in a matrix with two columns. But, the created OGG file is not readable (5ko).

Any solutions?


Pedro Velez

I keep getting this message

??? Error using ==> wavread
Cannot open file.

Error in ==> oggread at 68
[Y,FS,NBITS] = wavread(tmpfile); % Load the data and delete temporary file

I think that it has to do something with an error creating the temp.wav file

I was also getting a "Error while decodong file. File may be corrupted", but the quotes thing wasn't the issue. I just commented out the error message on line 66 and now it works like a charm.

Joris Gillis

Oggread fails with exception "Error while decodong file. File may be corrupted" when the 'install' folder contains spaces.

Add double quotes on lines 41 and 64 to solve this problem.

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux