21162

decode an mp3 to a stream of ints

I'm looking for an easy to use lib that will convert an MP3 file to a sequence of int values (and the reverse), preferable without having to dump them all into RAM. A "decode the next 16kB into this buffer" like API would be ideal.

I need C or simple C++ bindings.

A MP3<->RAW filter CLI tool would work but I'd rather not have to keep uncompressed files on disk.

Answer1:

Try libmad or ffmpeg's libavcodec. Both should meet your requirements. The ancient mp3lib which was originally derived from/part of (?) mpg123 has also been resurrected in mplayer with new development and perhaps has the best performance, but probably the ugliest code. :-)

Answer2:

I created a .NET wrapper for mpg123 for use in my projects, and posted it to SourceForge.

It is here.

http://sourceforge.net/projects/mpg123net/

So you say you need it for C/C++ - ok, i posted it so you can check out my sample, that has so little code that is enough for initializing decoder and putting it to work for you.

Recommend

  • How to compare source in Git repository between source in SVN repository
  • Jsoup parsing an Html file with a tbody tag
  • WPF DataGrid lost focus after row delete
  • Reduce Mono runtime size
  • Changing Machine Type on Google Cloud
  • How do I control the soft menu button in Honeycomb?
  • Serializing socket
  • Hudson dependencies
  • Collect HostCPU utilisation and disk I/O speed using XenServer Java API
  • Are there algorithms for putting a digest into the file being digested?
  • How do I configure Maven Cargo to use an embedded Tomcat server?
  • UML diagram generator in Visual Studio 2010
  • Laravel lmutator $this->attributes return 'Undefined index: id'
  • OpenCV Python: Draw minAreaRect ( RotatedRect not implemented)
  • How to set an entity field that does not exist on the table but does exists in the raw SQL as an ali
  • Count from each distinct date, fill in missing dates with zero
  • Is there a Windows socket API call / option to “block” a range of ports à la SO_EXCLUSIVEADDRUSE
  • Can I use AllJoyn Framework for Wifi Direct in iOS?
  • Using Generics on right hand side in Java 6?
  • opencv display image without x server
  • Redshift Querying: error xx000 disk full redshift
  • Silverlight DependencyProperty.SetCurrentValue Equivalent
  • Unable to install Git-core+svn by MacPorts
  • Django simple Captcha “No module named fields” error
  • Installing Apache MyFaces 2 on WildFly 8.2.0
  • How to attach a node.js readable stream to a Sendgrid email?
  • Could not find rake using whenever rails
  • Spring security and special characters
  • JavaScriptCore crash on iOS9
  • Hazelcast - OperationTimeoutException
  • RestKit - RKRequestDelegate does not exist
  • retrieve vertices with no linked edge in arangodb
  • Revoking OAuth Access Token Results in 404 Not Found
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Linking SubReports Without LinkChild/LinkMaster
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • UserPrincipal.Current returns apppool on IIS
  • Python/Django TangoWithDjango Models and Databases
  • java string with new operator and a literal