UPnP / DLNA plug-in

Which UPnP media server?


  • Total voters
    44
Status
Not open for further replies.

cubix

Moderator
Joined
May 30, 2011
Messages
81
minidlna it is then!

Looks like transcoding doesn't work out of the box, but there is a post about that - someone got it working.
Support for mkv but not mt2s - sorry ps3 fans.
Automatic/periodic database rebuilds which is cool - something fuppes didn't do without cron.
and album art!
 

Couch Potato

Dabbler
Joined
Jun 22, 2011
Messages
15
+1 for minidlna...

I've been using it for a while on my ReadyNAS 1100 (mainly mp3's and mkv's) - works happliy with my Xtreamers, WDHDTV, and Sony Blu-ray player, and has a very light touch on the server!

Andy B.
 

jjstecchino

Contributor
Joined
May 29, 2011
Messages
136
I have been using mediatomb for a while with freenas 8.xx and it works flawlessly.
It is very easy to install, uses sqlite as a db and most importantly can be configured to stream directly to xbox, ps3 and samsung tv with a dlna client. I have not be able to configure any other dlna server to work with samsung tvs other than media tomb. My mediatomb is configured to store it's db on one of my volumes so I am not limited by cf space.
In order to install media tomb you need a 2 gb cf image that is now standard. Previously you had to compile your own freeness for a 2 gb cf (standard was 1 gb). The only thing I don't like is media tomb configuration web page. It is functional but ugly. I wish if mt makes into a package, the web page to be restyled to look like freenas
 
G

gcooper

Guest
@cubix: if you have details for enabling certain features with minidlna that aren't too hard, I can implement them (potentially with little effort..). I would rather improve community support NAS solutions than other non-NAS solutions.
 
G

gcooper

Guest
The first two patches seem reasonable at first glance, but the third patch is more extensive. I'll see how extensive it is (my refurbed Samsung is currently down for the count :(..)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I'll bite, where are the configuration files for minildna? I can see it's installed and is running but I cannot locate those pesky config files (minildna.conf), or whatever it is called here.
 
G

gcooper

Guest
All ports configuration files end up in /usr/local/etc by design, so the config file should be at /usr/local/etc/minidlna.conf (it was with my installed port.. I'm redoing a build to verify that everything's there and provide CLI hooks for configuring things).
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Thanks. I tried a search for the file but not sure why it wasn't located, but it was right were you said it would be.
So long as I can build then I'm willing to test.
 

Ken8521

Cadet
Joined
Aug 2, 2011
Messages
3
Anyone know of a walkthrough on installing mediatomb on 8.01-rc2? I prefer mediatomb (used it and really like it on Linux servers).. but I'm not finding any info at all on installing on 8, but found a few instructions on .7

When I try running the command pkg_add -v -r mediatomb -- I get a lot of scrolling, and a lot of errors..

http://pastebin.com/YtnuUtTi (most of that looks like there is a problem w/ the package to me...)

Thanks
 
G

gcooper

Guest
Anyone know of a walkthrough on installing mediatomb on 8.01-rc2? I prefer mediatomb (used it and really like it on Linux servers).. but I'm not finding any info at all on installing on 8, but found a few instructions on .7

When I try running the command pkg_add -v -r mediatomb -- I get a lot of scrolling, and a lot of errors..

http://pastebin.com/YtnuUtTi (most of that looks like there is a problem w/ the package to me...)

Mediatomb and serviio weren't picked due to the number of additional dependencies that it required (Mediatomb requires MySQL and more X11 related dependencies, and serviio requires java, which pulls in X11 -- both cases will increase the overall running image more than 25MB uncompressed -- and in some cases up to 100MB+). I'm sorry that it's not the flavor of uPNP that you like, but minidlna supports a good chunk of devices (and is used in ReadyNAS so the odds that it will work on NAS devices in the future is greater than some of the other options IMHO), so that's why I enabled it.

If you wish to use mediatomb in the future, then you'll be able to do that via the 3rd party plugins as an additional option.

This forum post shouldn't be used for debugging alternate uPNP installs -- please only note whether or not you run into issues with minidlna support or if your uPNP software supports more devices than minidlna currently supports.
 

Ken8521

Cadet
Joined
Aug 2, 2011
Messages
3
Mediatomb and serviio weren't picked due to the number of additional dependencies that it required (Mediatomb requires MySQL and more X11 related dependencies, and serviio requires java, which pulls in X11 -- both cases will increase the overall running image more than 25MB uncompressed -- and in some cases up to 100MB+). I'm sorry that it's not the flavor of uPNP that you like, but minidlna supports a good chunk of devices (and is used in ReadyNAS so the odds that it will work on NAS devices in the future is greater than some of the other options IMHO), so that's why I enabled it.

If you wish to use mediatomb in the future, then you'll be able to do that via the 3rd party plugins as an additional option.

This forum post shouldn't be used for debugging alternate uPNP installs -- please only note whether or not you run into issues with minidlna support or if your uPNP software supports more devices than minidlna currently supports.

Well, excuse me... someone linked me to this thread to get help.

Guess I'll look elsewhere.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
@gcooper: Here is the patch for transcoding in mindlna: http://sourceforge.net/tracker/index.php?func=detail&aid=3193201&group_id=243163&atid=1121518

I'll install minidlna from ports and have a play around, see what breaks.

Had any luck with minidlna? I'm giving it a shot in a few minutes but yesterday when I tried it, after I rebooted the configuration file had reverted back to the original copy. I'm hoping this time it works but before I reboot I will see if it at least streams a video or some music. If you got it to work, a little how-to gulde would be well appreciated. If I get this working reliably, I'll write one if someone else hasn't yet.

-Mark
 
G

gcooper

Guest
Had any luck with minidlna? I'm giving it a shot in a few minutes but yesterday when I tried it, after I rebooted the configuration file had reverted back to the original copy. I'm hoping this time it works but before I reboot I will see if it at least streams a video or some music. If you got it to work, a little how-to gulde would be well appreciated. If I get this working reliably, I'll write one if someone else hasn't yet.

See: http://forums.freenas.org/showthrea...s-nightlies-post-09-25-2011&p=10830#post10830 . If the settings don't stick, please let me know..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Nope, it doesn't stick. I'll post my results in the other thread. Thanks.

I've updated your thread with the fix which works with build 8104.
 

jjstecchino

Contributor
Joined
May 29, 2011
Messages
136
I gave minidlna a try and compiled freenas 8127 with multimedia support. Minidlna works well and I was able to serve movies to windows media player, unfortunately it does not work with a Samsung TV. Samsung TVs require some custom headers and remapping of MKV files to MPEG. This is easily done in mediatomb config file but, and this may be my bad, I have not found a way to accomplish the same on minidlna.
Minidlna external libraries requirement seem to me similar to mediatomb at this point. Compile time is significantly longer for freenas with multimedia support as compared to just adding mediatomb as a port to the nanobsd compile process. I usually add it to nanobsd/freenas-common. Mediatomb also can use sqlite and use of mysql is not mandatory. Overall I feel mediatomb is more versatile than minidlna.

If anybody is interested on how to install mediatomb here is how I do it:

There are two ways:
a) compile into freenas
b) Add mediatomb package after compilation

To add mediatomb at compile time just add the port net/mediatomb to the port list in nanobsd/freenas-common and then compile as usual.

To add as a package on a freenas running system:
- login as root
- make the fs writable: mount -wu /
- add mediatomb: pkg_add -r mediatomb
- rehash

At this point mediatomb is installed regardless if you compiled or installed the package

- run mediatomb once: mediatomb then exit: ctrl C
mediatomb should have created a directory .mediatomb into /root. This directory contains a generic config.xml
Here is my config xml as an example. It supports playing mkv on samsung tv
Code:
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
  <server>
    <ui enabled="yes" show-tooltips="yes">
      <accounts enabled="no" session-timeout="30">
        <account user="mediatomb" password="mediatomb"/>
      </accounts>
    </ui>
    <name>MediaServer</name>
    <udn>uuid:9cd3f494-6951-400c-a2b9-182dd4b369a5</udn>
    <!-- *************************************************************
           This is important! 
 
           <home> is the location of mediatomb sqlite database.
           Since freenas filesystem will be read only, make sure you store the db in
           one of your hard drives! 
           *************************************************************
     -->
    <home>/mnt/physical hard drive/mediatomb</home>
 
    <webroot>/usr/local/share/mediatomb/web</webroot>
    <storage>
      <sqlite3 enabled="yes">
        <database-file>mediatomb.db</database-file>
      </sqlite3>
      <mysql enabled="no">
        <host>localhost</host>
        <username>mediatomb</username>
        <database>mediatomb</database>
      </mysql>
    </storage>
    <protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
    <!--
       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
    -->
    <!-- *************************************************************
                     This enables support for Samsung TV
           *************************************************************
        -->
    <custom-http-headers>
      <add header="transferMode.dlna.org: Streaming"/>
      <add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000"/>
    </custom-http-headers>
    <!-- Uncomment the line below if you have a Telegent TG100 -->
    <!--
       <upnp-string-limit>101</upnp-string-limit>
    -->
    <extended-runtime-options>
      <ffmpegthumbnailer enabled="yes">
        <thumbnail-size>128</thumbnail-size>
        <seek-percentage>5</seek-percentage>
        <filmstrip-overlay>yes</filmstrip-overlay>
        <workaround-bugs>no</workaround-bugs>
        <image-quality>8</image-quality>
      </ffmpegthumbnailer>
      <mark-played-items enabled="no" suppress-cds-updates="yes">
        <string mode="prepend">*</string>
        <mark>
          <content>video</content>
        </mark>
      </mark-played-items>
    </extended-runtime-options>
  </server>
  <import hidden-files="no">
    <scripting script-charset="UTF-8">
      <common-script>/usr/local/share/mediatomb/js/common.js</common-script>
      <playlist-script>/usr/local/share/mediatomb/js/playlists.js</playlist-script>
      <virtual-layout type="builtin">
        <import-script>/usr/local/share/mediatomb/js/import.js</import-script>
      </virtual-layout>
    </scripting>
    <mappings>
      <extension-mimetype ignore-unknown="no">
        <map from="mp3" to="audio/mpeg"/>
        <map from="ogx" to="application/ogg"/>
        <map from="ogv" to="video/ogg"/>
        <map from="oga" to="audio/ogg"/>
        <map from="ogg" to="audio/ogg"/>
        <map from="ogm" to="video/ogg"/>
        <map from="asf" to="video/x-ms-asf"/>
        <map from="asx" to="video/x-ms-asf"/>
        <map from="wma" to="audio/x-ms-wma"/>
        <map from="wax" to="audio/x-ms-wax"/>
        <map from="wmv" to="video/x-ms-wmv"/>
        <map from="wvx" to="video/x-ms-wvx"/>
        <map from="wm" to="video/x-ms-wm"/>
        <map from="wmx" to="video/x-ms-wmx"/>
        <map from="m3u" to="audio/x-mpegurl"/>
        <map from="pls" to="audio/x-scpls"/>
        <map from="flv" to="video/x-flv"/>
        <!-- map mkv to mpeg to support samsung tv -->
        <map from="mkv" to="video/mpeg"/>
        <map from="mka" to="audio/x-matroska"/>
        <!-- Uncomment the line below for PS3 divx support -->
        <!-- <map from="avi" to="video/divx"/> -->
        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <!-- <map from="avi" to="video/avi"/> -->
      </extension-mimetype>
      <mimetype-upnpclass>
        <map from="audio/*" to="object.item.audioItem.musicTrack"/>
        <map from="video/*" to="object.item.videoItem"/>
        <map from="image/*" to="object.item.imageItem"/>
      </mimetype-upnpclass>
      <mimetype-contenttype>
        <treat mimetype="audio/mpeg" as="mp3"/>
        <treat mimetype="application/ogg" as="ogg"/>
        <treat mimetype="audio/x-flac" as="flac"/>
        <treat mimetype="image/jpeg" as="jpg"/>
        <treat mimetype="audio/x-mpegurl" as="playlist"/>
        <treat mimetype="audio/x-scpls" as="playlist"/>
        <treat mimetype="audio/x-wav" as="pcm"/>
        <treat mimetype="audio/L16" as="pcm"/>
        <treat mimetype="video/x-msvideo" as="avi"/>
        <treat mimetype="video/mp4" as="mp4"/>
        <treat mimetype="audio/mp4" as="mp4"/>
        <treat mimetype="application/x-iso9660" as="dvd"/>
        <treat mimetype="application/x-iso9660-image" as="dvd"/>
      </mimetype-contenttype>
    </mappings>
    <online-content>
      <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
        <favorites user="mediatomb"/>
        <standardfeed feed="most_viewed" time-range="today"/>
        <playlists user="mediatomb"/>
        <uploads user="mediatomb"/>
        <standardfeed feed="recently_featured" time-range="today"/>
      </YouTube>
    </online-content>
  </import>
  <transcoding enabled="no">
    <mimetype-profile-mappings>
      <transcode mimetype="video/x-flv" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="vlcmpeg"/>
      <transcode mimetype="application/ogg" using="oggflac2raw"/>
      <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
    </mimetype-profile-mappings>
    <profiles>
      <profile name="oggflac2raw" enabled="no" type="external">
        <mimetype>audio/L16</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="vlcmpeg" enabled="no" type="external">
        <mimetype>video/mpeg</mimetype>
        <accept-url>yes</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>yes</accept-ogg-theora>
        <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
        <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
      </profile>
    </profiles>
  </transcoding>
</config>


Please note you have to change the <home> directory to an existing directory of one of your physical hard drives since freenas filesystem will be read only.

At this point launch mediatomb. If everything is ok with the config, it will create an empty database at the new location you specified and also give you the address of the configuration web page.

open a browser to that address and add the media you want to be served.

Now test the server from your clients: TV, XBOX Playstation etc.

If everything ok exit from mediatomb and relounch with mediatomb -d to run as a demon.

At this point mediatomb will need to be restarted manually after each boot.
to automatically launch at boot I have not got to it yet but I guess you will need to create a mediatomb user, place the config.xml in the user home directory and add mediatomb to rc.d
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Thanks for the information. I have tried the pkg_add flavor and I can make it work, somewhat. I am having problems adding video files and it adds three copies at any given time. Pictures seem to add fine except for the 3X factor. From the default config.xml I only changed the directory for the home directory as indicated. I wish I could get the darn thing to work properly for me. I'll work on the autostart but I believe MediaTomb will have to be installed during the build. I'll need to figure out the dependencies as well to add.

-Joe
 

jjstecchino

Contributor
Joined
May 29, 2011
Messages
136
Thanks for the information. I have tried the pkg_add flavor and I can make it work, somewhat. I am having problems adding video files and it adds three copies at any given time. Pictures seem to add fine except for the 3X factor. From the default config.xml I only changed the directory for the home directory as indicated. I wish I could get the darn thing to work properly for me. I'll work on the autostart but I believe MediaTomb will have to be installed during the build. I'll need to figure out the dependencies as well to add.

-Joe

Hi Joe, I never had the problem of having 3 copies of the movie in the database. My files are organized as:
movies/movie title/movietitle.mkv
and are picked up just fine by mediatomb.

If you want to do your own compile just add
add_port net/mediatomb to nanobsd/freenas-common and it will solve all the dependencies for you.
By default it will use sqlite. The movie thumbnailer works when I install mediatomb as a package but doesnt when I compile with freenas. There must be a switch to compile thumbnailer support
 
G

gcooper

Guest
Hi Joe, I never had the problem of having 3 copies of the movie in the database. My files are organized as:
movies/movie title/movietitle.mkv
and are picked up just fine by mediatomb.

If you want to do your own compile just add
add_port net/mediatomb to nanobsd/freenas-common and it will solve all the dependencies for you.
By default it will use sqlite. The movie thumbnailer works when I install mediatomb as a package but doesnt when I compile with freenas. There must be a switch to compile thumbnailer support

Until you need to compile things a second time because it will try to install the package and its dependencies (some of which you didn't specify above)... the default options plus our defined options pull in a handful of packages not included in freenas-common (the following just lists the immediate dependencies):

Code:
$ make -C /usr/ports/net/mediatomb/ run-depends-list showconfig
/usr/ports/audio/id3lib
/usr/ports/audio/taglib
/usr/ports/databases/sqlite3
/usr/ports/graphics/libexif
/usr/ports/multimedia/ffmpeg
/usr/ports/multimedia/ffmpegthumbnailer
/usr/ports/textproc/expat2
===> The following configuration options are available for mediatomb-0.12.1_5:
     SQLITE3=on "sqlite3 support"
     MYSQL=off "MySQL support"
     JS=off "JavaScript (SpiderMonkey) support"
     LIBEXIF=on "libexif support"
     TAGLIB=on "taglib support"
     FFMPEG=on "ffmpeg metadata extraction support"
     FFMPEGTHUMBNAILER=on "ffmpeg thumbnailer support"
     EXTERNAL_TRANSCODING=on "external transcoding support"
     CURL=off "curl support"
     ID3LIB=on "id3lib support"
     LIBEXTRACTOR=off "libextractor support"
     DEBUG=off "debug build"
===> Use 'make config' to modify these settings
 

jjstecchino

Contributor
Joined
May 29, 2011
Messages
136
Sure gcooper mediatomb as well as other upnp servers rely on a bunch of dependencies. I have not noticed that on a second compile run, mediatomb pulls in more libraries than it did on the first run. What I was trying to tell Joe is that he can surely add all the dependencies to freenas-common prior to adding mediatomb or he can just add the latter and let the installer figure out the dependencies for him.
 
Status
Not open for further replies.
Top