How can I convert wav to MP3 programatically in C++?
Asked
Active
Viewed 7,934 times
0
-
possible duplicate of http://stackoverflow.com/questions/2495420/is-there-any-lame-c-wraper-simplifier-working-on-linux-mac-and-win-from-pure-c – unwind Apr 14 '10 at 09:15
-
They are similar questions, but not exact duplicates. This question assumes no knowledge of where to begin, whereas the other question knows about one particular encoder and asks for a simpler way to use it. Searchers who don't already know what Lame is will not recognize that question as something that would provide an answer for this question. – Rob Kennedy Apr 14 '10 at 09:21
-
programatically - as opposed to... – Martin Apr 14 '10 at 10:26
-
1Presumably as opposed to asking (on SuperUser) for an application that can do so. – MSalters Apr 14 '10 at 12:54
2 Answers
3
You would use an encoder, preferably as a pre-made library as doing your own is a bit of an undertaking.
See this question for an example of how to use the LAME open source encoder.
0
FFMpeg ( http://ffmpeg.org/ ) does this from a UNIX command line. So if you can open a pipe to the command line in C++, you can use ffmpeg for the conversion.

kingjeffrey
- 14,894
- 6
- 42
- 47