How can I programatically convert .ogg to .mp3? And should I?
Posted on 2014-07-17
A few years ago, I ripped my entire CD collection to my hard drive. A friend who I considered very savvy in the computer-music world told me to rip to .ogg, because .ogg had better sound quality and it was the "wave of the future". He believed that .ogg would eventually be the industry standard.
Well, now I have a smidge over 10,000 songs in .ogg format, and most players don't like the format. I created an application that I will be using to create playlists and play them, using the Windows Media Player. The application works fine except that it won't play .oggs.
So I am considering my options. I know there are bulk converters out there and I can convert my entire collection to .mp3, but I understand that there will be sound quality loss. I also don't want to lose the original .oggs in case I find an alternative that uses oggs. But I don't really want to have to store my entire music collection twice.
So what I would like to do is insert a bit of converter code so that I can convert just that song (or list of songs) which the WMP is about to play. What would be the simplest way to do this? I'm looking for a freeware (or cheapware) library or a executable that I can call via Process().
Also, is there a way to catch the event on the WMP that occurs when the current song or playlist is finished playing? That way I could keep track of where I am in a list of mixed oggs and mp3s, and play them one by one, converting only if necessary.
One other alternative, if it's available, would be a library as easy to use in code as the WML, but which will play .oggs. Anything like that out there?