views:

580

answers:

1

I need to programatically convert mp3's of any bitrate to a standard bitrate for streaming audio using c#.
Currently a buffer is populated with mp3 data from disk and then send out to the "listeners" at what should be a constant speed (the broadcast), but the mp3's could be of any bitrate. This makes timing extremely difficult and should rather be streamed at a standard bitrate instead of a bitrate dictated by the mp3 itself.

Lame seems to be the right encoder for the job, but any documentation or sample code only seems to be concerned with converting from wav samples to mp3. Not mp3 to mp3. The exe wrapper can do the bitrate conversion, but completely without any clue as to what gets passed to beEncodeChunk().

Has anyone had any experience in doing this kind of thing with lame or any similar encoder? Do i need to decode to wav then encode back to mp3 to achieve what i'm after? I welcome any links or advice with open arms.

Thanks

+1  A: 

you have to decode the mp3 to wav, then re-encode it to the new bitrate

Steven A. Lowe