Skip to content

Now Playing with Linux

Jonti Olds edited this page Nov 5, 2015 · 1 revision

JMPX on Linux uses MPRIS to obtain the currently playing song title to send via RDS (Radio Data System) to the listener.

It looks for the first compatible MPRIS2 player and queries the Metadata property.

MPRIS uses Dbus. Therefore on a media player such as VLC you will have to enable the Dbus control interface. For VLC this can be performed by going to Tools->Preferences->Shows settings all->Interface->Control interface and checking "D-Bus control interface".

There is a command line that can be used to query the Dbus called qdbus. For example to query what VLC is playing you can type qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata, after typing this you will see something like the following...

mpris:trackid: 
vlc:nowplaying: Anton Ishutin Leusin - - Sincerity {Patrick Podage Remix}
vlc:publisher: 1
xesam:genre: DeepFreshMusic
xesam:title: DeepFreshRadio
xesam:url: http://streaming207.radionomy.com:80/DeepFreshRadio

By modifying the file nowplaying_linux.cpp any data returned from this can be used as the data sent via the RT (Radio Text) group of RDS. This might be handy if you desire some other custom entry of the Metadata property to be sent via RDS.