Ubuntu – How to edit the “Preferred Format” settings in Rhythmbox

12.04gstreamerrhythmboxsound

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?

Best Answer

The following demonstrates how to modify the settings for the preferred format "Ogg Vorbis":

Create a GstVorbisEnc.prs preset file:

$ sudo gedit /usr/share/gstreamer-0.10/presets/GstVorbisEnc.prs
[_presets_]
element-name=GstVorbisEnc
version=0.10.36

[Default]
name=vorbisenc
bitrate=-1
quality=0.6
managed=false

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:

$ sudo gedit /usr/share/rhythmbox/rhythmbox.gep
...
[streamprofile-oggvorbis-1]
parent = oggvorbis
type = audio
format = audio/x-vorbis
presence = 1
preset = Default
...

And this demonstrates how to modify the settings for the preferred format "MPEG Layer 3 Audio":

Create a GstLameMP3Enc.prs preset file:

$ sudo gedit /usr/share/gstreamer-0.10/presets/GstLameMP3Enc.prs
[_presets_]
element-name=GstLameMP3Enc
version=0.10.36

[Default]
name=lamemp3enc
target=bitrate
bitrate=128
cbr=true
encoding-engine-quality=high
mono=false

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:

$ sudo edit /usr/share/rhythmbox/rhythmbox.gep
...
[streamprofile-mp3-1]
parent = mp3
type = audio
format = audio/mpeg, mpegversion=1, layer=3
presence = 1
preset = Default
...

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