Skip to content

minidlna package

negan07 edited this page Jun 12, 2022 · 55 revisions

opkg update && opkg install minidlna

Dependencies: zlib, libiconv, sqlite3, ancistrus-core

Binaries included: minidlna (embedding static libs: ffmpeg,id3tag,exif,jpeg,ogg,vorbis,flac,opus,opusfile )

Config files: /etc/minidlna.conf (generated at startup)

GUI section: Storage

Tested clients

VLC Player (Android Pie, fireOS), webOS, Tizen, VIDAA, Smarthub

Docs:

MINIDLNA

Archlinux Wiki

Usage:

rc_minidlna < mount remount kmount init reconfig start restart dbregen startforced restartforced umount kumount stop info dbclear dbpurge showlog clearlog > (<debug>)

rc_minidlna mount|remount|kmount|init|reconfigstart|restart|dbregen - Stop, create minidlna config file and start minidlna mediaserver (if DLNA mediaserver is enabled). Used also to regenerate media database & artwork thumbnails.

rc_minidlna startforced|restartforced - Stop and start minidlna anyway without checking media_server_enable nvram setting.

rc_minidlna umount|kumount|stop - Stop media server.

rc_minidlna info - Internal purpose usage only (do nothing).

rc_minidlna dbclear - Clear generated media database & artwork thumbnails.

rc_minidlna dbpurge - Delete all minidlna related database, artwork thumbnails dir & log file.

rc_minidlna showlog - Show media server log events file.

rc_minidlna clearlog - Clear media server log events file.

Note that some recipes are related to rc_usb_service caller script.

rc_usb_service [mount|umount|remount|kmount|kumount|init|reconfig|stop|info] .

Debug

rc_minidlna start debug

Run minidlna in foreground mode showing all pedantic messages on console screen for debug purpose usage. Press Ctrl+C to terminate.

Web GUI Buttons

Click Cancel to discard changes.

Click Show Status to display minidlna's own server status recap webpage (stats, clients connected, open connections).

Click Show Log to show media server log events file (rc minidlna showlog).

Click Delete Log to clear media server log events file (rc minidlna clearlog).

Click Apply/Regen to save settings, apply changes & restart minidlna / regenerate media database & artwork thumbnails. (rc minidlna start)

Nvram variables:

media_server_enable = 0|1 (0)

media_server_name (ReadyDLNA)

media_server_port = <1-65534> (8200)

media_server_notify_int = <10|30|60|120|180|300|600|900|1800|3600> (30)

media_server_max_connections = <10|30|50|128|256|512|1024|2048|4096> (50)

media_server_inotify = 0|1 (1)

media_server_strictdlna = 0|1 (0)

media_server_subtitles = 0|1 (1)

media_server_thumbnails = 0|1 (1)

media_server_only_filenames = 0|1 (0)

media_server_live_browsing = 0|1 (0)

tivo_enable = 0|1 (0)

media_server_loglevel = <off|fatal|error|warn|info|debug> (info)

media_server_paths (/mnt/shares)

MINIDLNA

Minidlna is a DLNA (Digital Living Network Alliance)/UPnP (Universal Plug & Play) server, useful to connect media devices to router hdd storage.

Minidlna

GUI

To enable and run Minidlna mediaserver tick/untick Enable DLNA Media Server then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_enable=1

Then restart daemon typing:

rc minidlna start

To Disable service type:

nvram set media_server_enable=0

rc minidlna stop

Minidlna SETTINGS

Minidlna includes many settings read from /etc/minidlna.conf created at startup. The web GUI includes a selection & simplification of the mandatory & most important ones.

Some of them, achieving better tuning usage, have been added from Patches & Merge Requests taken from the Sourceforge main webpage.

For further readings:

MINIDLNA Patches

MINIDLNA Merge Requests

MINIDLNA's Ubuntu Manpage

Media Server Name

Set this to customize the name that shows up on the DLNA clients.

GUI

Enter the desired DLNA server name on the related Media Server Name box then click: Apply/Regen .

CONSOLE

To setup, for example, OWNDLNASERVERNAME as media server friendly name, type:

nvram set media_server_name=OWNDLNASERVERNAME

Apply modifications, typing:

rc minidlna start

Revert to default typing:

nvram unset media_server_name

Apply modifications, typing:

rc minidlna start

DLNA Server Port

Port used for HTTP (descriptions, SOAP, media transfer) traffic. Note that changing this value from the default one may brings collateral effects on some clients. Generally there's no need to modify the default value.

GUI

Enter the DLNA Server Port then click: Apply/Regen .

CONSOLE

To change the server port type:

nvram set media_server_port=<1-65534>

Apply modifications, typing:

rc minidlna start

Revert to default typing:

nvram unset media_server_port

Apply modifications, typing:

rc minidlna start

Notify Interval

Setup time interval between 2 DLNA notify server announcements on the LAN network. Enlarging this interval may reduce network traffic, but increases clients discovering delay.

GUI

Select the desired Notify Interval then click: Apply/Regen .

CONSOLE

To change the notify interval type:

nvram set media_server_notify_int=<10 - 3600>

Apply modifications, typing:

rc minidlna start

Revert to default typing:

nvram unset media_server_notify_int

Apply modifications, typing:

rc minidlna start

Max Connections Number

Specify maximum number of simultaneous connections. Note that many clients may open several simultaneous connections while streaming.

GUI

Select the desired Max Number of Simultaneous Connections then click: Apply/Regen .

CONSOLE

To change the max connection number type:

nvram set media_server_max_connections=<10 - 4096>

Apply modifications, typing:

rc minidlna start

Revert to default typing:

nvram unset media_server_max_connections

Apply modifications, typing:

rc minidlna start

Automatic Content Scan

Set this to enable/disable inotify monitoring of the files under Media Directories to automatically discover new files.

GUI

To enable/disable Auto Content Scan tick/untick Automatic Content Scan on New Additions then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_inotify=1

To Disable service type:

nvram set media_server_inotify=0

Apply modifications, typing:

rc minidlna start

Strict DLNA Protocol

Set this to strictly adhere to DLNA standards. This will allow server-side downscaling of very large JPEG images, which may hurt JPEG serving performance on some DLNA products. Generally there's no need to activate this.

GUI

To enable/disable Strict DLNA protocol tick/untick Strict DLNA Protocol then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_strictdlna=1

To Disable service type:

nvram set media_server_strictdlna=0

Apply modifications, typing:

rc minidlna start

Subtitles support on unknown clients

Set this to enable/disable subtitle support on unknown or generic clients. In case of troubles with subtitles viewing, disable it.

GUI

To enable/disable subtitle support on unknown clients tick/untick Subtitle Support on Unknown Clients then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_subtitles=1

To Disable service type:

nvram set media_server_subtitles=0

Apply modifications, typing:

rc minidlna start

Artwork metadata thumbnails

Set this to enable/disable sending artwork thumbnails from file's metadata. In case of troubles with metadata thumbnails viewing, disable it.

GUI

To enable/disable metadata thumbnails tick/untick Artwork Metadata Thumbnails then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_thumbnails=1

To Disable service type:

nvram set media_server_thumbnails=0

Apply modifications, typing:

rc minidlna start

Native filenames

Set this to only consider real own filename in place of metadata one when naming it in database. Disable it to use metadata name in place of real one.

GUI

To enable/disable native filenames tick/untick Native Filenames then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_only_filenames=1

To Disable service type:

nvram set media_server_only_filenames=0

Apply modifications, typing:

rc minidlna start

Live browsing files under Media dir

Set this to enable live browsing of the files under current media dir while using a DLNA client. This means that every time a client is listening a dir the database is being updated. Disabling this option, the database will always contain the latest browsed results only.

This option is particularly useful when the client caches all the exchanges (like VLC Player), because the client restart is not needed to start live-browsing again. The expense is a little bit raise of overhead cpu load while browsing media dirs with clients.

GUI

To enable/disable Live Browsing tick/untick Live Browsing Files under Media Dir then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set media_server_live_browsing=1

To Disable service type:

nvram set media_server_live_browsing=0

Apply modifications, typing:

rc minidlna start

TiVo support

Set this to enable/disable support for streaming .jpg and .mp3 files to a TiVo supporting Home Media Option (HMO).

GUI

To enable/disable TiVo tick/untick TiVo support then click Apply/Regen .

CONSOLE

To Enable service type:

nvram set tivo_enable=1

To Disable service type:

nvram set tivo_enable=0

Apply modifications, typing:

rc minidlna start

Log verbosity level

Set this to change the verbosity of the information that is logged: off, fatal, error, warn, info, debug .

Note that debug level results very pedantic and can keep 'always on' the storage devices involved.

GUI

Select the desired Log Verbosity Level then click: Apply/Regen .

CONSOLE

To change the Log Verbosity Level type:

nvram set media_server_loglevel=<off|fatal|error|warn|info|debug>

Apply modifications, typing:

rc minidlna start

Revert to default typing:

nvram unset media_server_loglevel

Apply modifications, typing:

rc minidlna start

Select Media Directories

Path to the directories containing the media files Minidlna should share. Use this option multiple times to share more than one directory. If no directories are selected, all the shared device contents of any category (Audio, Video, Pictures) will be included (/mnt/shares = root shared dir).

GUI

The Media Directiories table includes all the media dirs tree selected with related selected read only media type contents.

Note that each dir's media type contents shared cannot be directly modified from the table: to change media content of a media dir, add the same media dir with new media types then remove the older.

Add Media Dir

Click: Add Media Dir to open a new browser window frameset browsing into the shared device dir folders.

Select the desired one clicking on the related carpet-icon. Move to Parent Directory to return back to the previous tree level (see: Current Folder box content above), click on the top left carpet-icon to return to the root dir level (/mnt/shares/). Only one dir tree can be selected at a time. Note that a dir selection will include all its subsequent tree hierarchy (subdirs).

Once selected the desired media dir tree, select the specific media type content to share (Audio, Video, Pictures). Note that more than one content at a time can be selected. Click: All Media to include all the media type content.

Click: Apply to add the Current Folder dir tree selected returning back to Minidlna main webpage.

Remove Media Dir

Select the media dir to remove from the Media Directories table then click: Remove Media Dir.

Note that no physical files/dirs are being removed from the storage devices using this procedure.

Clear Media List

Click: Clear Media List to remove all singular media dirs tree list reverting to default root dir level sharing condition (/mnt/shares).

Note that no physical files/dirs are being removed from the storage devices using this procedure.

Applying Modifications

Click: Apply/Regen to apply all the above modifications restarting the DLNA server.

CONSOLE

Add Media Dir

To restrict a path to one specific media type (A=Audio, V=Video, P=Pictures), syntax is the following:

anc nvram add A|V|P + , + /mnt/shares/<VOLUME>/<shared_media_dir_absolute_path>

Note that for each media dir path the media types can be combined together (AV, VP, AP, ...)

Repeat the syntax for the other media dirs if needed, then save the settings to nvram partition typing: nvram commit

Restart the DLNA server typing: rc minidlna start .

Examples:

to only add the video files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths V,/mnt/shares/U/multimedia

to only add the music files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths A,/mnt/shares/U/multimedia

to only add the picture files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths P,/mnt/shares/U/multimedia

to only add the audio & video files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths AP,/mnt/shares/U/multimedia

to only add the video & picture files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths VP,/mnt/shares/U/multimedia

to add all the media files included into /mnt/shares/U/multimedia , type:

anc nvram add media_server_paths /mnt/shares/U/multimedia

Save the settings to nvram partition typing: nvram commit .

Then restart DLNA server, typing: rc minidlna start .

Delete Media Dir

Show the previously stored media server paths list typing: anc nvtotxt media_server_paths

Select one of the entire line showed above (related to the media dir to remove) then delete the media dir path typing:

anc nvram delete media_server_paths <MEDIADIRLINE>

Note that no physical files/dirs are being removed from the storage devices using this procedure.

Repeat the syntax for the other media dirs if needed, then save the settings to nvram partition typing: nvram commit .

Then restart DLNA server, typing: rc minidlna start .

Examples:

Show the media dirs list with:

anc nvtotxt media_server_paths

Output as follows:

V,/mnt/shares/U/January

/mnt/shares/U/December

To delete V,/mnt/shares/U/January, type:

anc nvram delete media_server_paths V,/mnt/shares/U/January

To delete /mnt/shares/U/December, type:

anc nvram delete media_server_paths /mnt/shares/U/December

Save the settings to nvram partition typing: nvram commit .

Then restart DLNA server, typing: rc minidlna start .

Clear Media List

Revert to default (all storage devices shared paths: /mnt/shares) typing: nvram unset media_server_paths .

Note that no physical files/dirs are being removed from the storage devices using this procedure.

Restart DLNA server, typing: rc minidlna start .