-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting mp3 stream to ogg vorbis #2
Comments
Wow, after installing libogg and libvorbis, then configuring with Two slight worries though, maybe you can help here:
Could this be a bug? |
Closing issue as the err issue has been described elsewhere. |
I realize this may not be an issue specific to your project, it's more an issue of mine. If there is a better place to post this please tell me.
Anyway, I have created a simple test project using your library, called NodeFFmpegTest, as you can see here:
https://github.com/tommedema/NodeFFmpegTest/blob/master/main.js
The goal of this test is to provide a demo of converting an incoming audio stream (at the moment mp3) to a writable stream (currently ogg vorbis). This is a very common use case, for example to allow iPad users to listen to music in their browsers using HTML5's audio tag (it supports ogg vorbis, but not mp3).
Please look at the link above to see my simple code. The problem I face is that the input mp3 is about 5MB while by default, the output ogg vorbis file 28.8MB (yet it's supposed to be a highly optimized format for the web).
Strangely enough, the setAudioBitrate option does not seem to have any effect on file size. Could this be a bug? I've also tried setting the -ar option, which had the same result (or lack thereof).
Forcing mono sound (1 channel) instead of 2 did reduce the size to about 14MB, but this should not be necessary. This original MP3 is in stereo as well.
An audio frequency of 22050 did help, it reduced the size to 15.8MB, note that the MP3 apparently has a frequency of 44100Hz. As expected, a frequency of 11025 makes the sound quality horrible.
The -aq option (audio quality) appears to have no effect at all.
Have you experimented with such conversion? Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: