Configuration¶
Configuration in Rygel can be accomplished through several mechanisms with different priorities. Configuration can be done, in descending order of precendence, through:
Environment variables
Command line arguments
User configuration
System-wide configuration
All configuration options are available in all configuration mechanisms.
Environment variables¶
Special environment variables for everything¶
- RYGEL_IFACE
Set the network interfaces to bind to.
- RYGEL_PORT
Define the network port to bind to.
- RYGEL_DISABLE_TRANSCODING
Disable transcoding globally.
- RYGEL_LOG
Set the log level of rygel.
- RYGEL_PLUGIN_PATH
Set the plugin search path of rygel.
- RYGEL_ENGINE_PATH
Set the media streaming and transcoding engine search path for rygel.
- RYGEL_MEDIA_ENGINE
Set a specific media streaming engine to pick up from the media engine search path.
- RYGEL_DISABLE_UPLOAD
Disable media file upload via UPnP.
- RYGEL_DISABLE_DELETION
Disable remote file deletion via UPnP.
- RYGEL_PLUGIN_TIMEOUT
Set the time-out for finding the plugins. Useful to increase when running inside valgrind.
- RYGEL_DATABASE_DEBUG
If set to 1, the database library will print the used SQL statements.
Also for every plugin you can set the following environment variables:
- RYGEL_PLUGIN_NAME_TITLE
Set the title of the plugin.
- RYGEL_PLUGIN_NAME_ENABLED
Enable or disable the plugin.
Generic configuration settings¶
It is possible to override all settings using config variables. The pattern here is RYGEL_,
followed by the name of the plugin in uppercase, followed by the name of the config option with
- replaced by _.
Examples¶
- Disabling meta-data extraction in MediaExport
RYGEL_MEDIAEXPORT_EXTRACT_METADATA=false- Only allow transcoding to MP3:
RYGEL_GSTMEDIAENGINE_TRANSCODERS=mp3- Turn off IPv6 temporarily
RYGEL_GENERAL_IPV6=0
Configuration files¶
The main configuration of Rygel is done through two files. The user-specific documentation in,
$XDG_CONFIG_HOME/rygel.conf and the system-wide configuration in /etc/rygel.conf.
Settings in the user-specific configuration override the settings in the system-wide configuration.
A default configuration file can be found here.
Rygel’s default configuration file¶
Rygel reads its configuration values from the file $XDG_CONFIG_HOME/rygel.conf or a file given on command line with the –config option. If that file does not exist, it uses the file /etc/rygel.conf. Most of the options may be overriden by commandline arguments or environment variables. See rygel(1) for details on those.
Lists in the configuration file are separated by a semicolon(;). Boolean values must be either the text true or the text false.
- ipv6
Set to false if you do not want Rygel to run on IPv6 addresses. Whether or not IPv6 is actually supported depends on how GUPnP was configured.
Default value:
true- enable-transcoding
Set to false if you want to disable transcoding of audio and video
Default value:
true- video-upload-folder
Where video files should be saved if allow-upload is true. It defaults to @VIDEOS@, which expands to the standard videos folder (typically ${HOME}/Videos)
Default value:
@VIDEOS@- music-upload-folder
Where music files should be saved if allow-upload is true. It defaults to @MUSIC@, which expands to the standard videos folder (typically ${HOME}/Music)
Default value:
@MUSIC@- picture-upload-folder
Where picture files should be saved if allow-upload is true. It defaults to @PICTURES@, which expands to the standard videos folder (typically ${HOME}/Pictures)
Default value:
@PICTURES@- media-engine
Default media engine to load. If not specified, the engine folder is searched recursively and the first engine found is loaded.
Default value:
librygel-media-engine-gst.so- interface
List of network interfaces to attach rygel to. You can also use network IP or even ESSID for wireless networks on Linux. Leave it blank for dynamic configuration.
- port
Set the listen port for the HTTP server. 0 means to dynamically chose a port.
Default value:
0- log-level
Comma-separated list of domain:level pairs. This allows to specify log level thresholds infividually for different domains. Valid domains are “rygel” for anything not a plugin, “*” for everything or the name of a plugin.
The available levels are 1 to 5, with 1 only logging critical errors and 5 being debug logging. All levels include messages of the levels below.
To see log messages of level 5, it is also necessary to set the environment variable
G_MESSAGES_DEBUGtoallto get any output.Default value:
*:4- allow-upload
Whether clients should be allowed to upload media files to the server.
Default value:
false- allow-deletion
Whether clients should be allowed to delete media files from the server.
Default value:
false- force-downgrade-for
Semicolon-separated list of device user agents (or parts thereof) that need a downgrade in the UPnP device versions.
Warning
ONLY change this setting when told to do so or when you know what you are doing If you find that adding your device makes it working with Rygel, please file an issue at https://gitlab.gnome.org/GNOME/rygel/issues/new/?issuable_template=IOP so we can include it in future releases.
Default value:
Allegro-Software-WebClient;SEC_HHP;SEC HHP;Mediabolic- IMHTTP/1;TwoPlayer;Reciva;FDSSDP;Portable SDK for UPnP devices;Darwin- acl-fallback-policy
Access control fall-back policy if no access control provider could be found. The default value is
true, which will allow any peer to access everything.Default value:
true- strict-dlna
If set to
true, Rygel will disable various features that improve compatibility with many clients, but break standard conformance.Default value:
false
Generic options for the database support library
- debug
Set to
truefor extended SQL outputDefault value:
false
These settings are specific for the GStreamer Media Engine. This is the default
engine, refer to the media-engine setting. The following options are
available
- transcoders
A semicolon-separated list of active transcoders. This setting has no effect if
enable-transcodingis set tofalse.Possible values are lpcm,mp3,mp2ts,aac,avc or wmv.
Default value:
lpcm;mp3;mp2ts;aac;avc
Sections for plugins are denoted with [PluginName] and can contain options
specific to a plugin, or any of these common options
- title
Title of the device implemented by this plugin.
There are some variables which will be replaced by rygel. @REALNAME@ will be substituted by the user’s real name, @USERNAME@ by the user’s login name, @HOSTNAME@ by the name of the machine rygel runs on, and @PRETTY_HOSTNAME@ the system description from /etc/machine-info if available, otherwise it’s equivalent to @HOSTNAME@.
Default value:
TITLE- enabled
You can individually enable or disable plugions by setting this to
trueorfalse- uuid
Instead of having a plugin generate an UUID on its own, it is possible to pass a fixed UUID through the configuration. Format is a plain UUID, NOT an UDN.
- energy-management
Set to true if you would like the UPnP device to contain an EnergyManagement service. Note that additional settings are required then, see the section on EnergyManagement below.
Default value:
false
Section [Renderer]¶
Generic options for the renderer framework, independent of the back-end
- image-timeout
Default showtime in seconds to use for images in playlists if
dlna:lifetimeis not set. DLNA wants something between 5 and 15 seconds.Default value:
15
Section [LocalSearch]¶
The LocalSearch plugin uses the centralized database of meta information from the LocalSearch project, using the TinySparql library. See https://tracker.gnome.org for more information.
- only-export-from
Restrict the exported media items to files that are located in any of the folders listed. This setting supports the usual @ patterns for path substitution.
Default value:
@MUSIC@;@VIDEOS@:@PICTURES@- share-pictures
Enable or disable sharing of all pictures found in the LocalSearch database, filtered for the list of folders in
only-export-from.Default value:
true- share-videos
Enable or disable sharing of all videos found in the LocalSearch database, filtered for the list of folders in
only-export-from.Default value:
true- share-music
Enable or disable sharing of all music found in the LocalSearch database, filtered for the list of folders in
only-export-from.Default value:
true- strict-sharing
When enabled, only files that have a DLNA profile (nmm:dlnaProfile) will be exported. Improves compatibility with the DLNA standard, but potentially filters out a lot of media files.
Default value:
false
Section [MediaExport]¶
The MediaExport plugin is an alternative to the localsearch-backed media export.
It extracts meta-data by itself and stores it in a SQLite database under
$XDG_CACHE_HOME/rygel/media-export.db.
Note
If both plugins, LocalSearch as well as MediaExport, are enabled, MediaExport will disable itself in favour of the LocalSearch plugin.
- uris
A list of if URIs to expose via UPnP. It may be files, folder or anything supported by GVFS. If left empty it defaults to export the user’s music, video and picture folders as defined by the XDG special user directories spec. These default folders can be referenced by @MUSIC@, @PICTURES@ and @VIDEOS@. Locations can be entered as either fully escaped URIs or normal paths.
An example for uris could be
uris=@MUSIC@;/home/user/My Pictures;file:///home/user/My%20VideosNote
If you enter a normal path that contains whitespace, there is no need to escape them with either a backslash or putting the string in quotes.
Note
It is strongly advised against using an exported folder as a target for downloads when
extract-metadatais enabled. Rygel will most likely ignore the files then because they will fail to extract while the download is ongoing.Default value:
@MUSIC@;@VIDEOS@;@PICTURES@- extract-metadata
Whether MediaExport should query and store meta-data from the media files
Default value:
true- monitor-changes
Whether MediaExport should monitor the locations given in uris for modifications
Default value:
true- monitor-grace-timeout
How long MediaExport should wait to start meta-data extraction after it has been notified about a file change
Default value:
5- virtual-folders
Whether MediaExport should show generated folders based off of file meta- data
Default value:
true
Section [Playbin]¶
Playbin is a default implementation of a DLNA Media Renderer, using GStreamer. It allows minimal customisation of the sinks used in the renderer. For example, to configure an audio-only renderer, set “audio-sink” to “autoaudiosink” and “video-sink” to “fakesink”.
- audio-sink
Override the default audiosink for the playbin used in the renderer
Default value:
autoaudiosink- video-sink
Override the default videosink for the playbin in the renderer
Default value:
autovideosink
Section [GstLaunch]¶
The GstLaunch plugin allows to export GStreamer Pipelines using the syntax from the gst-launch commandline utility. It is able to export more than one pipeline. You have to omit the sink which is provided by Rygel.
Available items have to be declared using the “launch-items” setting. Each
pipeline then needs to be configured for the three values of “launch”, “mime”
and “title”, and optionally for “dlnaprofile”. For example, given the setting of
launuch-items=audio;video it is necessary to also define triplets of
audio-title, audio-mime, audio-launch and video-title, video-
mime and video-launch.
Section [MPRIS]¶
MPRIS allows you to turn any media player that implements MPRIS control into a DLNA/UPnP renderer by converting UPnP calls to MPRIS and vice-versa. If you want to disable MPRIS integration for some players, e.g. if they do not support setting the URL through MPRIS, you can add a section with the name of the MPRIS endpoint as shown in Rygel’s log and set enable to false
Section [org.mpris.MediaPlayer2.io.bassi.Amberol]¶
Example of disabling a specific player for MPRIS integration
Section [External]¶
Similar to MPRIS the External plugin allows applications that expose the MediaServer2 D-Bus specification converted into a DLNA server.