Puesto al día el 20 de febrero de 2024.
minidlna
sudo apt show minidlna
Description: lightweight DLNA/UPnP-AV server targeted at embedded systems MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully compliant with DLNA/UPnP-AV clients.
The minidlna daemon serves media files (music, pictures, and video) to clients on your network. Example clients include applications such as totem and xbmc, and devices such as portable media players, smartphones, and televisions.
MiniDLNA is a simple, lightweight alternative to mediatomb, but has fewer features. It does not have a web interface for administration and must be configured by editing a text file.
instalación y configuración de minidlna
sudo apt install minidlna
sudo nano /etc/minidlna.conf
# Specify the user name or uid to run as. user=minidlna # Path to the directory you want scanned for media files. media_dir=A,/media/audio media_dir=V,/media/video # Port number for HTTP traffic. port=9751 # Name that the DLNA server presents to clients. friendly_name=RB3-DLNA # Automatic discovery of new files in the media_dir directory. inotify=yes # List of file names to look for when searching for album art. album_art_names=portada.jpg/contra.jpg # Always set SortCriteria to this value, regardless of the SortCriteria # passed by the client force_sort_criteria=+upnp:class,+upnp:originalTrackNumber
donde la A
de media_dir
vale para restringir el directorio /media/audio para archivos de audio y la V
, en el caso de /media/video, para video.
el usuario minidlna
el usuario minidlna debe tener permiso para acceder a los directorios declarados en media_dir
. en los casos de /media/audio y /media/video, el usuario y el grupo son ernesto:ernesto.
sudo adduser minidlna ernesto
Añadiendo al usuario ‘minidlna’ al grupo ‘ernesto’…
Añadiendo al usuario ‘minidlna’ al grupo ‘ernesto’
Hecho.
minidlna como servicio
sudo systemctl restart minidlna.service
sudo systemctl status minidlna.service
● minidlna.service – LSB: minidlna server
Loaded: loaded (/etc/init.d/minidlna; generated; vendor preset: enabled)
Active: active (running) since Tue 2019-11-19 18:24:15 CET; 8min ago
Docs: man:systemd-sysv-generator(8)
Process: 2293 ExecStop=/etc/init.d/minidlna stop (code=exited, status=0/SUCCESS)
Process: 2303 ExecStart=/etc/init.d/minidlna start (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/minidlna.service
└─2315 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid
nov 19 18:24:15 RB3 systemd[1]: Starting LSB: minidlna server…
nov 19 18:24:15 RB3 systemd[1]: Started LSB: minidlna server.
sudo netstat -tlpn
tcp 0 0 0.0.0.0:9751 0.0.0.0:* LISTEN 2315/minidlnad
donde netstat confirma que minidlna está escuchando en el puerto 9751 como se ha declarado en la configuración:
http://192.168.1.7:9751/
problemario
depuración ó debug
sudo systemctl stop minidlna.service
sudo runuser -u minidlna -- minidlnad -dv
[2024/02/20 15:43:59] upnphttp.c:919: maxdebug: Host: 192.168.1.7:9751
[2024/02/20 15:43:59] upnphttp.c:1263: debug: HTTP RESPONSE: HTTP/1.1 200 OK
la opción -d
habilita el modo de depuración de minidlnad
:
With -d minidlna will run in debug mode (not daemonize).
-v enables verbose output
archivo de registro de errores ó log file
sudo nano /etc/minidlna.conf
# Path to the directory that should hold the log file.
log_dir=/var/log/
tail -f /var/log/minidlna.log
[2019/11/19 18:51:49] scanner.c:758: warn: Error scanning /media/audio [Permiso denegado]
[2019/11/19 18:51:49] scanner.c:758: warn: Error scanning /media/video [Permiso denegado].