PDA

View Full Version : Setting up uPnP with minidlna on the freenas nightlies post-09/25/2011



gcooper
09-26-2011, 11:47 PM
NOTE: Here are complete semi-official directions for how to set things up with uPnP with minidlna (it will be added to the GUI eventually).

1. Login as root to FreeNAS box.
2. Execute the following commands:



mount -wu /
# There's a bug in either FreeNAS or the port that prevents this from being done automatically.
pw user add dlna
# Preserve the sample minidlna.conf file
test -f /usr/local/etc/minidlna.conf.sample || cp /usr/local/etc/minidlna.conf.sample /usr/local/etc/minidlna.conf


3. Copy the following to /usr/local/etc/minidlna.conf (replace the parameters below with something more useful for your install.. see /usr/local/etc/minidlna.conf.sample for hints on what you can change):



port=8200
media_dir=/mnt/tank
friendly_name=freenas
db_dir=/var/db/minidlna
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
inotify=no
enable_tivo=no
strict_dlna=no
notify_interval=300
serial=12345678
model_number=1


4. Test out your settings



minidlna -f /usr/local/etc/minidlna.conf


Things should be served up properly now -- otherwise, the console will output one or more relevant failure messages.

5. Making the change permanent



echo 'minidlna_enable="YES"' >> /conf/base/etc/rc.conf


6. Cleanup



# DO NOT FORGET THIS!
mount -ru /


Notes:


I've gotten things to play properly with my Xbox 360.
minidlna crashes on VLC (is most likely a bug with VLC) under FreeBSD and OSX.
This won't work with all Samsung TVs as noted by JoeSchmuck on the forums.
Sony BlueRay/PS3s are picky and won't play certain MIME types under the "All Media" Section (you might have to pick the appropriate media section in order for this to work properly). I know this for a fact with my Sony BlueRay player (detects the share, but won't let me play media under all media); but I can't confirm with a PS3. MP3s work for sure, but m4as won't work with some Sony BlueRay players.



Based on the above compatibility list, something seems fishy with the player support (I can play Xvid on my 360, but not one the Sony BlueRay player; I can't play non-copyright protected iTunes mp4 media on my Sony BlueRay player and Xbox 360; mp3s work on the BlueRay and the 360 after manually rescanning the directory).
If one of the other media players plays your device better than minidlna -- please let me know and I'll see if I can port support to minidlna or fix support in FreeBSD! Please note what media type you're having issues with as well as what codec you're having issues with (GSpot (http://www.videohelp.com/tools/GSpot) is recommended if you're using Windows).
Auto-rescanning seems broken because I have to issue minidlna with -R in order for it scan for new files.

ProtoSD
09-26-2011, 11:59 PM
On step 6, did you mean to say 'mount -ro /' ?

gcooper
09-27-2011, 12:03 AM
On step 6, did you mean to say 'mount -ro /' ?

Yeah.. thanks!

cubix
09-27-2011, 01:35 AM
@gcooper: Any luck getting the nightly builds functioning again for the lazy users? Aka me.

gcooper
09-27-2011, 07:26 AM
@gcooper: Any luck getting the nightly builds functioning again for the lazy users? Aka me.

I'll talk to jpaetzel about it. With any luck we will have something going by the end of the week.

Emad
09-27-2011, 10:53 AM
Where exactly this nightly build available? I cannot seems to find anywhere on sourceforge.

gcooper
09-28-2011, 01:05 PM
I'm going to add nightly images soon which can be downloaded via torrents, because getting the sourceforge infrastructure up and going again appears to have fallen a bit lower on the priority list here.

joeschmuck
10-01-2011, 05:57 PM
EDIT: Deleted content because people were not reading the rest of this thread and missing the correct way to incorporate minidlna.

jerrybme
10-02-2011, 07:53 AM
see: http://forums.freenas.org/showthread.php?2655-Changes-to-images-coming-soon-nightly-torrents-and-note-about-multimedia-support&highlight=minidlna
It points you to the proper file if you want to roll your own.

joeschmuck
10-02-2011, 08:00 AM
Thanks, sure would be nice to consolidate all this into a single thread.

jerrybme
10-02-2011, 09:49 AM
@Emad ->http://sourceforge.net/projects/freenas/files/FreeNAS-8-nightly/ for the nightly builds

ProtoSD
10-02-2011, 11:04 AM
Thanks, sure would be nice to consolidate all this into a single thread.

I could merge the threads, but I think the OP can also do that and I'm not sure how he wants to handle it. We could close one thread and put a link to the other...

joeschmuck
10-02-2011, 01:06 PM
I could merge the threads, but I think the OP can also do that and I'm not sure how he wants to handle it. We could close one thread and put a link to the other...

Appreciate the offer, think I'll just include the data in this thread on my next posting or I'll just edit my previous posting and include it all.

joeschmuck
10-02-2011, 03:39 PM
Okay, I've been able to retain the setting after a reboot, here's the fix...

Edit the minidlna.conf file at /conf/base/etc/local vice /usr/local/etc.

This brings me to another problem, minidlna will not start automatically on bootstrap, it fails with the following message...


Oct 2 16:30:46 freenas root: /etc/rc: WARNING: /var/db/minidlna is not a directory.
Oct 2 16:30:46 freenas root: /etc/rc: WARNING: failed precmd routine for minidlnaI can get past the /var/db/minidlna easy enough but it still fails to start up. It does start by CLI by just typing minidlna. I think the problem is it is not compatible with the rc scripting, meaning it doesn't have a start, stop, etc... command so it fails.

I could be wrong in my above statement, I've been reading a lot today but not sure if I learned it correctly. I did learn how to create an rc compatible script today but have no idea where to put it so it runs at startup.

Any ideas?

ProtoSD
10-02-2011, 04:17 PM
I did learn how to create an rc compatible script today but have no idea where to put it so it runs at startup.
Normally... There's /etc/rc.local (file), or just put your script in /etc/rc.d (folder), but I think with FreeNAS it needs to be /conf/base/etc/rc.d/ or /conf/base/etc/rc.local (rc.local is usually for custom stuff).

joeschmuck
10-02-2011, 04:29 PM
Normally... There's /etc/rc.local (file), or just put your script in /etc/rc.d (folder), but I think with FreeNAS it needs to be /conf/base/etc/rc.d/ or /conf/base/etc/rc.local (rc.local is usually for custom stuff).

I did that already, /conf/base/etc/local/rc.d/ seems to be the right location which gets loaded into /usr/local/etc/rc.d during boot. I stuffed that script in many places and it never started up. I can run the script providing I'm in the proper directory and enter "./minidlnascript start" and I do have minidlnascript="YES" in rc.conf. It would be nice if minidlna just started like it should.

Time to call it quits for the evening, getting late on this coast. Thanks for the info, I'm sure I'm doing something wrong. More testing tomorrow and I don't mind provided I'm learning something.

ProtoSD
10-02-2011, 04:41 PM
Did you make the owner/group the same as the other scripts and chmod 555 ?
Does it have ". /etc/rc.subr" at the beginning?

joeschmuck
10-03-2011, 01:56 PM
Fixed !

I traced down the original problem of why minidlna would not start on bootstrap. In the file /conf/base/etc/local/rc.d/minidlna the line
command_args="-P $pidfile -u $minidlna_uid" is invalid. Change it to
command_args="".

You also need to create the directory minidlna in "/conf/base/var/db/".

joeschmuck
10-03-2011, 02:34 PM
DISCLAIMER : This is not all my work, far from it so I'm not taking credit. I have consolidated the info here.

This is a cleaned up look of the work required to get minidlna to be operational.

NOTE: You should be able to download one of the nightly builds and skip step 1. The nightly builds should have MULTIMEDIA already set during the build processes. You will have to do the remaining steps until minidlna in incorporated into the GUI.

1) Replace the following line in build/nano_env:

SW_FEATURES="DEBUG"

with this:

SW_FEATURES="DEBUG MULTIMEDIA"

And call build/do_build.sh as you normally would to produce a build image.

It would be a good idea to have media destinations identified before hand as you will need that info in this procedure.

2) Once you have loaded your system it's time to modify a few things...


mount -wu /
mkdir /conf/base/var/db/minidlna
pw add user dlna
echo 'minidlna_enable="YES"' >> /conf/base/etc/rc.conf
cd /conf/base/etc/local
ee minidlna.conf
Now edit the media_dir lines to reflect your Video, Audio, and Photos (my test drive is peanuts as you can tell)


media_dir=V,/mnt/peanuts/movies
media_dir=A,/mnt/peanuts/music
media_dir=P,/mnt/peanuts/picturesEdit the db_dir line if you like. The default will exist but I placed mine on the actual hard drive like so hoping the database will not need to be recreated in full each time.

db_dir=/mnt/peanuts/minidlnadbYou don't need to change any other values unless you desire to.
Press ESC and save your file.

3) Now we need to fix the minidlna script file.

cd rc.d
ee minidlna

Modify
command_args="-P $pidfile -u $minidlna_uid"

to

command_args="-R"
Press ESC to save the modification.

Save all your work properly

mount -ro /And type reboot. Minidlna should start up without issue (as of build 8104).

To rebuild your database you can either reboot your NAS or while logged on as root or SU enter 'service minidlna restart'.

UPDATE: Minidlna (as of 11/18/2011) does not refresh the media automatically. The -R in the command_args will force an update every time minidlna is started. If you do not want the database rebuilt each time then place a '#' (hash) mark before the value '#command_args="-R"' or delete it all together.

jerrybme
10-07-2011, 04:34 AM
Nice job figuring out why minidlna won't load properly on reboot! Now if I could figure out the same issue for transmission I won't have to ssh in to start those processes after every reboot. ;-)

joeschmuck
10-07-2011, 05:14 AM
Nice job figuring out why minidlna won't load properly on reboot! Now if I could figure out the same issue for transmission I won't have to ssh in to start those processes after every reboot. ;-)

Transmission ? If this is another thread then point me to it. I'm enjoying this learning process.

jerrybme
10-07-2011, 07:24 AM
Transmission ? If this is another thread then point me to it. I'm enjoying this learning process.
I started a new thread in the Hacking section: http://forums.freenas.org/showthread.php?2933-How-to-get-Transmission-working-in-Freenas-8-from-svn-source&p=12015#post12015

joeschmuck
10-13-2011, 03:40 PM
Has anyone had any luck with getting minidlna to update it's database properly/periodically? I can only get the update done if I reboot the NAS. This is not very optimal. I guess I'll take a look on Google to see if there are any other forums having minidlna issues and maybe I'll be lucky enought o stumble across something helpful. If someones does update, maybe I have my directories setup incorrectly.

Thanks,
Mark

parks853
10-16-2011, 10:13 AM
Has anyone had any luck with getting minidlna to update it's database properly/periodically? I can only get the update done if I reboot the NAS. This is not very optimal. I guess I'll take a look on Google to see if there are any other forums having minidlna issues and maybe I'll be lucky enought o stumble across something helpful. If someones does update, maybe I have my directories setup incorrectly.

Thanks,
Mark

Mark,

Does the 'inotify' key in the minidlna.conf file need to be 'yes'? Mine is 'no' and the description says set to no to disable automation discovery of files??

edit - From what I've been reading minidlna uses inotify to determine when files are added.

joeschmuck
10-16-2011, 01:08 PM
I hope that is the fix. I've changed the value in my system, I'll know more once I've added something and given it a little time to update.

parks853
10-16-2011, 01:24 PM
I hope that is the fix. I've changed the value in my system, I'll know more once I've added something and given it a little time to update.

I'm just not sure if FreeNAS has inotfiy enabled (which is in the Kernel if I understood what I read).

parks853
10-18-2011, 09:52 AM
I hope that is the fix. I've changed the value in my system, I'll know more once I've added something and given it a little time to update.

Did you have any luck getting the database to update?

I was unable to get minidlna to auto-update the database. I really want to get it working properly, but I'm held back by my limited FreeBSD skills (Linux/Unix). I can however share some things I found.

I did:


pw user add dlna

but could not find the 'dlna' user listed in the web gui or with:


cat /etc/passwd

I'm not sure how important having the 'dlna' user is but it is listed in the minidlna script as the user. Also, while looking at the minidlna script I noticed there is a 'required dir' and mine was set to the default db directory. I changed it to what I used for 'db_dir' from minidlna.conf.

As mentioned before I changed the 'inotify' value found in minidlna.conf to 'yes'. I was reading that inotify is something in the Linux kernel. I thought from what I read on FreeBSD it is now available, but got confused in there somewhere. I also read that FreeBSD can use kqueue as an event notification interface. I have no idea how to determine if FreeNAS is using inotify or kqueue and if not, how to get one working.

The only success I had in updating the directory was with the following commands:


pkill minidlna
minidlna -f /usr/local/etc/minidlna.conf -R

It was recommended by this article (http://www.openstora.com/wiki/index.php?title=MiniDLNA_How-To_%28with_guide_to_updating%29) to use debug mode to know when the update has completed.

It seems the version packaged when using "MULTIMEDIA" is behind the minidlna version, but doubt that matters.

Hopefully you have/had better luck than me.

gcooper
10-18-2011, 10:39 AM
I'm just not sure if FreeNAS has inotfiy enabled (which is in the Kernel if I understood what I read).

inotify is a Linux specific feature. Someone should code up an equivalent in libevent2 for inotify so more OSes other than Linux would benefit from directory/file based notification.

parks853
10-18-2011, 10:49 AM
inotify is a Linux specific feature. Someone should code up an equivalent in libevent2 for inotify so more OSes other than Linux would benefit from directory/file based notification.

What about kqueue? I'm assuming however the FreeNAS notification system is updated minidlna source would have to be changed as well??

gcooper
10-18-2011, 10:54 AM
What about kqueue? I'm assuming however the FreeNAS notification system is updated minidlna source would have to be changed as well??

libevent is a portable means of doing inotify and kqueues and is preferred instead of building in a bunch of hacks for multiple versions of kqueues (unfortunately the source for kqueues has diverged over the years between the BSDs, so it's not guaranteed to act the same way between all of the BSD variants). It's better to focus on libevent because it has a lot better visibility..

joeschmuck
10-18-2011, 12:26 PM
Yea, I have been completely unsuccessful in getting minidlna to automatically update the library when you add a new item later down the road. So as a temporary patch we will have to reboot the machine if you add a new item. It's not that bad right now for me as I only add a new movie every few weeks or so. I'll update the music when my daughter buys something new. Hopefully in a few months this will be rectified.

@gcooper,
Any idea when you will be able to devote some time to this? I know there are bigger problems in FreeNAS which need to be taken care of first (IMO), I'm just asking.

gcooper
10-18-2011, 12:32 PM
Yea, I have been completely unsuccessful in getting minidlna to automatically update the library when you add a new item later down the road. So as a temporary patch we will have to reboot the machine if you add a new item. It's not that bad right now for me as I only add a new movie every few weeks or so. I'll update the music when my daughter buys something new. Hopefully in a few months this will be rectified.

@gcooper,
Any idea when you will be able to devote some time to this? I know there are bigger problems in FreeNAS which need to be taken care of first (IMO), I'm just asking.

Rebooting the machine isn't required... yowch. Just add '/usr/local/etc/rc.d/minidlna restart' to a periodic cronjob as a hack for now..

I'd have to look and see how long it'd take to add libevent support b/c I don't know how long it would take today.

parks853
10-18-2011, 12:37 PM
Would it be worth looking into the latest minidlna port (http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/minidlna/#dirlist), I noticed it has been updated recently to 1.0.22. Not sure if it will fix the database update issue, but I'm not sure how to update it on the trunk before building. I'm willing to try it after it is updated in the nightly, or if you can point me to a help guide for updating it on the trunk.

edit - also, does the script understand start, stop, and/or restart? I noticed the Linux version has a minidlna.init but we don't have that in the freebsd port.

gcooper
10-18-2011, 12:47 PM
Would it be worth looking into the latest minidlna port (http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/minidlna/#dirlist), I noticed it has been updated recently to 1.0.22. Not sure if it will fix the database update issue, but I'm not sure how to update it on the trunk before building. I'm willing to try it after it is updated in the nightly, or if you can point me to a help guide for updating it on the trunk.

It looks like a weekend project based on the CVS code I just peeked at. If the patch doesn't apply out of the box for minidlna, I'll have to update the port.. but unless there are relevant bugfixes, etc, it's not worth it to update the port by itself.


edit - also, does the script understand start, stop, and/or restart? I noticed the Linux version has a minidlna.init but we don't have that in the freebsd port.

Yes. Look for minidlna.sh.in in the port itself, then look at /etc/rc.subr / man 5 rc if you're curious about how the magic happens.

joeschmuck
10-18-2011, 12:53 PM
The script doesn't work for me. Your "/usr/local/etc/rc.d/minidlna restart" does restart minidlna. I'm such a noob I'll be learning how to add a cronjob to FreeNAS now. Don't tell me, I'll figure it out and if I don't, I'll ask how. It's a good learning experience for me.

The only problem I see with the cronjob is when to schedule it. I certainly wouldn't want it to restart when I'm watching a movie. I wish the -R parameter worked to update the database. If I could manipulate the GUI, I'd place a restart button on the main page until this is all figured out.

parks853
10-18-2011, 01:02 PM
The only problem I see with the cronjob is when to schedule it. I certainly wouldn't want it to restart when I'm watching a movie. I wish the -R parameter worked to update the database. If I could manipulate the GUI, I'd place a restart button on the main page until this is all figured out.

Did you try stopping minidlna before using??


minidlna -f /usr/local/etc/minidlna.conf -R

I wasn't able to perform:


minidlna stop

but maybe it will work like this:


/usr/local/etc/rc.d/minidlna stop

I'm such a noob as well, but willing to try things and help if I can.

joeschmuck
10-18-2011, 01:22 PM
Okay, I'm looking a little harder and although I can stop, start, and restart minidlna, it doesn't appear to scan the drives at all. My drives are in the standby state and never leaves that state, even when I restart minidlna. Sounds fishy to me. I did verify the service is removed and loads again in memory.

What next?

parks853
10-18-2011, 01:27 PM
Okay, I'm looking a little harder and although I can stop, start, and restart minidlna, it doesn't appear to scan the drives at all. My drives are in the standby state and never leaves that state, even when I restart minidlna. Sounds fishy to me. I did verify the service is removed and loads again in memory.

What next?

only thing I can think of is try running in debug mode during the rebuild (or command that is supposed to rebuild :) )


minidlna -f /usr/local/etc/minidlna.conf -R -d

I'm not at home so can't try it again until later tonight.

joeschmuck
10-18-2011, 04:10 PM
Well it appeared to rebuild but it was a one time deal. I could not get it to repeat. Again, until it actually works correctly I will reboot the NAS to rebuild the database. It's no big deal.

imy300
10-26-2011, 11:44 AM
i'm new to all this but willing to learn. Can someone give me instructions to installing and configuring minidlna on 8.0.2 ? thanks

joeschmuck
10-26-2011, 12:39 PM
i'm new to all this but willing to learn. Can someone give me instructions to installing and configuring minidlna on 8.0.2 ? thanks

Not sure if anyone has done this yet and I tried but met with failure. I'm sure it can be done but you could do like the rest of us and build using the trunk. Read the thread from the start to finish and if you have any questions about the instructions feel free to ask. If you haven't built a FreeNAS program then you have the option to build it yourself (very easy to do) or ask someone for a custom build with MULTIMEDIA=1 inserted at the proper location. Go to 'How-To Guides', 'Installation' and you will find a two part guide that will enable you to build FreeNAS. Once there you need to download the FreeNAS program (I have a nice script, use option -s), alter one file (in this thread) and then build FreeNAS (my script option -b). Once you have installed this new version of FreeNAS you will have to configure it IAW the instructions in this thread. There is no simple GUI at this time but I suspect minidlna will be part of the core 8.1 release but that is many months away.

gcooper
10-26-2011, 12:49 PM
Not sure if anyone has done this yet and I tried but met with failure. I'm sure it can be done but you could do like the rest of us and build using the trunk. Read the thread from the start to finish and if you have any questions about the instructions feel free to ask. If you haven't built a FreeNAS program then you have the option to build it yourself (very easy to do) or ask someone for a custom build with MULTIMEDIA=1 inserted at the proper location. Go to 'How-To Guides', 'Installation' and you will find a two part guide that will enable you to build FreeNAS. Once there you need to download the FreeNAS program (I have a nice script, use option -s), alter one file (in this thread) and then build FreeNAS (my script option -b). Once you have installed this new version of FreeNAS you will have to configure it IAW the instructions in this thread. There is no simple GUI at this time but I suspect minidlna will be part of the core 8.1 release but that is many months away.

It's not doable with the 8.0.2 sources unless you hand edit freenas-common to pull in all of the bits. Sorry..

joeschmuck
10-26-2011, 12:57 PM
It's not doable with the 8.0.2 sources unless you hand edit freenas-common to pull in all of the bits. Sorry..
Now that is too much work for me, well almost. Mine runs just fine using trunk sources.

Any chance the nightly builds are setup with MULTIMEDIA=1 ? And BTW, glad to see the nightly builds have started back.

gcooper
10-26-2011, 01:08 PM
Now that is too much work for me, well almost. Mine runs just fine using trunk sources.

Any chance the nightly builds are setup with MULTIMEDIA=1 ? And BTW, glad to see the nightly builds have started back.

Yeah, I sort of kicked it back to life this morning.

I'll produce another branch for that (-DEBUG + MULTIMEDIA), and put it under the unofficial area. I'll need to hack the image to be smaller because it's building fatty images today.

parks853
10-26-2011, 01:59 PM
Is there any chance that we will see a 8.0.X with uPnP installed and working anytime soon (before 8.1)? I've been successful in building from source with MULTIMEDIA set and making the needed changes to get minidlna working (thanks to this thread). However, minidlna still has the issue where it will not update the database. It has not been worth it, to me, to flash over 8.0.2 release with a nightly that has a somewhat working version of minidlna installed.

Maybe I'll get more time to try again to get the database to update. Would it be worthwhile to add the package to freeBSD to see if the minidlna port even updates its database on freeBSD?

gcooper
10-26-2011, 02:08 PM
Is there any chance that we will see a 8.0.X with uPnP installed and working anytime soon (before 8.1)? I've been successful in building from source with MULTIMEDIA set and making the needed changes to get minidlna working (thanks to this thread). However, minidlna still has the issue where it will not update the database. It has not been worth it, to me, to flash over 8.0.2 release with a nightly that has a somewhat working version of minidlna installed.

Maybe I'll get more time to try again to get the database to update. Would it be worthwhile to add the package to freeBSD to see if the minidlna port even updates its database on freeBSD?

You'd be wasting your time. Again, inotify is a Linux-only kernel feature that does not exist on FreeBSD, and that's what things are currently coded up as. Restarting the service should be enough, but you might be able to HUP the service (if it supports it) and it will reload the database *shrugs*.

parks853
10-26-2011, 02:11 PM
I was hoping whoever ported it to freeBSD from linux patched/fixed/changed it to work with freeBSD but didn't see any details of it in the port information.

joeschmuck
10-26-2011, 04:31 PM
Yeah, I sort of kicked it back to life this morning.

I'll produce another branch for that (-DEBUG + MULTIMEDIA), and put it under the unofficial area. I'll need to hack the image to be smaller because it's building fatty images today.

Fatty, LOL, yea I'll agree with that, but they still work. I'm sure I speak for the other people out here that we appreciate your work. You give good feedback and I haven't seen you talk down to anyone, and you are on the forums helping out vice just coding the product. It makes a difference.

Thank You!
-Mark

parks853
10-28-2011, 08:13 AM
I agree - nice to have suggestions and questions answered from a developer.

Thanks for your help.

freemwp
10-31-2011, 02:44 AM
Not sure if anyone has done this yet and I tried but met with failure. I'm sure it can be done but you could do like the rest of us and build using the trunk..

Well, I'm running minidlna from a jail on 8.0.1, and that works perfectly, accept for the refresh thing.

keflox
10-31-2011, 09:46 AM
Hello

Here are the commands to enter to setup minidlna


mount -wu /
mkdir /conf/base/var/db/minidlna
rehash
pkg_add -r minidlna
cp /usr/local/etc/minidlna.conf /conf/base/etc/local/
vi /conf/base/etc/local//minidlna.conf
==> update the directories containing your data
cp /etc/local/rc.d/minidlna /conf/base/etc/local/rc.d/
vi /conf/base/etc/local/rc.d/minidlna
==> change command_args=""
echo 'minidlna_enable="YES"' >> /conf/base/etc/rc.conf
mount -ro /
reboot

I'll post soon the configuration working with Sony TV.

Regards
Lionel.

joeschmuck
10-31-2011, 03:14 PM
Hello

Here are the commands to enter to setup minidlna


mount -wu /
mkdir /conf/base/var/db/minidlna
rehash
pkg_add -r minidlna
cp /usr/local/etc/minidlna.conf /conf/base/etc/local/
vi /conf/base/etc/local//minidlna.conf
==> update the directories containing your data
cp /etc/local/rc.d/minidlna /conf/base/etc/local/rc.d/
vi /conf/base/etc/local/rc.d/minidlna
==> change command_args=""
echo 'minidlna_enable="YES"' >> /conf/base/etc/rc.conf
mount -ro /
reboot

I'll post soon the configuration working with Sony TV.

Regards
Lionel.

Becaue of the pkg_add, your minidlna installation will disappear when you reboot. You need to create in accordance with instruction of the first page to retain the installation.

Hooch
11-05-2011, 08:12 AM
Becaue of the pkg_add, your minidlna installation will disappear when you reboot. You need to create in accordance with instruction of the first page to retain the installation.

hi, i am new to this forum, but followed the threads concerning minidlna setup since weeks.

does the setup post from keflox solve the problem with database not being updated without reboot?

greets
Hooch

joeschmuck
11-05-2011, 08:18 AM
hi, i am new to this forum, but followed the threads concerning minidlna setup since weeks.

does the setup post from keflox solve the problem with database not being updated without reboot?

greets
Hooch
Nope, sure doesn't solve it at all. If you read what gcooper has to say in this thread you will note that inotify isn't supported in FreeBSD which is the root cause for the updating not occurring.

-Mark

gpapaiko
11-06-2011, 05:17 PM
Well here are my results while installing to 8.0.1-Release (not a nightly build)

1) mount -uw /
2) pkg_add -r minidlna
3) rehash
4) Edit the minidlna.conf as indicated in step 3 (in first posting)
5) Do step 5 above as well.
6) mount -ro /
7) minidlna

And your minidlna service is running and mine streamed video just fine.

My problem is when I reboot, all the packages I installed are now gone. I assume it is because they were not incorporated into the actual files on the drive vice maybe files in a RAM drive? Got me at this point. But like I said, it runs great, just don't reboot.

EDIT: In the trunk files I can see minidlna is in the nanobsd common file but where do I define MULTIMEDIA=1 ?


Hi has this issue been resolve - when rebooting?
I am getting the same problem.

joeschmuck
11-07-2011, 01:28 AM
I have deleted my previous entry the last two posters are referring to to try and eliminate confusion. Minidlna cannot be installed as a pkg_add and be expected to survive a reboot, it must be built into the FreeNAS code as indicated in this thread.

tmf
11-08-2011, 06:07 PM
Here is what I did on my regular freebsd box to enable minidlna rescans.
I've changed command_args line in /usr/local/etc/rc.d/minidlna adding -R to the parameters.
Since this change, minidlna rescans its database after
service minidlna restartOf course it rescans its database on system start also.

hth

-tmf

joeschmuck
11-18-2011, 11:29 AM
Here is what I did on my regular freebsd box to enable minidlna rescans.
I've changed command_args line in /usr/local/etc/rc.d/minidlna adding -R to the parameters.
Since this change, minidlna rescans its database after
service minidlna restartOf course it rescans its database on system start also.

hth

-tmf

Nice idea adding the -R to the command_args. As for the rescanning on system restart without the -R, as I can tell that depends on where the database is stored. I store mine in the hard drive as to free up RAM and to keep from having to rescan each time I reboot, but if you leave it in RAM, then of course it rescans because the database no longer exists. But to be clear (and to me you are), this is for a system reboot, not simply stopping and restarting minidlna.

ProtoSD
11-18-2011, 11:36 AM
service minidlna restart

It looks to me like it works without rebooting using the above command.

joeschmuck
11-18-2011, 11:54 AM
Provided the "-R" is in the command_args already, I agree.

lrusak
11-21-2011, 10:39 AM
Yeah, I sort of kicked it back to life this morning.

I'll produce another branch for that (-DEBUG + MULTIMEDIA), and put it under the unofficial area. I'll need to hack the image to be smaller because it's building fatty images today.

Where are these builds located? I'd like to try a build with the MULTIMEDIA option already added. I used minidlna using the pkg_add method, but as described by other users it gets destroyed upon restart.

Thanks!

joeschmuck
11-21-2011, 02:38 PM
Where are these builds located? I'd like to try a build with the MULTIMEDIA option already added. I used minidlna using the pkg_add method, but as described by other users it gets destroyed upon restart.

Thanks!
I haven't seen any produced. If you like I can setup a place for you to download a copy I compiled. It would be an iso file. Let me know and I can get it setup on a file server for you to download. It will be r8759 with MULTIMEDIA set. You will still have to do the other setup on the first page of this thread, should take only 10 minutes. I just started the build and I'm hoping it works well, meaning it actually runs okay, and I'd test out the build a little before I put it online.

-Mark

joeschmuck
11-22-2011, 05:48 AM
Built r8759 and am having a problem. It looks like minidlna was updated to start with and I can get minidlna to run however once I try to access the server from a media player the minidlna program exits with this message:

Nov 22 06:41:08 freenas kernel: pid 4230 (minidlna), uid 0: exited on signal 10Also it looks like the user 'dlna' does not stick once added. I'll have to look into it more and I'll create another build in the meantime.

lrusak
11-22-2011, 10:42 AM
Built r8759 and am having a problem. It looks like minidlna was updated to start with and I can get minidlna to run however once I try to access the server from a media player the minidlna program exits with this message:

Nov 22 06:41:08 freenas kernel: pid 4230 (minidlna), uid 0: exited on signal 10Also it looks like the user 'dlna' does not stick once added. I'll have to look into it more and I'll create another build in the meantime.

Thanks for the heads up! I could compile the build myself but figured why bother if someone else has already done it! let me know what you find out. Thanks

joeschmuck
11-22-2011, 02:01 PM
This will take a bit of time to figure out what is going on. Whenever I try to use my Windows Media Player it causes the above error message. When I try to use my Sony PS3 it just doesn't show any movies but at least minidlna doesn't throw an error. Not sure what is going on. I'm sure I'll get some more time to fiddle with it during Thanksgiving.

gcooper
11-22-2011, 04:17 PM
This will take a bit of time to figure out what is going on. Whenever I try to use my Windows Media Player it causes the above error message. When I try to use my Sony PS3 it just doesn't show any movies but at least minidlna doesn't throw an error. Not sure what is going on. I'm sure I'll get some more time to fiddle with it during Thanksgiving.

Signal 10 = SIGBUS.

1. Are you pkg_add'ing it?
2. How and when did you build the image?
3. Can you ktrace the process?

joeschmuck
11-23-2011, 01:42 AM
Signal 10 = SIGBUS.

1. Are you pkg_add'ing it?
2. How and when did you build the image?
3. Can you ktrace the process?
I did a normal build like I always do, nothing fancy at all, just add MULTIMEDIA which of course does the trick to adding the media files, and then the regular do_build with no parameters, and I started with an empty trunk directory so all new files would be pulled. As for when, well that was 11/22/2011 @ 5:29AM and is build version r8759M.

minidlna has changed, the minidlna.conf file is different as it now points to a media directory of /opt and the server name is commented out and there are some extra options listed at the bottom of the file. And I don't need to change the minidlna 'command_args' value either to get it to run. I did try to change the command_args to -R and even delete them.

I'm sure I could run ktrace if I knew how to. Please keep in mind I'm not a linux/BSD person and it's still a bit new to me. If you toss me a bone I'll give it a try and submit my results.

I didn't check to see if this is a newer version of minidlna but I suspect it's either that or I was thinking you made some alterations.

Last thing, I didn't have this issue with build 8720 but that version had other issues (now fixed) preventing it from being a good candidate to give a copy to to test with.

My next course of action is to build again from scratch and see if anything changes. It's possible there was something off just for that one build version (not holding my breath) causing the problem.

-Mark

joeschmuck
11-24-2011, 12:47 PM
Just to follow up, a newer version of minidlna is being used now which is causing the issues with trying to set it up to run properly. It always fails with a SIG 10 error when trying to use Windoze Media Player, it will run for a short time on my PS3 but then fails to list any media. I'm not too pleased with this newer version of minidlna. So how do I migrate it back to the previous version all while using the latest build? I'm going to try something, not sure it will work.

lrusak
11-25-2011, 09:01 AM
I'll try to compile a build next week when I have some spare time. I'll try using my mac, iPhone, and xbmc htpc as UPNP players and see how it works and if I get the same error. Thanks for the info

joeschmuck
11-25-2011, 03:30 PM
There is a problem with the minidlna, it's not us here. Here is a reported problem which sounds like the problem I'm experiencing. There is a fix however I'm not certain yet how to implement it. Here is the bug report http://www.freebsd.org/cgi/query-pr.cgi?pr=162526

I'm trying to build an older version right now and maybe it will use the older minidlna file, maybe not.

gcooper
11-27-2011, 11:46 AM
There is a problem with the minidlna, it's not us here. Here is a reported problem which sounds like the problem I'm experiencing. There is a fix however I'm not certain yet how to implement it. Here is the bug report http://www.freebsd.org/cgi/query-pr.cgi?pr=162526

I'm trying to build an older version right now and maybe it will use the older minidlna file, maybe not.

I'll fix it today. It's starting to irk me because the port doesn't even work out of the box on FreeBSD 9.

joeschmuck
11-27-2011, 12:07 PM
I was going to copy the executable from a previous build over the new version and cross my fingers it worked. I'm not sure how to specify a single file to use the older version.

gcooper
11-27-2011, 09:54 PM
I was going to copy the executable from a previous build over the new version and cross my fingers it worked. I'm not sure how to specify a single file to use the older version.

Hmm... if the older version works better, I could patch the port to the older version.

That being said, it would be nice if you could attach gdb to the minidlna process (running -d of course) with a DEBUG image to verify whether or not that's the exact spot where things are crashing. You'll need to execute minidlna like so:

gdb minidlna
set args <what you usually pass in to minidlna -- should just be the pidfile and maybe the conf file>
run

When minidlna stops with SIGBUS, type in bt, and paste the output here.

sonisame72
11-29-2011, 08:00 AM
I downloaded and installed the latest nightly build of FreeNas 8.2(64 bit version from couple of days ago)

pw user add dlna works, but I dont see any file as /usr/local/etc/minidlna.conf

I am not sure if the latest nightly build have miniDLNA build or do I have to get a custom build as mentioned in the few posts ago?

Please help

joeschmuck
11-29-2011, 08:59 AM
I downloaded and installed the latest nightly build of FreeNas 8.2(64 bit version from couple of days ago)

pw user add dlna works, but I dont see any file as /usr/local/etc/minidlna.conf

I am not sure if the latest nightly build have miniDLNA build or do I have to get a custom build as mentioned in the few posts ago?

Please help

The nightly builds do not have the software built in, this is why you must build a version with MULTIMEDIA set.

sonisame72
11-29-2011, 09:33 AM
Joe

r8759 with MULTIMEDIA built seem to have some small issues (reading your posts), Can I please get a link to download location for one try.

joeschmuck
11-29-2011, 10:17 AM
Hmm... if the older version works better, I could patch the port to the older version.

That being said, it would be nice if you could attach gdb to the minidlna process (running -d of course) with a DEBUG image to verify whether or not that's the exact spot where things are crashing. You'll need to execute minidlna like so:

gdb minidlna
set args <what you usually pass in to minidlna -- should just be the pidfile and maybe the conf file>
run

When minidlna stops with SIGBUS, type in bt, and paste the output here.

I'm not blowing you off, I'm just having problems with my computer. I'm sure it's just me but it sure seems like the builds are getting larger with respect to the amount of space required to compile. I have just switched from a 15GB RAM drive to a SSD with a bit more room. Hopefully that will build the files.

joeschmuck
11-29-2011, 11:17 AM
Joe

r8759 with MULTIMEDIA built seem to have some small issues (reading your posts), Can I please get a link to download location for one try.

I'm working on a new build but it's giving me a hard time. Here is one you can use, it works in general, well on my computer. You will still need to set up the file as indicated in posting #19 on page one of this thread. The download will be gone in 30 days which is good because we never want to use old software.

CAUTION *** This is experimental
http://ge.tt/97ITNXA

joeschmuck
11-30-2011, 08:01 AM
That being said, it would be nice if you could attach gdb to the minidlna process (running -d of course) with a DEBUG image to verify whether or not that's the exact spot where things are crashing. You'll need to execute minidlna like so:

gdb minidlna
set args <what you usually pass in to minidlna -- should just be the pidfile and maybe the conf file>
run

When minidlna stops with SIGBUS, type in bt, and paste the output here.

Did as requested, bt results in "No stack" message.
I used r8892 and the crappy 1.0.22,1 version is still there.

joeschmuck
12-03-2011, 01:13 PM
Here is the info using '-d' to start minidlna. I have ensured all required support programs were specifically included as well but that makes no difference.


[2011/12/03 14:04:42] minidlna.c:1235: debug: HTTP connection from 192.168.1.200:25342
[2011/12/03 14:04:42] upnphttp.c:158: debug: Client found in cache. [type 100/entry 0]
[2011/12/03 14:04:42] upnphttp.c:810: debug: HTTP REQUEST: GET /icons/sm.png HTTP/1.1
Connection: Keep-Alive
User-Agent: Windows-Media-Player-DMS/12.0.7601.17514
Host: 192.168.1.27:8200


[2011/12/03 14:04:42] upnphttp.c:1253: debug: Sending small PNG icon
[2011/12/03 14:04:45] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.6:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-033052370658, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:46] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.23:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028970015864, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:48] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.23:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028879923002, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:49] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.20:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028879923002, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:50] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.23:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-033052370658, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:52] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.6:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028970015864, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:57] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.20:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028970015864, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:04:58] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.20:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-033052370658, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:05:01] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.6:49153 ST: uuid:DIRECTV2PC-Media-Server1_0-RID-028879923002, MX: 5, MAN: "ssdp:discover"
[2011/12/03 14:05:02] minissdp.c:683: info: SSDP M-SEARCH from 192.168.1.200:65020 ST: urn:schemas-upnp-org:service:ContentDirectory:1, MX: 3, MAN: "ssdp:discover"
[2011/12/03 14:05:03] minidlna.c:1235: debug: HTTP connection from 192.168.1.200:25354
[2011/12/03 14:05:03] upnphttp.c:158: debug: Client found in cache. [type 100/entry 0]
[2011/12/03 14:05:03] upnphttp.c:810: debug: HTTP REQUEST: GET /rootDesc.xml HTTP/1.1
Cache-Control: no-cache
Connection: Close
Pragma: no-cache
Accept: text/xml, application/xml
Host: 192.168.1.27:8200
User-Agent: Microsoft-Windows/6.1 UPnP/1.0 Windows-Media-Player/12.0.7601.17514 DLNADOC/1.50 (MS-DeviceCaps/1024)


[2011/12/03 14:05:03] upnphttp.c:1131: debug: HTTP RESPONSE: HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Connection: close
Content-Length: 2226
Server: FreeBSD/8.2-RELEASE-p4 DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.0

<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><device><deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType><friendlyName>My DLNA Server</friendlyName><manufacturer>Justin Maggard</manufacturer><manufacturerURL>http://www.FreeBSD.org/</manufacturerURL><modelDescription>MiniDLNA on FreeBSD</modelDescription><modelName>Windows Media Connect compatible (MiniDLNA)</modelName><modelNumber>1</modelNumber><modelURL>http://www.FreeBSD.org/</modelURL><serialNumber>12345678</serialNumber><UDN>uuid:4d696e69-444c-164e-9d41-000c29a1d81d</UDN><dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC><presentationURL>http://192.168.1.27:8200/</presentationURL><iconList><icon><mimetype>image/png</mimetype><width>48</width><height>48</height><depth>24</depth><url>/icons/sm.png</url></icon><icon><mimetype>image/png</mimetype><width>120</width><height>120</height><depth>24</depth><url>/icons/lrg.png</url></icon><icon><mimetype>image/jpeg</mimetype><width>48</width><height>48</height><depth>24</depth><url>/icons/sm.jpg</url></icon><icon><mimetype>image/jpeg</mimetype><width>120</width><height>120</height><depth>24</depth><url>/icons/lrg.jpg</url></icon></iconList><serviceList><service><serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType><serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId><controlURL>/ctl/ContentDir</controlURL><eventSubURL>/evt/ContentDir</eventSubURL><SCPDURL>/ContentDir.xml</SCPDURL></service><service><serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType><serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId><controlURL>/ctl/ConnectionMgr</controlURL><eventSubURL>/evt/ConnectionMgr</eventSubURL><SCPDURL>/ConnectionMgr.xml</SCPDURL></service><service><serviceType>urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1</serviceType><serviceId>urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar</serviceId><controlURL>/ctl/X_MS_MediaReceiverRegistrar</controlURL><eventSubURL>/evt/X_MS_MediaReceiverRegistrar</eventSubURL><SCPDURL>/X_MS_MediaReceiverRegistrar.xml</SCPDURL></service></serviceList></device></root>
[2011/12/03 14:05:03] minidlna.c:1235: debug: HTTP connection from 192.168.1.200:25355
[2011/12/03 14:05:03] upnphttp.c:158: debug: Client found in cache. [type 100/entry 0]
[2011/12/03 14:05:03] upnphttp.c:810: debug: HTTP REQUEST: GET /ContentDir.xml HTTP/1.1
Cache-Control: no-cache
Connection: Close
Pragma: no-cache
Accept: text/xml, application/xml
User-Agent: Microsoft-Windows/6.1 UPnP/1.0 Windows-Media-Player/12.0.7601.17514 DLNADOC/1.50 (MS-DeviceCaps/1024)
Host: 192.168.1.27:8200


[2011/12/03 14:05:03] upnphttp.c:1131: debug: HTTP RESPONSE: HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Connection: close
Content-Length: 5094
Server: FreeBSD/8.2-RELEASE-p4 DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.0

<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><actionList><action><name>GetSearchCapabilities</name><argumentList><argument><name>SearchCaps</name><direction>out</direction><relatedStateVariable>SearchCapabilities</relatedStateVariable></argument></argumentList></action><action><name>GetSortCapabilities</name><argumentList><argument><name>SortCaps</name><direction>out</direction><relatedStateVariable>SortCapabilities</relatedStateVariable></argument></argumentList></action><action><name>GetSystemUpdateID</name><argumentList><argument><name>Id</name><direction>out</direction><relatedStateVariable>SystemUpdateID</relatedStateVariable></argument></argumentList></action><action><name>Browse</name><argumentList><argument><name>ObjectID</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable></argument><argument><name>BrowseFlag</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_BrowseFlag</relatedStateVariable></argument><argument><name>Filter</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable></argument><argument><name>StartingIndex</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable></argument><argument><name>RequestedCount</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>SortCriteria</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable></argument><argument><name>Result</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable></argument><argument><name>NumberReturned</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>TotalMatches</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>UpdateID</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable></argument></argumentList></action><action><name>Search</name><argumentList><argument><name>ContainerID</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_ObjectID</relatedStateVariable></argument><argument><name>SearchCriteria</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_SearchCriteria</relatedStateVariable></argument><argument><name>Filter</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Filter</relatedStateVariable></argument><argument><name>StartingIndex</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Index</relatedStateVariable></argument><argument><name>RequestedCount</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>SortCriteria</name><direction>in</direction><relatedStateVariable>A_ARG_TYPE_SortCriteria</relatedStateVariable></argument><argument><name>Result</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable></argument><argument><name>NumberReturned</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>TotalMatches</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_Count</relatedStateVariable></argument><argument><name>UpdateID</name><direction>out</direction><relatedStateVariable>A_ARG_TYPE_UpdateID</relatedStateVariable></argument></argumentList></action></actionList><serviceStateTable><stateVariable sendEvents="yes"><name>TransferIDs</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_ObjectID</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_Result</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_SearchCriteria</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_BrowseFlag</name><dataType>string</dataType><allowedValueList><allowedValue>BrowseMetadata</allowedValue><allowedValue>BrowseDirectChildren</allowedValue></allowedValueList></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_Filter</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_SortCriteria</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_Index</name><dataType>ui4</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_Count</name><dataType>ui4</dataType></stateVariable><stateVariable sendEvents="no"><name>A_ARG_TYPE_UpdateID</name><dataType>ui4</dataType></stateVariable><stateVariable sendEvents="no"><name>SearchCapabilities</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="no"><name>SortCapabilities</name><dataType>string</dataType></stateVariable><stateVariable sendEvents="yes"><name>SystemUpdateID</name><dataType>ui4</dataType></stateVariable></serviceStateTable></scpd>
[2011/12/03 14:05:03] minidlna.c:1235: debug: HTTP connection from 192.168.1.200:25356
[2011/12/03 14:05:03] upnphttp.c:158: debug: Client found in cache. [type 100/entry 0]
[2011/12/03 14:05:03] upnphttp.c:810: debug: HTTP REQUEST: SUBSCRIBE /evt/ContentDir HTTP/1.1
Cache-Control: no-cache
Connection: Close
Pragma: no-cache
User-Agent: Microsoft-Windows/6.1 UPnP/1.0
NT: upnp:event
Callback: <http://192.168.1.200:2869/upnp/eventing/izfroyrldf>
Timeout: Second-1800
Host: 192.168.1.27:8200


[2011/12/03 14:05:03] upnphttp.c:681: debug: ProcessHTTPSubscribe /evt/ContentDir
[2011/12/03 14:05:03] upnphttp.c:683: debug: Callback 'http://192.168.1.200:2869/upnp/eventing/izfroyrldf' Timeout=1800
[2011/12/03 14:05:03] upnphttp.c:684: debug: SID ''
[2011/12/03 14:05:03] upnpevents.c:153: debug: addSubscriber(/evt/ContentDir, http://192.168.1.200:2869/upnp/eventing/izfroyrldf, 1800)
Bus error
[Mark@tfreenas] /etc/local#


PKG_INFO shows minidlna-1.0.22,1 is installed.
I had changed the port_date field to November 30th to grab see if it would change anything but it didn't. We need to roll back to 2010.12.12 version until we figure out this issue but I don't know how to roll back a single port. I can remove the newer port and install the old port via PKG_DELETE and PKG_ADD but it doesn't survive reboot as expected.

gcooper
12-03-2011, 01:16 PM
I'm not blowing you off, I'm just having problems with my computer. I'm sure it's just me but it sure seems like the builds are getting larger with respect to the amount of space required to compile. I have just switched from a 15GB RAM drive to a SSD with a bit more room. Hopefully that will build the files.

No worries. Downgrading the port in the FreeNAS repo today until we can iron out what the actual problem is. I have access to Windows 7 Home Premium so if I know the exact setup steps so I can repro your scenario, I can probably fix the problem.

joeschmuck
12-03-2011, 04:05 PM
It doesn't matter if it's Windows 7 or my PS3, so for anything that tries to access the minidlna service causes it to crash. I use Windows Media Player because I run the test FreeNAS from VMWare Workstation v7.1.4 so I don't actually have to get up and go to the living room, turn on the PS3, reconfigure everything, and then try. When minidlna works the WMP works fine. So nothing special here. The only things that may be different is how I build FreeNAS but I doubt that is the issue. Again, it's a VMWare machine and all my instructions are in the How-To-Guides on how to create a VM to build freenas.

To duplicate my configuration of my FreeNAS in VM: (4GB RAM, 1CPU w2 cores, 5 HDDs, network Bridged)
1) Enable SSH & root login (Note: create a normal user account as wheel)
2) Enable FTP & root login
3) Enable CIFS
4) Configure 4 virtual HDD's each 20GB (configure as ZFS, create a movies directory and transfer via CIFS a movie or two)
5) Configure 1 virtual HDD with 4GB (for boot image)
6) Configure minidlna per port 19 of this thread and reboot.
7) Using Putty, login as user, then SU.
8) Minidlna should be running. To stop it just open up Windows Media Player and with is kill the service, then close WMP.
9) In putty enter 'minidlna -d', watch it scan for devices. Everything looks good.
10) Open WMP again and minidlna will die with debug data.

My computer is 192.168.1.200 as you can clearly see from the above debug data.

That is how I do it.

Can you tell me how to roll back the port manually?

gcooper
12-05-2011, 11:29 PM
It doesn't matter if it's Windows 7 or my PS3, so for anything that tries to access the minidlna service causes it to crash. I use Windows Media Player because I run the test FreeNAS from VMWare Workstation v7.1.4 so I don't actually have to get up and go to the living room, turn on the PS3, reconfigure everything, and then try. When minidlna works the WMP works fine. So nothing special here. The only things that may be different is how I build FreeNAS but I doubt that is the issue. Again, it's a VMWare machine and all my instructions are in the How-To-Guides on how to create a VM to build freenas.

To duplicate my configuration of my FreeNAS in VM: (4GB RAM, 1CPU w2 cores, 5 HDDs, network Bridged)
1) Enable SSH & root login (Note: create a normal user account as wheel)
2) Enable FTP & root login
3) Enable CIFS
4) Configure 4 virtual HDD's each 20GB (configure as ZFS, create a movies directory and transfer via CIFS a movie or two)
5) Configure 1 virtual HDD with 4GB (for boot image)
6) Configure minidlna per port 19 of this thread and reboot.
7) Using Putty, login as user, then SU.
8) Minidlna should be running. To stop it just open up Windows Media Player and with is kill the service, then close WMP.
9) In putty enter 'minidlna -d', watch it scan for devices. Everything looks good.
10) Open WMP again and minidlna will die with debug data.

My computer is 192.168.1.200 as you can clearly see from the above debug data.

That is how I do it.

Can you tell me how to roll back the port manually?

Hmmm.. ok, I'll look into this as time allows. For now I've rolled back the port to the known working version.

servion
12-12-2011, 11:49 AM
Anyone have any luck getting this to work with mp4 movies on the xbox 360? I've got it up and running via the instructions in this post, and everything plays fine on my android tablet using a upnp app, and music plays fine on the xbox. the .mp4 movies won't play - xbox gives me an error code. Funny thing is that when I was using windows media center on my PC to host the exact same video files, they would play on the xbox fine - just not with minidlna. Any thoughts?

joeschmuck
12-12-2011, 03:57 PM
My only thought is Media Center likely does some transcoding to make the video file compatible with your Xbox. Keep in mind minidlna is DLNA compliant and only passes the stream as-is. And that was just a guess. When the mediatomb plugin becomes available (could be many many months from now) that may solve the issue.

valesan
12-15-2011, 03:04 AM
The instructions work perfectly for me.
miniDLNA is active in my NAS with FreeNAS nightly r9134 ...
XBMC reads well the video files contained in the NAS from my Mac OSX Lion, PC Windows 7

My nas:
HP Proliant N36L 8GB RAM
FreeNAS on SSD 8Gb Kingston on SATA (CD / DVD port)
3 HDD 2TB HDD ST32000DL003 3.5 "2TB SATA2 5900RPM SEAGATE 64MB, BARRACUDA GREEN
RAID-Z

FreeNAS 8.2r9134 self compiled

many thanks to all

... waiting for a release version with dlna activated from the GUI

valesan
12-16-2011, 05:14 AM
hi, sorry for my english ...
but if I wanted to upgrade my version of FreeNAS self compiled with minidlna activated at a later build with GUI upgrade, I have to rerun the minidlna configuration?
thanks

Valerio

joeschmuck
12-16-2011, 03:03 PM
hi, sorry for my english ...
but if I wanted to upgrade my version of FreeNAS self compiled with minidlna activated at a later build with GUI upgrade, I have to rerun the minidlna configuration?
thanks

Valerio
The minidlna configuration in this thread is a hack until plugin support is complete and a plugin has been created for minidlna. Until then you will have to reconfigure the installation for minidlna, it is not saved between installations. So short answer is yes.

sonisame72
12-17-2011, 01:23 PM
Hi Joe

I have been using r8759 with MULTIMEDIA built. Seems to be working fine.

I am wondering if latest nighlty builds or 8.03 released recently is including minidlna and transmission? I also read in one of the other thread that gui-support for these two are coming by end of 2011, should I wait or keep using your r8759?

Thanks

gcooper
12-17-2011, 01:41 PM
Hi Joe
...

I am wondering if latest nighlty builds or 8.03 released recently is including minidlna and transmission? I also read in one of the other thread that gui-support for these two are coming by end of 2011, should I wait or keep using your r8759?


In theory we should have a release out by the end of the year with the needed support, but in reality I don't think that there's going to be a release out with support until late January/early February.

I'll hook in a weekly build with this stuff turned on (don't advise using trunk right now because a few critical items are busted).

joeschmuck
12-17-2011, 06:47 PM
Hi Joe

I have been using r8759 with MULTIMEDIA built. Seems to be working fine.

I am wondering if latest nighlty builds or 8.03 released recently is including minidlna and transmission? I also read in one of the other thread that gui-support for these two are coming by end of 2011, should I wait or keep using your r8759?

Thanks
Glad the build is running fine, I figured it would providing you don't have any odd hardware compatibility issues.

Quick answer, No. The nightly builds do not have these nor the support files built in.

I've already built a 8.0.3-RC1 version (not final yet and I see rebranded to BETA-3) and it works just fine. It was as simple as just updating the freenas-common file with the proper files which gcooper did for the trunk quite a while ago. No patch file for minidlna was required either.

I was going to wait until 8.0.3-Release came out before building and offering it up to anyone who asks for it. You would still need to follow the setup instructions as this is still just a hack as gcooper would say, but it's a good hack and doesn't affect the stability of the system at all, or none that I could find.

Something to note, the r8759 has a few features you will see go away when you change to 8.0.3 (likely not important to you at this time) and the configuration file will be different as well. It will actually conform to the format they intend, the trunk builds currently are not format compatible. I'm not sure why that is, I just accept it. I hear that will be fixed but I don't know when. This means you will have to set up your system again from basically scratch from the configuration standpoint. You can auto-import your drives so you don't lose any data. If however you are happy with your system the way it is, you could stay that way until 8.1 comes out.

@gcooper,
I've noticed a few things popping up so I'm just staying clear of the trunk files for a while (I say that now, let's see how long I can truly stay away). It's too bad the 8.0.3-RC1 doesn't have the same easy entry into the shell as the trunk version has from the webpage, that would be a great addition. I can wait until 8.1 or 8.2 release, it just makes entering a simple command so easy vice opening up an SSH window. I also wanted to thank you again for all your work in helping up get minidlna implemented, even as a hack, for those of us who really wanted FreeNAS to sever as a DLNA server too. I also see you have a multimedia version (directory) setup in the downloads. Nice to see that.

gcooper
12-18-2011, 05:21 AM
Glad the build is running fine, I figured it would providing you don't have any odd hardware compatibility issues.

Quick answer, No. The nightly builds do not have these nor the support files built in.

I've already built a 8.0.3-RC1 version (not final yet and I see rebranded to BETA-3) and it works just fine. It was as simple as just updating the freenas-common file with the proper files which gcooper did for the trunk quite a while ago. No patch file for minidlna was required either.

I was going to wait until 8.0.3-Release came out before building and offering it up to anyone who asks for it. You would still need to follow the setup instructions as this is still just a hack as gcooper would say, but it's a good hack and doesn't affect the stability of the system at all, or none that I could find.

It just increases the 'used' image size, and might log some more stuff to /var and store a few more files in /var . Other than that, you're right -- there shouldn't be too much of a difference.


Something to note, the r8759 has a few features you will see go away when you change to 8.0.3 (likely not important to you at this time) and the configuration file will be different as well. It will actually conform to the format they intend, the trunk builds currently are not format compatible. I'm not sure why that is, I just accept it. I hear that will be fixed but I don't know when. This means you will have to set up your system again from basically scratch from the configuration standpoint. You can auto-import your drives so you don't lose any data. If however you are happy with your system the way it is, you could stay that way until 8.1 comes out.

1. *8.1 -> 8.2 ;) (the decision from on-high was to brand the FreeNAS version according to the FreeBSD version it was running).
2. "format compatible"? The problem is ultimately a design caveat with southdb because of how we generate the database files. william could provide better insight than me into the technical details.


It's too bad the 8.0.3-RC1 doesn't have the same easy entry into the shell as the trunk version has from the webpage, that would be a great addition. I can wait until 8.1 or 8.2 release, it just makes entering a simple command so easy vice opening up an SSH window.

You reminded me about filing a few bugs related to that. The problem with 'accessing the CLI via the GUI' is that interrupts handlers aren't implemented, so hitting ^C, ^T, etc doesn't work and the command ends up executing indefinitely in the background via python. Seems like a really bad idea ;)..


I also wanted to thank you again for all your work in helping up get minidlna implemented, even as a hack, for those of us who really wanted FreeNAS to sever as a DLNA server too.

No problem :).


I also see you have a multimedia version (directory) setup in the downloads. Nice to see that.

Yeah. Running one final test on a rototill of the end2end-build.sh script so that people (including iX) can hook in ways of executing pre-build patching, etc in order to get things to work, setup more stable/well-documented 'APIs' with which people can override in included 'config-files', etc. It's funny how a script that was intended to just be a stopgap solution turns into something more.

joeschmuck
12-18-2011, 05:39 AM
It's funny how a script that was intended to just be a stopgap solution turns into something more.
:) isn't that the case most times. Good Luck.

sonisame72
12-18-2011, 08:07 AM
Thanks for update, I will wait for 8.1, The r8759 seems fine and stable. Current minidlna seems to be working fine with windows machine, sharp smart tv, few of android devices(some use as old as froyo OS), ps3 and a western digital live media player.

Thanks

gcooper
12-18-2011, 11:45 AM
Thanks for update, I will wait for 8.1, The r8759 seems fine and stable. Current minidlna seems to be working fine with windows machine, sharp smart tv, few of android devices(some use as old as froyo OS), ps3 and a western digital live media player.

Excellent! If you could document how you got things to work with your PS3 and to what extent they're working (i.e. certain media types, etc), that would be extremely helpful (I've tried to no avail to get my Sony BluRay player to work).

joeschmuck
12-18-2011, 12:21 PM
The PS3 accepts many video formats but I use the vob/mpeg2/mpeg4/avi formats. PS3 has never been an issue and will see the media server automatically, nothing to configure at all, but when you start looking at things like DirecTv, those are not DLNA compliant and where Serviio or MediaTomb would come in with transcoding. Let me know the model of your player, but if it's DLNA compatible then you just need to make sure you are in a supported format. Mpeg2/vob should work.

EDIT: Does the Sony player display the server at all? If so and it doesn't display the media then it's probably in a non-compatible format.

sonisame72
12-21-2011, 07:09 PM
I will post some basic documentation and ps3 screenshot(s) of my freenas media server.

Its been running fine, I have not tried all the files but the basic ones like mp3, jpeg, vob(dvd), avi(divx) seem to be working fine on ps3. I will try mkv's with ac3 or dts audio (i need to go wired for those large files, wirelessG on ps3 is too weak for my setup) and some of those .ts or .tp files from my hd camcorder to see if all works.

gcooper
12-22-2011, 10:43 AM
@joeschmuck: good news!



mi 2011-12-22 19:12:41 UTC

FreeBSD ports repository

Modified files:
net/minidlna Makefile
net/minidlna/files BSDmakefile patch-aa
Log:
Cast a size_t variable to ssize_t to prevent negatives being interpreted
as huge positives. Bump PORTREVISION.

Explicitly turn off the "deprecated-declarations" warning, which allows
to delete the NO_WERROR setting from BSDmakefile.

PR: 162526
Submitted by: Wes Santee

Revision Changes Path
1.5 +1 -0 ports/net/minidlna/Makefile
1.4 +1 -2 ports/net/minidlna/files/BSDmakefile
1.3 +1 -1 ports/net/minidlna/files/patch-aa


I could update the port to bleeding edge again in the nightlies if you want.

joeschmuck
12-31-2011, 12:28 PM
I just bought a Sony BDP-580S Blu-Ray Player which has great support for DLNA but it's file support is a little limited. If anyone is going to buy a DLNA player, Sony has the DLNA certificates for comparability/features over most other brands. I'm still testing it but the only file format that doesn't stream well was m2ts (HD content) where it has burps in the stream but my PS3 handled it just fine. I'm still testing.

The posting here is to show that minidlna is working fine.

@sonisame72,
I could not get mkv files to run on my PS3 at all. If you figure it out, please PM me.

cubix
01-03-2012, 08:36 PM
Just a note that PS3, Roku SoundBridge and my android phone all work without issue.

I'm tinkering around with transcoding but looks quite messy - serviio might be a better option for those who 'need' transcoding - or convert your media (ie; mkv to m2ts for the ps3)

A big thank you to joeschmuck and gcooper for their help.

gcooper
01-04-2012, 02:30 AM
Just a note that PS3, Roku SoundBridge and my android phone all work without issue.

I'm tinkering around with transcoding but looks quite messy - serviio might be a better option for those who 'need' transcoding - or convert your media (ie; mkv to m2ts for the ps3)

A big thank you to joeschmuck and gcooper for their help.

Thanks again. And if you do in fact have tips/tricks on how to set things up with your PS3, please share. I can create a HOWTO that documents how to set up a PS3 to work with FreeNAS (and probably wash-rinse-repeat for my BluRay player if there's something special that I missed), but in order to do that, I need guidance as my time in this space is kind of limited.

Also, again.. if people want transcoding and can clearly document how either mediatomb or serviio works via the command line or a series of easy to create .conf files, I am more than happy to replace minidlna with one of those two options. I just couldn't find any HOWTOs online the last time I looked or documentation (without diving through source code, which I quite frankly don't have the time to do nowadays for non-essential tasks) for either mediatomb or serviio. All of the media stuff in FreeNAS 0.7 is a dead end in the opensource community and can't be used as a viable solution in FreeNAS, so that's why I mention the two previous projects.

/me is just annoyed that mediatomb absolutely requires a webserver to function -- even when it displays a "go away -- the webserver interface is off in the configuration database!" webpage.. *grump*

joeschmuck
01-04-2012, 11:53 AM
@gcooper
There is no setup for the PS3. It needs to be connected to your network of course and FreeNAS (with minidlna) must be running. It will be recognized under the Video section, same place where DVD/Blu-Ray shows up. When it comes to other DLNA devices like my Sony player, again no configuration, it just shows up.

The big part is really what file formats are compatible with each device and I'm not sure that would be a FreeNAS topic but you could create a listing of devices and what are the compatible file formats. I choose VOB (MPEG2) format as it appears compatible for everything. When dealing with HD content it gets tricky and the end user needs to find a format that works for their equipment. I haven't found a single HD format that works everywhere. For my Sony player, m2ts works fine providing you have the proper audio stream encoded.

gcooper
01-04-2012, 12:49 PM
@gcooper
There is no setup for the PS3. It needs to be connected to your network of course and FreeNAS (with minidlna) must be running. It will be recognized under the Video section, same place where DVD/Blu-Ray shows up. When it comes to other DLNA devices like my Sony player, again no configuration, it just shows up.

The big part is really what file formats are compatible with each device and I'm not sure that would be a FreeNAS topic but you could create a listing of devices and what are the compatible file formats. I choose VOB (MPEG2) format as it appears compatible for everything. When dealing with HD content it gets tricky and the end user needs to find a format that works for their equipment. I haven't found a single HD format that works everywhere. For my Sony player, m2ts works fine providing you have the proper audio stream encoded.

Ok. The other annoying thing is that with enough files the older version [on 8.0.3] would crash hard when streaming the list (it might have been some unicode character escaping fun because I have some Japanese and Korean music on my machine at home..).

joeschmuck
01-04-2012, 01:34 PM
I rename my files that I obtain from other means to remove all those special characters as they give me difficulties at times too. I don't know if there is a maximum limit for number of files or if there is, I haven't reached it. Maybe I should dump my daughters 40+GB of music to the NAS and see if it likes it. Hey, my daughter actually buys most of her music and bought a real CD the other day. Who knows how long it will be before she scratches the hell out of it or loses it. Glad it wasn't my money this time.

Let me know how many songs you have and I'll try to replicate the problem.

gcooper
01-04-2012, 03:05 PM
I rename my files that I obtain from other means to remove all those special characters as they give me difficulties at times too. I don't know if there is a maximum limit for number of files or if there is, I haven't reached it. Maybe I should dump my daughters 40+GB of music to the NAS and see if it likes it. Hey, my daughter actually buys most of her music and bought a real CD the other day. Who knows how long it will be before she scratches the hell out of it or loses it. Glad it wasn't my money this time.

Heh. I bought $3k worth of CDs from Best Buy after my fakeRAID -- that I thought was doing RAID5 but wasn't -- died on me :).


Let me know how many songs you have and I'll try to replicate the problem.

68.4GB, but it's also other media like pictures and movies that minidlna chokes on. The Sony media interface really sucks balls compared to the Xbox 360 interface.

cubix
01-04-2012, 03:08 PM
I'm at about 10,000+ media items and i can view all songs in one list. It does take some time to populate

edit:
15,000 music files
2,000 video files
9,000 image files

zdv
09-08-2012, 01:10 AM
Hello, All

I can`t config miniDLNA to play .mkv by my DLNA TV. I have started new thread and no one can not help me.
TV play mkv from USB storage correct, but via DLNA protocol not. TV play only .TS files via DLNA

Other DLNA client does not play .mkv via miniDLNA too.

if anybody know how to config miniDLNA to play mkv, please help.

versions:
FreeNAS 8.2 amd64 + minidlna-1.0.24_1-amd64

joeschmuck
09-08-2012, 02:50 AM
Hello, All

I can`t config miniDLNA to play .mkv by my DLNA TV. I have started new thread and no one can not help me.
TV play mkv from USB storage correct, but via DLNA protocol not. TV play only .TS files via DLNA

Other DLNA client does not play .mkv via miniDLNA too.

if anybody know how to config miniDLNA to play mkv, please help.

versions:
FreeNAS 8.2 amd64 + minidlna-1.0.24_1-amd64

Just a few questions and answers for you...

1) Are the mkv files listed on your TV? If yes then MiniDLNA is working fine, If No then MiniDLNA may not be working properly.
2) What other clients have you tried to use that support mkv files?
3) I have a nice Samsung TV that plays mkv files but not through to TV's DLNA Source Input, that input fails. I must use the AllShare application in the SmartHub, then everything is transcoded properly.

If this does not help, please answer the questions above and post any further details about the problem you are having. Do not assume we know anything is the best approach.

-Mark

zdv
09-08-2012, 11:28 PM
joeschmuck
thanks. I found that my TV read only transcoding stream via DLNA