24 March 2019

The need

I have a Raspberry 3 placed behind a 10 years old plasma LG tv. Some years ago I configured Kodi and used it for some time, but eventually I dismissed it. Too heavy, too slow.

That raspi3 continued serving some docker containers but it was underutilized…​ so I started exploring some minimalistic alternative to heavyweight mediacenters, looking only for these features:

  • play audio/video streams

  • remote control i.e. from a smartphone

In the meantime I replaced my laptop hard disk with an SSD, so I attached it to an older raspberry 1 and got a minidlna media server.

I found some articles talking about

The solution

I installed Rygel, and at first I got a lot of segfault and X server restarts as soon as I started playing a movie. Then, after last updates, it started working like a charm :-)

Practical steps

Install the system

So I started with a fresh Raspbian Stretch Lite image.

I installed LXQT to have a desktop environment.

sudo apt-get update
sudo apt-get install lightdm lxqt

Then I gave a sudo raspi-config, then hit Boot Options, Desktop / CLI and Desktop Autologin in order to have the desktop environment available at boot.

Install VLC and Rygel

After a reboot I installed vlc and rygel

sudo apt-get install rygel vlc rygel-playbin

and issued a sudo nano /etc/rygel.conf in order to enable the mpris support:

/etc/rygel.conf

[MPRIS]
enabled=true

(MPRIS gives rygel control over VLC)

Auto start in background

Rygel per-se is enough to play movies, but so far I’ve not found an easy way to launch the player full screen. VLC can be started full screen in background, so that it appears only when needed, leaving the desktop available for other stuff when not playing movies.

This is how I start automatically VLC ~/.config/autostart/vlc.desktop

Name=VLC as Media Renderer
GenericName=UPnP/DLNA Rendering Services
Comment=UPnP/DLNA Rendering Services
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=mediarenderer;play;audio;video;pictures;
Exec=vlc --intf dummy --fullscreen
Terminal=false
Type=Application
NoDisplay=false
StartupNotify=true
X-GNOME-Autostart-enabled=true
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=vlc
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.0.6

I’ve linked rygel desktop config ln -s /usr/share/applications/rygel.desktop ~/.config/autostart/rygel.desktop

Log out and log in again.

Install a DLNA sender on the smartphone

Install a DLNA/UPnP Sender on the smartphone in order to control the player. I’ve tried BubbleUPnP and AirPinCast, they both work.

Then it is just a matter of choosing the media you want to play from any DLNA source and stream it to the raspi renderer.

Just as a recap, this is the resulting system

diag 09852b9151e2656ac281bbb8796bc1a0

Enjoy your lighweight DLNA movie player!



blog comments powered by Disqus