mp3read and mp3write
These versions of mp3read and mp3write are direct drop-in replacements for wavread and wavwrite to access MPEG audio mp3 files. Features include:
- aims to duplicate complete syntax of wavread and wavwrite
- also supports on-the-fly downsampling and channel merging of mpg123
- optimized for very long mp3 files - only decodes the needed portion
- uses popen for encoding to avoid a large temporary file (when available - see my popenw mex)
- attempts to preserve time alignment of files through read/write loop by removing "warm up" samples
- package includes helper binaries for Linux, Windows, Mac-PPC, Mac-Intel, and Mac-Intel-64bit
Cite As
Dan Ellis (2024). mp3read and mp3write (https://www.mathworks.com/matlabcentral/fileexchange/13852-mp3read-and-mp3write), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data >
Tags
Acknowledgements
Inspired by: MP3WRITE and MP3READ
Inspired: m4awrite - write m4a format audio file, MIRtoolbox, MP3 Player (GUI), audioread - unified audio file input function
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
mp3readwrite/
mp3readwrite/html/
Version | Published | Release Notes | |
---|---|---|---|
1.4.0.0 | - updated binaries for maci64 (static link) and windows (http works)
|
||
1.2.0.0 | Updated to use and include more recent versions of mpg123 and lame. I've done my best to fix inconsistencies with the 'size' return, but for some MP3s this relies on header info I can't probe. |
||
1.1.0.0 | This version enables the ability of mpg123 to read mp3 files from URLs. |
||
1.0.0.0 | - updated interaction of sample limits and predelay compensation in mp3read to make it more consistent
|