New minidlna package for unmenu (including Samsung and Sony TV patches)


Recommended Posts

Hi All,

 

Just got a new Samsung 2011 Plasma TV, so wanted to get my unRAID box to act as a DLNA server for it. I'd been using ReadyDLNA on my ReadyNAS, so thought that compiling the open source version (minidlna) would be a good starting point.

 

I noticed that the sourceforge page contained a static binary, so tested this on my 5.0b6a setup, and it worked fine. Sadly, though, this version is missing some very useful patches that have yet to make it into the main build tree.

 

So, I've now built my own binary, which has the following features on top of the standard one:

 

For Samsung TVs:

- Auto chapter creation (creates 5 chapters at even splits in the file). This only works on certain Samsung TVs.

- External .srt subtitle support

- Auto thumbnail creation (shows thumbnail in TV media browser, instead of a stock icon)

- Resume (pressing blue 'D' button on remote resumes file from last played position)

 

For Sony TVs:

Wraps MKV files in pseudo AVI container so that the Sony TV will play them.

 

Samsung subtitle support only applies to files with external .srt files. There is a know problem if you extract srt files from your mkv containers using mkvextract. This can result in the file starting with a 3-byte sequence of "ef bb bf" (acutally an UTF-8 Byte Order Mark aka BOM) and they may also have LF line separators instead of CRLFs. So, please check the srt-file you use.

 

Samsung seems to insist on:

 

1) DOS Line Endings (CRLF == 0d 0a)

2) No non ISO-8859 chars

 

For more information on this, please check randomcore's post here:

http://sourceforge.net/projects/minidlna/forums/forum/879957/topic/3708596/index/page/3

 

UPDATE - 1st June 2012

Following a request in the thread, here is an updated conf file for minidlna v1.0.24

The package file is now shared via DropBox, and will download from within the .conf.

 

Changes to minidlna itself are as follows:

 

1.0.24 - Released 14-Feb-2012

--------------------------------

- Fix playlist browsing with no SortOrder specified.

- Fix inotify detection of caption file removal.

- Handle an empty DeviceID from Zyxel media player SOAP request.

- Fix false positives in playlist caching optimization when we have duplicate file names in different directories.

- Trim the camera model name extracted from EXIF tags.

- Add support for user-configurable log level settings.

- Add DLNA.ORG_FLAGS support.

 

1.0.23 - Released 23-Jan-2012

--------------------------------

- Enable the subtitle menu on some Samsung TV's.

- Add subtitle support for Panasonic TV's.

- Add workarounds for LifeTab tablets' bad behavior.

- Speed up playlist parsing.

- Make metadata-based virtual containers case insensitive.

- Add folder art support (very few clients support this though).

- Improve trimming of quotation marks.

- Fix SRT caption support with the latest Samsung Series D firmware.

- Fix subtitles on LG TV's for items whose titles don't have a dot in them.

- Add support for the av:mediaClass tag, so some Sony devices can filter items by media type.

- Fix inotify detection issues on first-level folders.

- Work around LifeTab's broken DLNA support.

- Add image rotation support during resize. (mostly useful for TiVo)

 

Also fixed is the bug mentioned here http://lime-technology.com/forum/index.php?topic=12435.msg146574#msg146574

Thanks to bjp999 for spotting this.

 

I've also made several changes to the start/stop scripts, and added some diagnostic messages to syslog to make it easier to troubleshoot problems.

 

 

UPDATE - 7th September 2011

Sorry for the lack of updates to this package, but I lost my ability to test stuff with the Samsung TVs.

Back on track now, with a new update that brings v1.0.22 of MiniDLNA to unRAID 5.x (and possibly earlier).

 

Changelog is as follows:

 

1.0.22 - Released 24-Aug-2011

--------------------------------

- Add bookmark support for some Samsung TV's.

- Fix a memory leak when certain model Samsung TV's or Roku devices are on the network.

- Fix detection of Samsung Series D models.

- Add WAV MIME workaround for Marantz Receivers and Roku SoundBridge.

- Fix bitrate displayed on Microsoft PFS devices.

- Fix a scanner crash when trying to scan image files with no read access.

 

1.0.21 - Released 18-July-2011

--------------------------------

- Fix a few issues with new libav/ffmpeg versions.

- Fix FF/REW of AVI files on Samsung Series B TV's.

- Fix a crash bug when playing music on TiVo.

- Add the ability to change the root media container.

- Add WAV/RIFF INFO tag parsing support for the most common tags.

- Fix a crash bug with clients that request a large number of results.

 

1.0.20 - Released 09-June-2011

--------------------------------

- Fix a crash bug when scanning MPEG-TS files with odd packet sizes.

- Fix AVI file streaming on Samsung A-Series TV's.

- Improve support for the NETGEAR Digital Entertainer Live (EVA2000).

- Add support for multiple network interfaces.

- Add subtitle support for LG TV's and Blu-Ray players.

- Fix some minor coding issues found by cppcheck.

- Add client adaptation support for Toshiba Regza TV's.

- Send known audio-only devices straight to the Music section on root requests.

- Add client adaptation support for Roku SoundBridge audio clients.

- Improve Sony client adaptation to allow support for more file types.

- Add support for reading tags from MP4 video files with recent lavf versions.

- Add support for Samsung's GetFeatureList method.

 

This release should now fix all of the problems with non-Samsung clients, and with older Samsung clients not seeing the server content correctly.

It also brings full language selection support for MKVs with multiple soundtracks (only on Samsung clients).

 

UPDATE - 28th April 2011

There is a new version of minidlna available, with many useful improvements.

 

They are:

 

- unMenu based configuration interface for minidlna configuration file. No need to hand edit the file any more.

- unMenu start/stop/rescan buttons under user-scripts menu item.

- Auto starting of minidlna. If array is offline, then package is auto-installed, but needs to started via unMenu start button after the array is online.

- Preserves media database across reboots if you specify either cache or data drives for installation.

- Automatic media database rebuild on configuration changes.

- Can do initial installation regardless of whether the array is online or not. You can even specify install directories on the array whilst it is offline.

  The next time you start the array, simply click on 'Start minidlna' on the user scripts page, and the installation will be completed.

 

This new package is based extensively on the transmission package from BubbaQ, without which this would have been much more difficult.

I've done some pretty extensive testing on this, but only on unRAID v5.0beta6a. YMMV on earlier versions.

 

Thanks to Joe L., we can now auto start 5.0beta arrays as well. Please see a few posts further on in this thread for information on how to do it.

 

I don't have anywhere to host the package, so I'm providing a link to both the pkg and the conf file. To install, you need to copy both files into the /boot/packages directory on your memory stick, and then start unmenu. You should then see the minidlna package.

 

Any feedback, comments, bugs to me please.

 

Andy.

minidlna-unmenu-package.conf

Link to comment
  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Just installed on my Atom powered 4.7 Pro machine. Had a warning about different versions (Installed, but version is different.

Current version='directory' expected '1.0.19') but seems to be running fine. Currently scanning my music folders and saving DB to flash drive.

 

Tested working with WMP11 over LAN connection and Skifta on Android over Wifi

 

Nice addition to the unRAID community  8)

 

Link to comment

Had a quick look through this and it looks fairly simple.

 

I don't have much free time right now, but there are some extra things that can be implemented to make the package better.

 

The PACKAGE_VERSION_TEST line probably needs to be:

PACKAGE_VERSION_TEST /usr/sbin/minidlna -V 2>&1 | awk '{print $2}'

 

Look through some of the other packages available and see what is in them.  If there is anything you have questions about feel free to ask.

Link to comment

Just installed on my Atom powered 4.7 Pro machine. Had a warning about different versions (Installed, but version is different.

Current version='directory' expected '1.0.19') but seems to be running fine. Currently scanning my music folders and saving DB to flash drive.

 

Tested working with WMP11 over LAN connection and Skifta on Android over Wifi

 

Nice addition to the unRAID community  8)

 

 

I've seen the version message on my system. It occurs when you run minidlna and one of the media directories in the conf file doesn't exist. In my case, I hadn't started the array when I tried to run the executable. When this happens, minidlna outputs an error message about the missing directory, before it outputs the version string. It's this which then gets picked up by awk, and not the version number.

 

It's a harmless error, and goes away once you've got your conf file configured correctly, or started your array before running minidlna.

 

 

Link to comment

Had a quick look through this and it looks fairly simple.

 

I don't have much free time right now, but there are some extra things that can be implemented to make the package better.

 

The PACKAGE_VERSION_TEST line probably needs to be:

PACKAGE_VERSION_TEST /usr/sbin/minidlna -V 2>&1 | awk '{print $2}'

 

Look through some of the other packages available and see what is in them.  If there is anything you have questions about feel free to ask.

 

Good point. I reckon I should probably change that. Although the other packages I used as a template (proftpd) didn't include the full path, and they worked just fine.

 

Link to comment

With regards to the package itself, then I'm working on some extra stuff right now.

 

What I'd like to do is the following:

 

- Enable auto starting of minidlna. Startup script would parse conf file, and ensure that media directories are accessible before attempting to launch the binary.

- Preserve media database across reboots. This would be useful, as this database includes the 'last played position' information.

- Allow for adding media directories to conf file via web interface (a bit like p910nd does).

 

This was my first attempt at creating packages for unRAID, as I've only had the setup for a couple of weeks, so please feel free to provide any other suggestions or comments.

 

Andy.

 

Link to comment

All of what you want to do should be able to be done.

 

Your greatest asset in this instance is going to be the other packages out there.  Look into the Transmission and Airvideo packages to get an idea of some complex packages.

 

Also, look into creating "User script" buttons to start and stop minidlna.  Look into creating an rc.unRAID script also.  The above mentioned packages so all of what I just said.

 

with 5.0b6 no auto starting the array it is a darn site near impossible to get services that require a disk to be online to start and work properly.

 

I am looking into that now, though it will be a good week+ before I can really look at it.

Link to comment

with 5.0b6 no auto starting the array it is a darn site near impossible to get services that require a disk to be online to start and work properly.

 

If your disks are all recognized, you can add a few lines to your "go" script to get it to start itself before then starting your add-ons.

 

I have these in my 5.0beta6a config/go script:

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

 

sleep 30

/usr/bin/wget -q -O - localhost/update.htm >/dev/null

/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm

sleep 120

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

The last line is the one added by unMENU to install packages, etc.  The first few lines start the web-management interface. 

The lines in [glow=blue,2,300]BLUE [/glow]will start the array.  Make sure you add the "sleep" delays as you want to make sure the array is started before continuing on with your own install scripts.

 

Joe L.

Link to comment

with 5.0b6 no auto starting the array it is a darn site near impossible to get services that require a disk to be online to start and work properly.

 

If your disks are all recognized, you can add a few lines to your "go" script to get it to start itself before then starting your add-ons.

 

I have these in my 5.0beta6a config/go script:

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

 

sleep 30

/usr/bin/wget -q -O - localhost/update.htm >/dev/null

/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm

sleep 120

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

The last line is the one added by unMENU to install packages, etc.   The first few lines start the web-management interface.  

The lines in [glow=blue,2,300]BLUE [/glow]will start the array.  Make sure you add the "sleep" delays as you want to make sure the array is started before continuing on with your own install scripts.

 

Joe L.

 

You, my friend, are a gentleman and a scholar.  I like 5.0b6a so far, but it was playing havoc with some of my autoinstall stuff.

Link to comment

Managed to get the package to reinstall on reboot by opening the .tzx, modifying the .conf to give a valid media path then recompressed. Inserted the revised version test code and changed the MD5 in minidlna-unmenu-package.conf. Copied over to /boot/packages and rebooted server. minidlna is reinstalled on reboot. Added the code below to GO script in /boot/config to run at boot

#mindlna
cd /usr/sbin
nohup ./minidlna -f /boot/packages/minidlna.conf -d &

 

The only issue I have now is on restart minidlna declares....

 

[2011/04/21 03:11:32] minidlna.c:870: warn: Database version mismatch; need to recreate...

 

....and starts to rebuild it. Is there any way to get it to save and rescan on reboot?

 

Link to comment

with 5.0b6 no auto starting the array it is a darn site near impossible to get services that require a disk to be online to start and work properly.

 

If your disks are all recognized, you can add a few lines to your "go" script to get it to start itself before then starting your add-ons.

 

I have these in my 5.0beta6a config/go script:

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

 

sleep 30

/usr/bin/wget -q -O - localhost/update.htm >/dev/null

/usr/bin/wget -O - --post-data 'startState=STOPPED&cmdStart=Start' localhost/update.htm

sleep 120

 

cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c

 

The last line is the one added by unMENU to install packages, etc.   The first few lines start the web-management interface.   

The lines in [glow=blue,2,300]BLUE [/glow]will start the array.  Make sure you add the "sleep" delays as you want to make sure the array is started before continuing on with your own install scripts.

 

Joe L.

 

Just wanted to make one last comment that the above worked beautifully on my 5.0b6a box.  The array came online "by itself" and I then watched the syslog and saw all my unMenu packages get installed.

Link to comment

There is a new version of minidlna available, with many useful improvements.

 

They are:

 

- unMenu based configuration interface for minidlna configuration file. No need to hand edit the file any more.

- unMenu start/stop/rescan buttons under user-scripts menu item.

- Auto starting of minidlna. If array is offline, then package is auto-installed, but needs to started via unMenu start button after the array is online.

- Preserves media database across reboots if you specify either cache or data drives for installation.

- Automatic media database rebuild on configuration changes.

- Can do initial installation regardless of whether the array is online or not. You can even specify install directories on the array whilst it is offline.

 The next time you start the array, simply click on 'Start minidlna' on the user scripts page, and the installation will be completed.

 

This new package is based extensively on the transmission package from BubbaQ, without which this would have been much more difficult.

I've done some pretty extensive testing on this, but only on unRAID v5.0beta6a. YMMV on earlier versions.

Any feedback, comments, bugs to me please.

 

As I still don't have a permanent repository for the package, you can download it from here:

http://www.megaupload.com/?d=Q9B01NDN

The conf file is attached to this post.

 

Happy DLNA serving........

minidlna-unmenu-package.conf

Link to comment

There is a new version of minidlna available, with many useful improvements.

 

They are:

 

- unMenu based configuration interface for minidlna configuration file. No need to hand edit the file any more.

- unMenu start/stop/rescan buttons under user-scripts menu item.

- Auto starting of minidlna. If array is offline, then package is auto-installed, but needs to started via unMenu start button after the array is online.

- Preserves media database across reboots if you specify either cache or data drives for installation.

- Automatic media database rebuild on configuration changes.

- Can do initial installation regardless of whether the array is online or not. You can even specify install directories on the array whilst it is offline.

 The next time you start the array, simply click on 'Start minidlna' on the user scripts page, and the installation will be completed.

 

This new package is based extensively on the transmission package from BubbaQ, without which this would have been much more difficult.

I've done some pretty extensive testing on this, but only on unRAID v5.0beta6a. YMMV on earlier versions.

Any feedback, comments, bugs to me please.

 

As I still don't have a permanent repository for the package, you can download it from here:

http://www.megaupload.com/?d=Q9B01NDN

The conf file is attached to this post.

 

Happy DLNA serving........

 

I'm not near my server at the moment but when I get a chance I will try to take a look at this. I am glad the Transmission package came in handy as a base to start from.  I can not explain how much time it took me to go through and set up all those variables for the .conf file (and I still had a typo in there).

 

If I find anything looking through the package I will post them when I get a chance.

Link to comment

There is a new version of minidlna available, with many useful improvements.

 

They are:

 

- unMenu based configuration interface for minidlna configuration file. No need to hand edit the file any more.

- unMenu start/stop/rescan buttons under user-scripts menu item.

- Auto starting of minidlna. If array is offline, then package is auto-installed, but needs to started via unMenu start button after the array is online.

- Preserves media database across reboots if you specify either cache or data drives for installation.

- Automatic media database rebuild on configuration changes.

- Can do initial installation regardless of whether the array is online or not. You can even specify install directories on the array whilst it is offline.

 The next time you start the array, simply click on 'Start minidlna' on the user scripts page, and the installation will be completed.

 

This new package is based extensively on the transmission package from BubbaQ, without which this would have been much more difficult.

I've done some pretty extensive testing on this, but only on unRAID v5.0beta6a. YMMV on earlier versions.

Any feedback, comments, bugs to me please.

 

As I still don't have a permanent repository for the package, you can download it from here:

http://www.megaupload.com/?d=Q9B01NDN

The conf file is attached to this post.

 

Happy DLNA serving........

 

Can't seem to get this installed, any idea?

dlna.jpg.09ef18fbd5935685b7cb7a333b8a38b0.jpg

Link to comment

how do I install it from the conf file?

 

Download the minidlna package from the megaupload url he/she gave in his post.  Place it in the packages folder along with the .conf file.  Proceed to install the package as normal.

 

If you look at the url of the package in the screen shot you gave it shows some fake url, that is because he has to compile it himself/herself.

Link to comment

My unRAID server probably wouldn't do well to transcode videos--being single core and all.

 

Saying that the Sony TVs can play MKVs via a pseudo AVI container--does that mean the Samsungs are unable to play MKV containers?

 

minidlna doesn't do transcoding of any kind. It relies on the client device understanding the format that's being streamed. I've streamed 1080p MKVs with minidlna on processors as slow as 300MHz (embedded SPARC in a ReadyNAS Duo), and it works just fine.

 

The Sony patch is to workaround the fact that no Sony TVs understand the mkv container. They do understand the video contained within, so we simply fool them into playing it by making the file look like an AVI instead.

 

All recent Samsung TVs fully support playing MKV files (plus most other formats). It's one of the main reasons I chose the TV over alternatives from Sony, Panasonic, LG etc.

 

 

Link to comment

how do I install it from the conf file?

 

Download the minidlna package from the megaupload url he/she gave in his post.  Place it in the packages folder along with the .conf file.  Proceed to install the package as normal.

 

If you look at the url of the package in the screen shot you gave it shows some fake url, that is because he has to compile it himself/herself.

 

Definitely himself  :D

 

If anyone would like to host the main package file, then that would be great. I've usually got a place to host things like this, but my buddy is currently upgrading his entire ESX Server farm, and my host has dropped off the grid for a bit.

 

Andy.

 

Link to comment
  • 2 weeks later...

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.   Restore formatting

  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.