Jump to content

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 4
  • Upvote 1
Link to comment
Share on other sites

@zyxmon @TheBB планируется обновление пакета minidlna в репозитории до версии 1.2.0?

1.2.0 - Released 17-May-2017
--------------------------------
- Add libavformat > 57 compatibility.
- Add TiVo Bonjour discovery support using Avahi for Bolt.
- Improve Samsung BD-J5500 support.
- Add quirk to fix video playback on Hyundai TVs.
- Add non-destructive update rescan support.
- Enhance bookmark support to work with Kodi.

Edited by enpa
Link to comment
Share on other sites

  • 4 months later...

Здравствуйте! У меня поднят minidlna сервер на keenetic II. Клиент - телевизор самсунг с встроеным upnp клиентом, подключенный к wi-fi роутеру tp link 841(работает как клиентский мост) имеющему проблему с upnp (на прошивках ddwrt и open wrt напрочь отказывается видеть minidlna кинетика, а на прошивке gargoolya телевизор видит minidlna сервер только после перезагрузки демоне). Помогите пожалуйста написать скрипт чтобы при появлении в сети телевизора с ip x.x.x.x (или определённым mac адресом) на кинетике выполнялась команда /opt/etc/init.d/S90minidlna restart

Link to comment
Share on other sites

  • 3 weeks later...
 

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.

Обновляемся до minidlna - 1.2.1-2. Это стало возможным благодаря @TheBB и обновлению репозиторию Entware-Keenetic & uClibc-ng 1.0.27

Устанавливаем:

~ # opkg install minidlna
Installing minidlna (1.2.1-2) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/minidlna_1.2.1-2_keenle.ipk
Installing libexif (0.6.21-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libexif_0.6.21-1_keenle.ipk
Installing libjpeg (9a-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libjpeg_9a-1_keenle.ipk
Installing libsqlite3 (3210000-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libsqlite3_3210000-1_keenle.ipk
Installing libid3tag (0.15.1b-4) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libid3tag_0.15.1b-4_keenle.ipk
Installing zlib (1.2.11-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/zlib_1.2.11-1_keenle.ipk
Installing libflac (1.3.2-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libflac_1.3.2-1_keenle.ipk
Installing libvorbis (1.3.5-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libvorbis_1.3.5-1_keenle.ipk
Installing libogg (1.3.2-2) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libogg_1.3.2-2_keenle.ipk
Installing libuuid (2.25.2-4b) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libuuid_2.25.2-4b_keenle.ipk
Installing libffmpegthumbnailer (2.2.0-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libffmpegthumbnailer_2.2.0-1_keenle.ipk
Installing libffmpeg-full (3.2.8-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libffmpeg-full_3.2.8-1_keenle.ipk
Installing libbz2 (1.0.6-3) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libbz2_1.0.6-3_keenle.ipk
Installing alsa-lib (1.1.5-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/alsa-lib_1.1.5-1_keenle.ipk
Installing libopus (1.2.1-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libopus_1.2.1-1_keenle.ipk
Installing libpng (1.6.32-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libpng_1.6.32-1_keenle.ipk
Installing libiconv-full (1.11.1-3) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libiconv-full_1.11.1-3_keenle.ipk
Installing libintl-full (0.19.8.1-1) to root...
Downloading http://pkg.entware-keenetic.ru/binaries/keenle/test/uClibc-27/libintl-full_0.19.8.1-1_keenle.ipk
Configuring zlib.
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.

Запускаем:

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

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

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

Редактируем конфиг minidlna.conf под себя:

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

# network interfaces to serve, comma delimited
network_interface=br0

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

# 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,/opt/home/enpa/audio)
#   + "V" for video  (eg. media_dir=V,/opt/home/enpa/video)
#   + "P" for images (eg. media_dir=P,/opt/home/enpa/foto)
#   + "PV" for pictures and video (eg. media_dir=PV,/home/enpa/digital_camera)
media_dir=/opt/media
media_dir=/opt/home/transmission/download

# 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=MYDLNA

# 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

# 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=60

# 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

Запускаем, проверяем:

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

в VLC, Windows:

https://cloud.mail.ru/public/LtsC/rGSxiTigc
https://cloud.mail.ru/public/CCbq/WNrBNS7bt
https://cloud.mail.ru/public/GVme/To1zZrAJh

пример лога /opt/var/minidlna/log:

[2017/11/30 10:15:37] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 10:15:37] minidlna.c:469: warn: Creating new database at /opt/var/minidlna/db/files.db
[2017/11/30 10:15:37] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 10:15:37] playlist.c:135: warn: Parsing playlists...
[2017/11/30 10:15:37] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 10:15:38] minidlna.c:157: warn: received signal 15, good-bye
[2017/11/30 10:15:39] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 10:15:39] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 10:15:39] playlist.c:135: warn: Parsing playlists...
[2017/11/30 10:15:39] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 10:19:07] upnphttp.c:1021: warn: /favicon.ico not found, responding ERROR 404
[2017/11/30 10:24:39] minidlna.c:157: warn: received signal 15, good-bye
[2017/11/30 10:24:56] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 10:24:56] minidlna.c:471: warn: New media_dir detected; rebuilding...
[2017/11/30 10:24:56] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 10:24:58] playlist.c:135: warn: Parsing playlists...
[2017/11/30 10:24:58] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 10:25:38] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!
[2017/11/30 10:25:38] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!
[2017/11/30 10:29:13] minidlna.c:157: warn: received signal 15, good-bye
[2017/11/30 10:29:14] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 10:29:14] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 10:29:14] playlist.c:135: warn: Parsing playlists...
[2017/11/30 10:29:14] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 10:30:39] upnphttp.c:1061: warn: HTTP Connection closed unexpectedly
[2017/11/30 10:30:39] upnphttp.c:1061: warn: HTTP Connection closed unexpectedly
[2017/11/30 10:34:16] minidlna.c:157: warn: received signal 15, good-bye
[2017/11/30 10:34:17] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 10:34:17] minidlna.c:473: warn: Removed media_dir detected; rebuilding...
[2017/11/30 10:34:18] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 10:34:18] scanner.c:731: warn: Scanning /opt/home/transmission/download
[2017/11/30 10:34:24] scanner.c:820: warn: Scanning /opt/home/transmission/download finished (3 files)!
[2017/11/30 10:34:24] playlist.c:135: warn: Parsing playlists...
[2017/11/30 10:34:24] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 10:34:24] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error
SELECT count(*) from OBJECTS where PARENT_ID = '0';
[2017/11/30 10:34:30] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!
[2017/11/30 10:34:30] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!
[2017/11/30 10:55:24] upnphttp.c:1061: warn: HTTP Connection closed unexpectedly
[2017/11/30 10:55:24] upnphttp.c:1061: warn: HTTP Connection closed unexpectedly
[2017/11/30 10:57:45] minidlna.c:1144: error: MiniDLNA is already running. EXITING.
[2017/11/30 10:57:47] minidlna.c:1144: error: MiniDLNA is already running. EXITING.
[2017/11/30 10:57:54] minidlna.c:1144: error: MiniDLNA is already running. EXITING.
[2017/11/30 10:57:55] minidlna.c:1144: error: MiniDLNA is already running. EXITING.
[2017/11/30 10:57:56] minidlna.c:1144: error: MiniDLNA is already running. EXITING.
[2017/11/30 11:01:34] minidlna.c:157: warn: received signal 15, good-bye
[2017/11/30 11:01:39] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2017/11/30 11:01:39] minidlna.c:1272: warn: HTTP listening on port 8200
[2017/11/30 11:01:39] playlist.c:135: warn: Parsing playlists...
[2017/11/30 11:01:39] playlist.c:269: warn: Finished parsing playlists.
[2017/11/30 11:03:44] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!
[2017/11/30 11:03:44] upnphttp.c:1449: warn: Client tried to specify transferMode as Streaming with an image!

 

Edited by enpa
Link to comment
Share on other sites

Не-не-не, то - отдельная репа (uClibc-ng_1.0.2* в "пилотном режиме"). Для основных (Entware-Keenetic/Entware-3x) будет, но чуть позже.

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

Полный рескан всей базы происходит при каждой перезагрузке роутера. Можно ли как-то этого избежать? База не маленькая и времени это занимает прилично. К тому же ничего в базе не меняется, а рескан все равно инициируется. Возможно, это связано с грубым отмонтированием диска при перезагрузке, и база повреждается. Как быть?

Link to comment
Share on other sites

Сначала следует проверить, что рескан не делается если корректно (через /opt/etc/init.d/S.... stop) остановить minidlna и снова запустить.

После этого - 

Проверить, что при выключении роутера, при отмонтировании диска, при перепрошивке происходит вызов

`/opt/etc/init.d/rc.unslung stop`

Если этого прошивка не делает - громко кричать (разработчикам прошивки) плохие слова.

Если это происходит - проверить, что minidlna успевает завершить работу. Если не успевает - проверять в цикле с паузой в одну секунду, что работу демон закончил.

Есть подозрение, что прошивка не всегда вызывает скрипт остановки сервисов Entware. Предлагаю Вам этот момент исследовать. Разработчики Entware тут никак не помогут. С этим к разработчикам прошивки.

PS Для проверок можно использовать вызов echo с записью разных строк в файл на usb носителе.

Link to comment
Share on other sites

Проверка закончилась быстро. Рескан стартует заново даже после

/opt/etc/init.d/S90minidlna stop

/opt/etc/init.d/S90minidlna start

minidlna у меня отсюда http://entware-3x.zyxmon.org/binaries/mipsel/test/minidlna_1.2.1-2_mipsel-3x.ipk т. к. это единственная версия с правильной сортировкой файлов (но кривым генерированием миниатюр, может в этом и дело). Есть какие мысли, что можно сделать?

Link to comment
Share on other sites

Смотрите логи, Может даже запускайте с дебаг логом. Я проблему (по логу) подтвердить не могу. Сканирование одно (добавлено 2 файла), остановка, запуск.... minidlna из репы. миниатюры на вид не кривые.

Можно генерацию миниатюр и отключить.

[2018/01/21 18:16:55] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2018/01/21 18:16:55] minidlna.c:469: warn: Creating new database at /opt/var/minidlna/files.db
[2018/01/21 18:16:55] minidlna.c:1272: warn: HTTP listening on port 8200
[2018/01/21 18:16:55] scanner.c:731: warn: Scanning /opt/Video
[2018/01/21 18:16:57] scanner.c:820: warn: Scanning /opt/Video finished (2 files)!
[2018/01/21 18:16:57] playlist.c:135: warn: Parsing playlists...
[2018/01/21 18:16:57] playlist.c:269: warn: Finished parsing playlists.
[2018/01/21 18:17:17] minidlna.c:157: warn: received signal 15, good-bye
[2018/01/21 18:17:42] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.
[2018/01/21 18:17:42] minidlna.c:1272: warn: HTTP listening on port 8200
[2018/01/21 18:17:43] playlist.c:135: warn: Parsing playlists...
[2018/01/21 18:17:43] playlist.c:269: warn: Finished parsing playlists.
[2018/01/21 18:17:59] minidlna.c:157: warn: received signal 15, good-bye
[2018/01/21 18:19:26] minidlna.c:1231: warn: Starting MiniDLNA version 1.2.1.

 

Link to comment
Share on other sites

Немного погонял. Вижу, что кое что работает не совсем правильно. К сожалению все расширения введены с помощью одного патча. А так можно было бы для тестирования поотключать.

Изначально были патчи - add PNG and custom icon support (этот ничего не сломает), GrSnake's search_limit option patch (исправление для ТВ от LG - отключено по умолчанию или отключаемо), поддержка thumbnail (отключаемо, немного глючит), и fast rescan (вот тут может собака и порылась).

 

Link to comment
Share on other sites

2 hours ago, zyxmon said:

minidlna из репы. миниатюры на вид не кривые.

Имел в виду, что миниатюры создаются только при первичном сканировании библиотеки, что обсуждалось здесь:

Сейчас установил minidlna из репы, запустил сканирование. Вообще не пойму, что происходит. В конфиге enable_thumbnail=no, а миниатюры все равно создаются. Можете проверить этот параметр?

Edited by Sergey Zozulya
Link to comment
Share on other sites

25 минут назад, Sergey Zozulya сказал:

а миниатюры все равно создаются. Можете проверить этот параметр?

Да, не отключаются.

Цитата

 Похоже что превью создаются только однажды, при создании БД.

Не совсем так. Но по inotify не создаются.

Link to comment
Share on other sites

Еще один момент. Миниатюры не создаются, но обложки из медиафайлов (filmstrip, не кадр из видеофайла, а специальная обложка-плакат в виде отдельного файла внутри контейнера), если они есть, все равно вытягиваются и отображаются вместо миниатюр. Несмотря на:

enable_thumbnail_filmstrip=no

albumart.c все равно парсит файл и пытается вытащить filmstrip. Не всегда это ему удается, в логе присутствуют строки (повторяются два раза для каждого файла, у которого есть filmstrip):

[2018/01/22 14:01:47] albumart.c:223: warn: Linking /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/История призрака.mkv.jpg to /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/История призрака.mkv.jpg failed [File exists]
[2018/01/22 14:01:49] albumart.c:223: warn: Linking /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/Левиафан.mkv.jpg to /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/Левиафан.mkv.jpg failed [File exists]
[2018/01/22 14:08:17] albumart.c:223: warn: Linking /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/История призрака.mkv.jpg to /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/История призрака.mkv.jpg failed [File exists]
[2018/01/22 14:08:19] albumart.c:223: warn: Linking /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/Левиафан.mkv.jpg to /opt/var/minidlna/art_cache/tmp/mnt/My Passport/Videos/Movies/Левиафан.mkv.jpg failed [File exists]

Судя по функции check_embedded_art, почему-то парсер думает, что хэш миниатюры совпадает с предыдущим файлом, хотя одинаковых файлов с разным именем у меня нет. Но вопрос даже не в этом, а в том, почему albumart.c вообще лезет в файлы. Возможно, связано с тем, что у меня изменены стандартные размеры миниатюр в настройках:

thumbnail_width=320

но повторюсь, что оба параметра, отвечающие за миниатюры, отключены:

enable_thumbnail=no
enable_thumbnail_filmstrip=no

Если это возможно, пофиксите это тоже. Спасибо.

Link to comment
Share on other sites

Мне кажется Вы не поняли, что означает параметр enable_thumbnail_filmstrip. Обложка, если она находится, назначается автоматически. Это для выдергивания миниатюр нужна настройка, поскольку требует определенные ресурсы CPU!

Link to comment
Share on other sites

Вот оно что, теперь ясно, действительно не понял этот параметр. Правильно тогда понимаю, что отключить показ миниатюр у тех файлов, в которых она встроена в контейнер, нельзя никакими настройками?

Edited by Sergey Zozulya
Link to comment
Share on other sites

7 минут назад, Sergey Zozulya сказал:

Правильно тогда понимаю, что отключить показ миниатюр у тех файлов, в которых она встроена в контейнер, нельзя никакими настройками?

Скорее всего. Не помню, чтобы была такая настройка.

Link to comment
Share on other sites

  • 7 months later...

Добрый день форумчане

Попрошу помочь в настройке minidlna, ни как не могу сообразить как прописать путь ко второму диску.

Есть подготовленный HDD с разбитыми разделами на  3Gb ext4, под Entware, и остаток 450Gb NTFS под медиафайлы, всё работает и отображается

Скрытый текст

001.jpg.b072921ed4e96cdeff5aa87d76564649.jpg

В принципе можно и весь диск форматнуть в ext4 и не заморачиваться с путями, но вот прибило и не пойму КАК прописать путь в "minidlna.conf" чтоб брал файлы , ну например с соседней флешки, вставленной во второй USB.

совсем затупил 😣

Link to comment
Share on other sites

12 минуты назад, Pusan сказал:

спасибо, но для меня пока это дремучий лес.

В этом случае используйте minidlna из прошивки и задавайте вопросы тех.поддержке.

  • Upvote 2
Link to comment
Share on other sites

@Pusan не выходя из ssh, вводим команду, смотрим разделы накопителей:

/ # blkid
/dev/sdb1: LABEL="TTTT" UUID="381A-8130"
/dev/sda4: LABEL="MYEXT" UUID="f945b1d6-3160-4831-a877-9e4d2a0ea95f"
/dev/sda2: LABEL="MYFILES" UUID="01D478064693DF60"

В моем случае подключена флеш-карта и накопитель:

флеш-карата с одним разделом:

/dev/sdb1: LABEL="TTTT" UUID="381A-8130" 

накопитель с двуями разделами:

/dev/sda4: LABEL="MYEXT" UUID="f945b1d6-3160-4831-a877-9e4d2a0ea95f"
/dev/sda2: LABEL="MYFILES" UUID="01D478064693DF60"

Смотрим путь монтирования:

/ # mount | grep sd
/dev/sda2 on /tmp/mnt/01D478064693DF60 type tntfs (rw,nosuid,noexec,noatime,uid=0,gid=1000,umask=02,allow_utime=0020,nls=utf8,min_prealloc_size=64k,max_prealloc_size=124872700,readahead=4M,perm,user_xattr,case_insensitive,fail_safe,hidden=show,dotfile=show,protected_system=ignore,errors=continue,mft_zone_multiplier=1)
/dev/sda4 on /tmp/mnt/f945b1d6-3160-4831-a877-9e4d2a0ea95f type ext4 (rw,relatime,stripe=8191,data=ordered)
/dev/sda4 on /opt type ext4 (rw,relatime,stripe=8191,data=ordered)
/dev/sdb1 on /tmp/mnt/381A-8130 type tfat (rw,nosuid,noexec,noatime,uid=0,gid=1000,umask=0002,allow_utime=0020,codepage=437,utf8,shortname=winnt,min_prealloc_size=64k,max_prealloc_size=15300992,writeback_boundary=4M,readahead=4M,fail_safe,hidden=show,errors=continue,errors=recover)

устанавливаем редактор nano:

/ # opkg install nano

открываем конфиг файл minidlna:

/ # nano /opt/etc/minidlna.conf
 

# 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
 

за место пути по умолчанию media_dir=/opt/media, указываем путь до директорий на Ваших накопителях:

media_dir=/opt/home/
media_dir=/tmp/mnt/TTTT/

получаем:

# 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/home/
media_dir=/tmp/mnt/TTTT/

2018-12-04_18-32.png

далее запуска демон:

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

Проверяем, сформировалась ли у нас база, после запуска демона:

/ # cd /opt/var/minidlna/
/opt/var/minidlna # du -sh *
20.0K   art_cache
76.0K   files.db
4.0K    minidlna.log
4.0K    minidlna.pid

image.png

  • Thanks 2
  • Upvote 1
Link to comment
Share on other sites

@enpa
to enpa, Огромное спасибо!

Я пол ночи просидел изучая "Команда mount в Linux", нашел как определить какие диски у меня стоят, через команду "blkid" и вроде всё сделал правильно но на телек не выходило. Вообщем проблема была в невнимательности, забыл поставить обратный слеш в путь до директорий.

media_dir=/opt/media/
media_dir=/tmp/mnt/Transcend/Video

Вам ОГРОМНОЕ спасибо за развернутый пример, я только начинаю изучать Линекс и для меня это познавательно.

заметил у Вас ошибочку 😉

/ # opkg install nano

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
42 минуты назад, el matador сказал:

Ребят, у меня опять косяки((
Ставлю minidlna и он не стартует вообще никак
/opt/bin/sh: S90minidlna: not found

Что делать? Как быть?

Судя по ошибке тупо нет самого скрипта. Верните его назад или что-то опять с правами...

  • Thanks 1
Link to comment
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...