If you search around for a method to enable MP3 ripping with Sound Juicer on Ubuntu, you will end up with a method to install gstreamer-lame and add MP3 profile to Sound Juicer's output profile (gnome-audio-profiles-properties) with the following GStreamer pipeline:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc
With this pipeline, LAME is set to encode MP3 at 128kbps CBR which is most portable but not very high quality.
After searching for a method to adjust encoding quality, I found another option:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc preset=standard
This one set LAME to standard preset profile. But there is no explaination on what standard preset is and how can I control the bitrate and other options. But most importantly, this option
After some more research, I found gst-inspect which could be used to inspect GStreamper plugins/elements properties. By "gst-inspect lame" I now know that I could set the quality by using option vbr-quality. Thus, now my pipeline is the following:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc vbr=4 vbr-quality=2 vbr-min-bitrate=128 quality=2
"vbr=4" tell LAME to use new VBR algorithm, "vbr-quality=2" set the quality level to 2 (0 is best) which give average bitrate around 190kbps, "vbr-min-birate=128" tell LAME not to use bitrate below 128kbps. Note that bitrate for silence sound can be lower than this vlaue. If you want a hard minimum, use "vbr-hard-min" instead. The option "quality=2" tell LAME to optimize internal algorithm for good quality (default is "quality=5"). "quality=0" is best, but it is very slow. FYI, vbr-quality=3 and lower is considered high quality and transparent for most listeners. The previously mentioned "present=standard" option is equilent to "vbr=2 vbr-quality=2".
There are many more options to play around with. Please see "gst-inspect lame" for options details. For a good explanation of LAME encoder setting, please see the article on hydrogenaudio.org. You may also read LAME Usage Manual.
Another good tweak is setting how Sound Juicer read audio CD. Normally, Sound Juicer use CD Paranoia to read CD at paranoid mode 4, i.e. using "cdda2wav-style overlap checking". For high quality CD ripping, one usually wants full paranoid mode. This can be done by setting "apps/sound-juicer/paranoia" in GConf, via Configuration Editor, to value "255" which mean "full paranoia" mode. Again, I get this number from "gst-inspect cdparanoia" :) Using full paranoid mode is considerbly slower but hopefully will give higher quality results.
Keywords: mp3, cd ripping, audio, linux
No comments:
Post a Comment