Jump to content
enpa

minidlna - DLNA-сервер

Recommended Posts

Установка и настройка minidlna 
 

minidlna - DLNA\UPnP-сервер, который поддерживает мультимедийные файлы (музыку, изображения и видео). Данный OPKG-пакет предназначен для тех, у кого наблюдаются проблемы в работе встроенного "прошивочного" minidlna.

Версия из репозитория minidlna 1.2.1:

http://bin.entware.net/mipselsf-k3.4/minidlna_1.2.1-2_mipsel-3.4.ipk

Изменения в minidlna 1.2.1 :


1.2.1 - Released 24-Aug-2017
--------------------------------
- Added Movian client detection and subtitle support.
- Fixed an issue with discovery on non-Linux systems.
- Fixed Bonjour discovery compatibility with TiVo Bolt.
- Fixed NFO file parsing, and added change monitoring support for them.
- Added a workaround for video thumbnails on some Samsung clients.
- Added DoS protection for event subscriptions.
- Fixed content browsing issues with some Samsung TVs.
- Improved non-destructive update scan support.

Подготовка:

1. Создаем раздел EXT4 на жестком диске - Использование файловой системы EXT4 на USB-накопителях.

2. Установка и настройка Entware - в данной теме.

Работоспособность проверена с:

Keenetic Giga KN-1010, прошивка draft 2.12.A.3.0-2 от 06.02.2018, раздел на HDD EXT4.

Обновляемся:

/ # opkg update
Downloading http://bin.entware.net/mipselsf-k3.4/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/keendev

Устанавливаем пакет minidlna - 1.2.1-2:

~ # opkg install http://bin.entware.net/mipselsf-k3.4/minidlna_1.2.1-2_mipsel-3.4.ipk
Downloading http://bin.entware.net/mipselsf-k3.4/minidlna_1.2.1-2_mipsel-3.4.ipk
Installing minidlna (1.2.1-2) to root...
Installing libexif (0.6.21-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libexif_0.6.21-1_mipsel-3.4.ipk
Installing libjpeg (9a-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libjpeg_9a-1_mipsel-3.4.ipk
Installing libsqlite3 (3210000-2) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libsqlite3_3210000-2_mipsel-3.4.ipk
Installing libid3tag (0.15.1b-4) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libid3tag_0.15.1b-4_mipsel-3.4.ipk
Installing libflac (1.3.2-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libflac_1.3.2-1_mipsel-3.4.ipk
Installing libvorbis (1.3.5-2) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libvorbis_1.3.5-2_mipsel-3.4.ipk
Installing libogg (1.3.2-2) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libogg_1.3.2-2_mipsel-3.4.ipk
Installing libuuid (2.30.2-2) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libuuid_2.30.2-2_mipsel-3.4.ipk
Installing libffmpegthumbnailer (2.2.0-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libffmpegthumbnailer_2.2.0-1_mipsel-3.4.ipk
Installing libffmpeg-full (3.2.9-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libffmpeg-full_3.2.9-1_mipsel-3.4.ipk
Installing libbz2 (1.0.6-3) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libbz2_1.0.6-3_mipsel-3.4.ipk
Installing alsa-lib (1.1.5-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/alsa-lib_1.1.5-1_mipsel-3.4.ipk
Installing libopus (1.2.1-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libopus_1.2.1-1_mipsel-3.4.ipk
Installing libpng (1.6.34-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libpng_1.6.34-1_mipsel-3.4.ipk
Installing libiconv-full (1.11.1-3) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libiconv-full_1.11.1-3_mipsel-3.4.ipk
Installing libintl-full (0.19.8.1-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/libintl-full_0.19.8.1-1_mipsel-3.4.ipk
Configuring libbz2.
Configuring alsa-lib.
Configuring libopus.
Configuring libffmpeg-full.
Configuring libpng.
Configuring libjpeg.
Configuring libffmpegthumbnailer.
Configuring libogg.
Configuring libexif.
Configuring libflac.
Configuring libiconv-full.
Configuring libvorbis.
Configuring libuuid.
Configuring libintl-full.
Configuring libsqlite3.
Configuring libid3tag.
Configuring minidlna.

Запускаем из /opkg/etc/init.d/S90minidlna (opkg - у меня так называется раздел):

~ # /opt/etc/init.d/S90minidlna start
 Starting minidlna...              done.

Доступные команды:

~ # /opt/etc/init.d/S90minidlna
 Usage: /opt/etc/init.d/S90minidlna (start|stop|restart|check|kill|reconfigure)

Останавливаем minidlna:

~ # /opt/etc/init.d/S90minidlna stop
 Checking minidlna...              alive.
 Shutting down minidlna...              done.

Редактируем конфиг:

Оригинальный конфиг из minidlna:

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
#network_interface=eth0

# specify the user account name or uid to run as
#user=jmaggard

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
#   can prepend the types, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
#   + "PV" for pictures and video (eg. media_dir=PV,/home/jmaggard/digital_camera)
media_dir=/opt/media

# set this to merge all media_dir base contents into the root container
# note: the default is no
#merge_media_dirs=no

# set this if you want to customize the name that shows up on your clients
#friendly_name=My DLNA Server

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/opt/var/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/opt/var/minidlna

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# 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 (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=900

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# specify the path to the MiniSSDPd socket
#minissdpdsocket=/opt/var/minidlna/minissdpd.sock

# use different container as root of the tree
# possible values:
#   + "." - use standard container (this is the default)
#   + "B" - "Browse Directory"
#   + "M" - "Music"
#   + "V" - "Video"
#   + "P" - "Pictures"
#   + Or, you can specify the ObjectID of your desired root container (eg. 1$F for Music/Playlists)
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.

# always force SortCriteria to this value, regardless of the SortCriteria passed by the client
#force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title

# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while streaming
#max_connections=50

# PNG image to use for an icon, optionally followed by a hex background
# color
#icon=myicon.png,7f7f7f

# Background color (hex rgb triplet) for PNG images converted to jpeg.  Two
# colors indicate that a checkerboard background, in those colors, should
# be used.
#bgcolor=666666,999999

# Suport to Movie Thumbnail generation. To use this option, thumbnail generation must be enable at compile time.
enable_thumbnail=yes

# The width of the thumbnail image. Large images takes more time to generate.  To use this option, thumbnail generation must be enable at compile time.
thumbnail_width=160

# Thumbnail Image quality. To use this option, thumbnail generation must be enable at compile time.
thumbnail_quality=8

# Should the thumbnail have a film strip? To use this option, thumbnail generation must be enable at compile time.
enable_thumbnail_filmstrip=yes

# For owners of LG TVs who suffer from 100% CPU utilization on the server
# If you have a large collection of movies, set this value to define
# how many objects will be sent by the server at once (0-100)
# The downside of using this option is being unable to
# "see" all images and/or pictures at once, the workaround is to use
# the "Browse Folders" mode
# search_limit=0

Конфиг можете отредактировать "под себя".

Все файлы поместил сюда:

media_dir=/opt/media

Там же сделал папки: Music, Video, JPG, Torrents, Other.

Для себя сделал такой конфиг:

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8201

# network interfaces to serve, comma delimited
network_interface=br0

# set this to the directory you want scanned.
media_dir=/opt/media

# set this to merge all media_dir base contents into the root container
# note: the default is no
merge_media_dirs=no

# set this if you want to customize the name that shows up on your clients
friendly_name=EXTRA_DLNA

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/opt/var/minidlna/db

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/opt/var/minidlna/log

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# 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 (at least) Sony DLNA products.
strict_dlna=no

# notify interval in seconds. default is 895 seconds.
notify_interval=60

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while streaming
max_connections=50

# Suport to Movie Thumbnail generation. To use this option, thumbnail generation must be enable at compile time.
enable_thumbnail=yes

# The width of the thumbnail image. Large images takes more time to generate.  To use this option, thumbnail generation must be enable at compile time.
thumbnail_width=160

# Thumbnail Image quality. To use this option, thumbnail generation must be enable at compile time.
thumbnail_quality=8

# Should the thumbnail have a film strip? To use this option, thumbnail generation must be enable at compile time.
enable_thumbnail_filmstrip=yes

Запускаем minidlna:

~ # /opt/etc/init.d/S90minidlna start
 Starting minidlna...              done.

Проверяем работу minidlna.

Дополнительная информация по настройке - тут и тут2.

 

m1.thumb.png.561bf985b34e800c5abd71964db9e3e4.png

m2.thumb.png.7a9f20b7c459077897a2bfc0b8653370.png

m3.thumb.png.7d26d40a98831ff88f3e2ae267ba13d6.png

m4.thumb.png.1b2ed40ac7bff0fdf00c92ae59d43606.png

m5.thumb.png.ec3863b74a2d4f04a2dbfbee462d568d.png

2017-06-21_17-42-47.thumb.png.ea624208b820dba8223f363fd6481add.png

m6.thumb.jpg.e204a1717722431de9eadfc01a4b97db.jpg

m7.thumb.jpg.3c06bc56bbd6eca056e416f575c036a9.jpg

Edited by enpa
TOPIC: change Entware-3x to Entware
  • Thanks 3
  • Upvote 1

Share this post


Link to post
Share on other sites
5 минут назад, enpa сказал:

@el matador что показывает вывод:


opkg files minidlna

?

root@Keenetic_Ultra:~# opkg files minidlna
Package minidlna (1.2.1-4) is installed on root and has the following files:
/opt/bin/minidlna
/opt/etc/minidlna.conf
/opt/etc/init.d/S90minidlna
root@Keenetic_Ultra:~#
 

Share this post


Link to post
Share on other sites

Все пошло! Просто его полным путем нужно было запустить!
Я же запускал из mc.

Спасибо большое!

  • Upvote 1

Share this post


Link to post
Share on other sites
В 21.06.2017 в 17:26, enpa сказал:

minidlna - DLNA\UPnP-сервер, который поддерживает мультимедийные файлы (музыку, изображения и видео). Данный OPKG-пакет предназначен для тех, у кого наблюдаются проблемы в работе встроенного "прошивочного" minidlna.

Добрый день, Enpa, есть ли какая то принципиальная разница этого, с тем, что в прошивке?

Edited by User624

Share this post


Link to post
Share on other sites
29 минут назад, User624 сказал:

есть ли какая то принципиальная разница этого, с тем, что в прошивке?

Есть. Прежде всего генерация thumbnails из видео + исправления работы с некоторыми ТВ от самсунг и lg. Я раньше писал в чем отличия подробно. Поищите.

  • Thanks 1

Share this post


Link to post
Share on other sites

@User624 еще подробно можно узнать у @vst, что портировалось из апстрима:

1.2.1 - Released 24-Aug-2017
--------------------------------
- Added Movian client detection and subtitle support.
- Fixed an issue with discovery on non-Linux systems.
- Fixed Bonjour discovery compatibility with TiVo Bolt.
- Fixed NFO file parsing, and added change monitoring support for them.
- Added a workaround for video thumbnails on some Samsung clients.
- Added DoS protection for event subscriptions.
- Fixed content browsing issues with some Samsung TVs.
- Improved non-destructive update scan support.

  • Thanks 1

Share this post


Link to post
Share on other sites

В Entware  ЕМНИП добавлена поддержка ogg и png (обложки) . Если коротко - в Entware всегда самая свежая версия программы плюс некоторые дополнителmyst возможности, которые автор minidlna решил (пока?) не добавлять.

В прошивке указанная выше версия с исправлениями от разработчиков прошивки.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 11/9/2017 at 8:36 AM, VIKINGENOK said:

/opt/var/minidlna # cat minidlna.log

[2019/04/23 13:06:11] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.

[2019/04/23 13:06:11] minidlna.c:1272: warn: HTTP listening on port 8200

[2019/04/23 13:06:11] minissdp.c:797: error: sendto(udp_shutdown=9): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:797: error: sendto(udp_shutdown=9): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

[2019/04/23 13:06:11] minissdp.c:313: error: sendto(udp_notify=9, 10.1.30.1): Network is unreachable

Подскажите отчего такой лог . Роутер Zyxel Keenetic Extra. Заметил, что не обновилась база после добавления файлов в папку с фильмами поэтому начал смотреть лог. Предустановленный minidlna отключил через мобильное приложение. Или нужно было оставить включенным? Или проблема в другом?

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...