In Rhythmbox's Preferences, you can change the "Preferred Format" for Music to MPEG Layer 3 Audio, Ogg Vorbis, FLAC, or MPEG 4 Audio. However, despite there being a Settings button, it does not become enabled for any of these choices. (I have installed all of the gstreamer plugins, but this has made no difference.) So how can you change the "Preferred Format", for example to change the bit rate or the quality setting?
Ubuntu – How to edit the “Preferred Format” settings in Rhythmbox
Just so we're talking on the same page, the pipeline used by this encoding target looks like the following on my system:
audio/x-raw-int,rate=44100,channels=2 ! lamemp3enc name=enc target=0 quality=6 ! xingmux ! id3v2mux
You can learn about each of the elements in the pipeline with the
gst-inspect-0.10 tool. For example, to learn about the MP3 encoder used here, you could run:
Among other things, this will tell you about the various properties supported by the element and their defaults. This tells me:
- encode using variable bit rate (
- the encoder has been set to optimise for quality rather than a target bitrate (
- uses a VBR quality setting of 6 (
- uses the standard quality of the LAME engine (
So you should already be getting VBR output from that pipeline. If you want higher quality, lower the 'quality=' number (0-10, 0 is the highest quality) and perhaps add
I've upgraded Ubuntu to 13.04. XBMC also upgraded and now it sounds as bad as Clementine. Problem solved :-(
But, wait! After delving more in the problem, it looks like the guilty is on Pulse Audio, the newest Linux sound architecture that promised to solve all of your audio problems.
After reading a lot and understanding a little, it looks like that PulseAudio decodes and re-encodes the audio signal degrading it. This long thread taught me a lot: Bit Perfect Audio in Linux.
I've managed to get my high quality sound again configuring Clementine to directly access the Alsa S/PDIF channel. No resampling involved and the sound is a lot better. To do it, go to
Tools -> Preferences -> Playback and change
Output plugin to "Audio Sink (ALSA)" and the output device to the E958 direct hardware device.
Discover your own direct device with the command
aplay -L. Here is a the relevant part of the command output in my computer:
dsnoop:CARD=Intel,DEV=1 HDA Intel, ALC888 Digital Direct sample snooping device hw:CARD=Intel,DEV=0 HDA Intel, ALC888 Analog Direct hardware device without any conversions hw:CARD=Intel,DEV=1 HDA Intel, ALC888 Digital Direct hardware device without any conversions plughw:CARD=Intel,DEV=0
So my outupt device is the "direct hardware" and digital. The key info is the "Direct hardware device without any conversions". You may have more than one, like one for your hdmi video port and another for your sound device. I should fill it with
hw:0,1(hw is the device, 1 is the DEV and I have no idea where the first zero comes from).
Since nothing is easy, you should first turn off pulse audio and run Clementine this way:
pasuspender -- clementine
Voilá! Now I've got high music quality.
The problem is that the spdif output was busy with Pulse audio. It looks like you can't share an alsa output. I've changed my setup.
In pulse audio I've changed my default sound output to Analog Stereo, and reconnected my old 2.1 speakers. Now every application will play to this channel. The SPDIF output is connected to my stereo and Clementine is hardcoded to use it exclusively. Don't forget to uncheck the "Cross-fade" preferences in Clementine so it doesn't have to share the channel with itself.
Now my I can hear high quality music in my stereo and all other applications use the low fidelity computer speakers.
The following demonstrates how to modify the settings for the preferred format "Ogg Vorbis":
Create a GstVorbisEnc.prs preset file:
The [Default] section contains the settings for the "Default" preset. The example I have given above is for 0.6 quality (~192kbps) VBR encoding. The default is 0.3 (~112kbps). Quality can be set from -0.1 to 1.0. There is further information on these settings at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-vorbisenc.html
Now add the line "preset = Default" to the [streamprofile-oggvorbis-1] section in rhythmbox.gep:
And this demonstrates how to modify the settings for the preferred format "MPEG Layer 3 Audio":
Create a GstLameMP3Enc.prs preset file:
The [Default] section contains the settings for the "high" preset. The settings above are for 128kbps stereo CBR encoding. There is further information about the possible values at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-lamemp3enc.html
Add the line "preset = Default" to the [streamprofile-mp3-1] section in rhythmbox.gep:
Thanks to preiaen for providing the link that helped me find a solution:
Bug #945987 “No Settings are available in “Preferred format” https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/945987
This led to the following pages where I found further information:
[SOLVED] How to edit CDRip settings in Rhythmbox - Ubuntu Forums http://ubuntuforums.org/showthread.php?t=1965432
Linux Format forums :: View topic - Ubuntu 12.04 LTS Released http://www.linuxformat.com/forums/viewtopic.php?p=106176