Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ mp3 ffmpeg
I am exhausted searching for a c++ mp3 decoding library, preferably free (like lgpl) and cross-platform or for windows and mac. Can anyone suggest such library and post some tutorial for using it?
ffmpeg and sdl (sdl_sound, sdl_mixer) aren't compiling. I am unable to get mpg123 working - is it for linux world only or what? Is there some tutorial on using mpg123 on windows? mpg123 is unable to find some symbols that is I am not putting some dll's at right path - but which?
 
Overall, I want be able to read and right all major audio file formats on windows and mac - starting with windows.
Posted 23-Mar-12 1:22am
Comments
Albert Holguin at 23-Mar-12 16:10pm
   
maybe you should post some of the errors that are keeping your libraries from compiling (along with what compiler you're using).
Member 8751161 at 25-Mar-12 6:36am
   
The errors are produced because MSVC (in visual studio and Qt) doesn't comply with the C99 standard and ffmpeg uses it.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It looks[^] you may actually (cross) compile ffmpeg.
  Permalink  
Comments
Member 8751161 at 25-Mar-12 6:30am
   
Will this build procedure give the same output as ffmpeg.zeranoe.com offers? Or will it remove the errors that zeranoe's build produces?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

What exactly you want to do with decoded file?
 
a) If you want to play it, use irrKlang. I used it, is easy to understand. There are C++ and C# bindings. It also support many of files (*.mp3, *.ogg, *.wav, *.flac, *.ogg even *.mod (amiga modules). irrKlang have to licenses, free and commercial.
 
b) If you want to get tags from file(or save to file) use TagLib (for C++, C, Python, Perl and Ruby) or TagLib-Sharp for C#. I also used it and it's quite enjoyable. It's LGPL
 
c) If you want to use some Fast-Fourier Transformation stuff there are also some libraries, but I didn't use them. I saved some link to them but I don't have on this PC. If you need them, just tell me, I will search for it.
 
P.S
irrKlang will not give you tags, and with TagLib you can't play audio files, so you will need to use both of them if you need to play and to tag.
 
If you have some problem with them you can write to me PM.
 
Edited:
O! And about multi-platform: did you heard about Qt? If not you should. It is really awesome tool.
  Permalink  
v2
Comments
Member 8751161 at 25-Mar-12 6:33am
   
I want it for audio analysis - option c. And I am using Qt, I meant multiplatform for the audio library. Does anyone know Qt's multimedia or phonon can do the work (mp3 decoding)?
vonpik at 28-Mar-12 4:23am
   
Phonon is quite limited, for example it can't even play *.flac files, so I suggest to use some external libraries. There are plenty of them in the Internet.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

How about BASS audio library [^]
 
"BASS is an audio library for use in software on several platforms. Its purpose is to provide developers with powerful and efficient sample, stream (MP3, MP2, MP1, OGG, WAV, AIFF, custom generated, and more via OS codecs and add-ons), MOD music (XM, IT, S3M, MOD, MTM, UMX), MO3 music (MP3/OGG compressed MODs), and recording functions. All in a compact DLL that won't bloat your distribution."
 
License: "BASS is free for non-commercial use. If you are a non-commercial entity (eg. an individual) and you are not making any money from your product (through sales, advertising, etc), then you can use BASS in it for free."
 
For completeness i would add "LAME[^]- a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL."
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 BillWoodruff 170
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,777
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 24 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100