How to Install MiniDLNA on FreeNAS 9.3 (Prior to Plugin)

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
ok... it wirks now....
what I have done is:
1) Deleted all jails I had
2) change the "jail" directory in the configuration
and then i could add all the jails with the standard template...

MiniDLNA is installing at the moment... :D
That is one way to do it.
 

JohnKnee

Dabbler
Joined
Aug 24, 2011
Messages
43
@joeschmuck
Thanks I have been using your guide and minidlna for sometime now. I was 'messing with my jails' and badly messed up my minidlna install (it was at version 1.1.4_1,1). So I decided to start again from scratch. This time it installed version 1.1.5,1. This worked well with your instructions but I noticed that after sometime my devices could no longer access the server even though you could access the server webpage at port 8200.

After some searching, it appears that the new version of minidlna-1.1.5,1 has trouble getting multicast packets behind a jail. See https://groups.google.com/forum/#!topic/mailing.freebsd.ports/DRhjVkZmdvk

There is no fix for jail users yet, but it will work (from above bug report)

1. If you already queued any files on your UPnP client they will play correctly.
2. If you leave you UPnP client open for some time it will eventually find your server.
3. If your UPnP client is already open restarting minidlna will make it visible.

I noticed that the waiting time varied from a few seconds to few minutes. This did not work for me so I tried to go back to version 1.1.4_1,1. That was a lot harder for me to do as I am a freebsd newb, but this is what I did in case someone else wants to downgrade or install the old version in the first place. The minidlna ports are available at http://portsmon.freebsd.org/portoverview.py?category=net&portname=minidlna

I ended up deleting my jail and started from scratch. At Step 20) I had to modify the steps to

20a) fetch http://pkg.freebsd.org/freebsd:9:x86:64/quarterly/All/minidlna-1.1.4_1,1.txz
20b) pkg install minidlna-1.1.4_1,1.txz

At this point it will now install the 1.1.4 version and the rest of the guide works as is.

Again many thanks for this guide.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
@JohnKnee
Sorry to hear about the the trouble you had, but at least your damage sounds like it was contained to a jail vice your entire pool (that would be bad). Thanks for the additional information, I'm certain if someone else runs into the same predicament running the newer version of MiniDLNA, your instructions will help them out.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
It has to be something with how I have everything configured.. Or just too many files.. It's doing it no matter how many directories.. Still.. I might try an older pbi I have sitting here the 1.1.1_5.. Haven't even looked to see whats been going on lately with it..

Edit: of course turning off inotify seemed to stop the crash after the scan completes.. My mileage has veried with inotify.. It works but there's something wrong with my setup locally.. Maybe because.I have datasets etc I'm just not sure.. Can plex be used for upnp/pass through only?

[2016/01/07 06:21:33] playlist.c:125: warn: Parsing playlists...
[2016/01/07 06:23:08] playlist.c:259: warn: Finished parsing playlists.
[2016/01/07 06:45:33] upnphttp.c:1238: error: send(res_buf): Broken pipe
[2016/01/07 06:50:28] minidlna.c:1222: error: select(all): Bad file descriptor
[2016/01/07 06:50:28] minidlna.c:1223: fatal: Failed to select open sockets. EXITING
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Can plex be used for upnp/pass through only?
I don't know, I've never used Plex for music. I would think as long as you had DLNA turned on that it would work. Do you need me to test it out?
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
I turned off inotify it's stable again for now.. Ill try again to get inotify going in the future..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Ill try again to get inotify going in the future..
When FreeNAS 10 comes out you will be able to install Linux and then MiniDLNA and not a crappy port of MiniDLNA. Things should work fine then, you just need to wait a few months.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
I know its running and stable now just wont show on clients..

EDIT: I ended up having to delete minidlna again.. Will come back to it again in the future..
 
Last edited:

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
I'm stuck on line 23/24. Having pasted 'ee minidlna.conf' the shell tells me I'm working on a new file. A search does not find the text for the next step - 'media_dir=/opt' - so that I cannot edit it to 'media_dir=/media' and proceed from there. Any ideas? Thanks.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Did you skip step 22 which changes the directory you are in?

If you are still in the editor, press ESCape and tell it you do not want to save the file. If you already saved the file, you may need to go delete it but likely it will cause no problems.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Yes I did change the directory and no I didn't save and simply exited the editor.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If "minidlna.conf" is not in the /usr/local/etc/ directory then I'd recommend you delete the jail and start over. Pay attention to steps 20a through 21a and make sure MiniDLNA is actually installed. If you have some warnings that you do not understand, please post that data and we will see what is happening.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Thanks Joeschmuck. Apologies for delay in responding and thank you for the swiftness of your replies. No, 'minidlna.conf' is not there, so I'll start again as per your recommendations and post the results.
 

JohnKnee

Dabbler
Joined
Aug 24, 2011
Messages
43
Just to update everyone. The recent release of minidlna 1.1.5_1,1 has fixed the issues I was having with the server not showing up on the network. I just updated my minidlna jail using

pkg update
pkg upgrade

You will have to redo step 29-32 after the upgrade. To check the version of minidlna, just type

minidlnad -V

Thanks everyone.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Just to update everyone. The recent release of minidlna 1.1.5_1,1 has fixed the issues I was having with the server not showing up on the network. I just updated my minidlna jail using

pkg update
pkg upgrade

You will have to redo step 29-32 after the upgrade. To check the version of minidlna, just type

minidlnad -V

Thanks everyone.
Thanks for posting that tid-bit of information. I'm sure it will be useful for anyone with MiniDLNA currently installed.

Here is what should be fixed with the upgrade but I personally haven't upgraded so I can't say how well the port worked:

1.1.5 - Released 10-Sep-2015
--------------------------------
- Re-enable Samsung DCM10, which adds video bookmarks and "BasicView" support.
- Allow SSDP M-SEARCH from other subnets.
- Fix some nfo file character escaping.
- Fix crash with >3 network interfaces.
- Support rotation of monochrome JPEGs.
- Handle cover art streams that come after the video stream.
- Recognize new hard links with inotify.
- Work around LG TV ordering bug.
- Implement TiVo image PixelShape support.
- Support thumbnail rotation.
- Use "Album Artist" tag from AAC files.
- Add Korean translations.
- Fix handling of bad FLAC files.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Deleted and reinstalled as per joeschmuck's instructions and all working well. Many thanks joe. As for JohnKnee's post, the shell doesn't recognise the command 'minidlnad -V'. Is this after 'jls' or at root?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
'minidlnad -V'
This would need to be done while your inside the jail, after the jexec command, but his posting only applies to old installations, not your new one. And glad it all worked out for you.
 

Ziggy

Contributor
Joined
Oct 7, 2015
Messages
157
Thanks joe. Am curious so another question: on jan 13 you wrote 'When FreeNAS 10 comes out you will be able to install Linux and then MiniDLNA and not a crappy port of MiniDLNA'. I'm sure instructions will be available on the forum or in docs, but will Linux run in a jail on 10 or how will that work?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
From what I've been told, Bhyve will be able to run other OS's so this means you could run your favorite flavor of Linux and install MiniDLNA and inotify "should" work properly. Right now we still have basically half a year before FreeNAS 10 comes out, I heard it got delayed another month but that is fine providing the product is stable when it does come out. And yes, I will more than likely create a new thread for when that time comes and post a link in both threads to reference each other. I've never used Bhyve so it will be a new experience for me but I'm a fast learner. And if someone has a preferred Linux variant, I'm all ears. I myself like Ubuntu but then again, I'm not a Linux guy either.
 
Top