Presentation of Minidlna
DLNA stands for Digital Living Network Alliance. It’s a set of guidelines, including Universal Plug and Play (UPnP), for media management,device discovery and control (see wikipedia).
You’ve got DLNA servers, machines able to share a content, and DLNA clients, devices displaying it like your TV for example.
Content can be photos, audio files or videos.
Minidlna is a simple but robust DLNA server. It doesn’t make any on-the-fly conversions but consumes very few resources.
Let’s assume that you’ve got a server running RHEL/CentOS 7 that you can connect through the network to your TV. Your TV is a DLNA client, your server will become a DLNA server and will sent content already available on its own disks.
DLNA Server Installation
Unfortunately, Minidlna isn’t available as a package.
However, binary files exist for x86_64.
Start by creating a temporary directory:
# mkdir minidlna
Then, download the binary files:
# wget http://netix.dl.sourceforge.net/project/minidlna/minidlna/1.1.4/minidlna-1.1.4_static.tar.gz
Extract the files:
# tar xvf minidlna-1.1.4_static.tar.gz ./etc/minidlna.conf ./usr/sbin/minidlnad ./usr/share/locale/it/LC_MESSAGES/minidlna.mo ./usr/share/locale/pl/LC_MESSAGES/minidlna.mo ./usr/share/locale/nb/LC_MESSAGES/minidlna.mo ./usr/share/locale/es/LC_MESSAGES/minidlna.mo ./usr/share/locale/nl/LC_MESSAGES/minidlna.mo ./usr/share/locale/ru/LC_MESSAGES/minidlna.mo ./usr/share/locale/sv/LC_MESSAGES/minidlna.mo ./usr/share/locale/ja/LC_MESSAGES/minidlna.mo ./usr/share/locale/de/LC_MESSAGES/minidlna.mo ./usr/share/locale/fr/LC_MESSAGES/minidlna.mo ./usr/share/locale/sl/LC_MESSAGES/minidlna.mo ./usr/share/locale/da/LC_MESSAGES/minidlna.mo
Move the minidlna.conf file into the /etc directory:
# mv etc/minidlna.conf /etc
Move the minidlnad binary file into the /sbin directory:
# mv usr/sbin/minidlnad /sbin
If you are OK with English messages, you can remove the newly created minidlna directory:
# \rm -r minidlna
To make management easier, paste the following lines into the /etc/systemd/system/minidlnad.service file:
[Unit] Description=Minidlna Daemon After=syslog.target network.target [Service] Type=forking ExecStart=/sbin/minidlnad [Install] WantedBy=multi-user.target
The main options to edit in the /etc/minidlna.conf file are:
- network_interface=eth0 # the name of your network interface
- media_dir=/opt/videos # the directory where contents are stored
- strict_dlna=yes # useful for Sony TVs
Then, update your firewall configuration for 1900/udp and 8200/tcp:
# firewall-cmd --permanent --add-port=1900/udp # firewall-cmd --permanent --add-port=8200/tcp # firewall-cmd --reload
Finally, activate at boot and start the Minidlna service:
# systemctl enable minidlnad && systemctl start minidlnad
DLNA Client Procedure
If you want your PC to become a DLNA client, displaying content coming from a DLNA server, follow these instructions.
First, you need to install vlc.
Then, you have to open your firewall:
# firewall-cmd --permanent --add-port=1900/udp success # firewall-cmd --reload success
Under a graphical interface, launch vlc and select view -> Playlist -> Local Network -> Universal Plug’n’Play.
You should see your DLNA server name at the top of the main window.
Source: Inspired from Jeff Arnold’s blog.