MP3 recording

Started by
4 comments, last by rjvereijken 16 years, 11 months ago
Good day, I'd like to record an MP3 straight from the audio input from a computer, and if possible even cut out some parts. I always thought this would be possible using DirectShow, but I can't find any tutorial or sample about MP3 at all. I am hoping you could point me in the right direction or link me some examples. Thanks in advance.
Advertisement
Well, you'd have to capture the input and then encode it into MP3. The encoding part is going to be difficult, I think (especially with MP3).
NextWar: The Quest for Earth available now for Windows Phone 7.
LAME boasts a DirectShow filter, so presumably it's only possible after installing this. I'd guess that encoding in DirectShow is wrapped to be codec-agnostic, so looking for a 'MP3 Encoding DirectShow' example is missing the bigger picture. I've never worked with DirectShow, but by my reckoning any encoding example can be easily adapted to use whatever MP3 codecs are registered.

Otherwise, here is an example of capturing using the Windows API and encoding directly via the LAME API.

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Thank you for your replies. I think the last link you posted is enough to get me started. It doesn't HAVE to be DShow, I just understood it would be the only proper way.
If the MP3-encoding becomes a problem, you might consider recording to Ogg-Vorbis format. Many players that support MP3 also support Vorbis, it is (probably) free of any patenting issues and IMHO the Vorbis API is easier to use than DirectShow.
You can find more info on the xiph.org website, including downloads of the libogg and libvorbis libraries.
Well we chose mp3 as it needs to be playable on as many devices as possible, like mobile phones, mp3players. I was under the impression that ogg Vorbis is still not that common on these players..

This topic is closed to new replies.

Advertisement