Where to get pure C++ Lame MP3 encoder - PCM to MP3 example?
Asked Answered
P

4

7

So all I need is a simple function that sets it up (eating incoming PCM RATE (for example: rate near to 44100) It's channels (for example: 2) and -bits (for example: 16) and desirable 128 kb\s rate) and another one that takes PCM data and encodes it into pure MP3 frames.

I know it looks like a silly homework task but I assure you - it is not.

I hope it will be of help to all C++ developers starting with MP3s.

So can anybody please help me with that?

Paisley answered 10/3, 2010 at 19:33 Comment(0)
V
8

See the example I gave in your other question for the basic usage of Lame. It should contain everything you need.

Vershen answered 23/3, 2010 at 1:31 Comment(1)
best one I've seen for 6 month!)Paisley
P
3

It's a long time since i messed with this, but Lame lib contains all you need to do it, check out lame.h , there is some test code you could look into.

Planer answered 10/3, 2010 at 22:6 Comment(0)
P
1

Personally, I'd be looking at ffmpeg's libavcodec. There's an example file containing an audio_encode_example which ought to be more or less what you're looking for.

See also this question.

Note that not all ffmpeg packagings include mp3 codec support (patent issues) by default, although there's usually some simple way of enabling it.

Priority answered 10/3, 2010 at 22:6 Comment(0)
G
1

GStreamer should definitely be able to handle this. If you are on Windows you can use the GStreamer Winbuilds to get started.

Greenquist answered 19/3, 2010 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.