MP3 recording
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.
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).
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
Otherwise, here is an example of capturing using the Windows API and encoding directly via the LAME API.
Admiral
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.
You can find more info on the xiph.org website, including downloads of the libogg and libvorbis libraries.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement