MiniDLNA not quite working in 9.1.1

Status
Not open for further replies.

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
Hey guys, long time, no chat.

I've just upgraded my 8.0.3 install to 9.1.1, and let me just say, that was awesome. Since I hate optical media with a passion that burns like a thousand stars, I elected to install from the ISO directly to the thumb drive, and then put the thumb drive in the NAS box. Worked without a hitch. I will do that in the future.

However, I'm playing with plugins. Specifically MiniDLNA. I was very frustrated last night because whatever I did, I could not get videos to show up. I could get pictures working properly, but not videos. I was going to test some more tonight, and then post my configs here, however one of the things that I did had MiniDLNA working using the configuration file I created in the FreeNAS interface.

So now where I stand is I can get MiniDLNA working if I go in to the jail and use the command,

Code:
minidlnad -d -f /usr/pbi/minidlna-amd64/etc/minidlna.conf -R


I forget where in my Internet search I found that as a recommendation, but I found it, I ran it, and everything works like a charm. I verified that configuration file, and it is the one that FreeNAS is writing to.

If I try to start the service via the FreeNAS Plugins GUI, it starts, but will never ever present videos. So here is my configuration.

Friendly Name: NetworkMedia
Media Directory: /media/
Port: 8200
Discover Interval: 895
Strict DLNA: Unchecked
Model Number: 1
Serial Number: 12345678
Rescan Restart: Checked
Aux Parameters: media_dir=V,/media/videos

Config according to cat /usr/pbi/minidlna-amd64/etc/minidlna.conf

media_dir=/media/
port=8200
inotify=yes
enable_tivo=no
strict_dlna=no
notify_interval=895
friendly_name=NetworkMedia
model_number=1
serial=12345678
media_dir=V,/media/videos

I have verified that this is the configuration file that the FreeNAS GUI is modifying. I used the friendly_name field to test this. So started in FreeNAS, this configuration presents me with nothing (thought if I had the pictures directory specified, I would see the pictures), started in the jail, this configuration works fine (and would also show me pictures if it were configured to do so).

I'm not getting any errors on the FreeNAS side. I'm not getting any errors in the jail side. It's running, it's just borked. Thoughts and opinions?
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
I ended up just nohupping and &'ing the command and calling it a day. Though I would be interested to know if anyone has this working in 9.1.1. I'd like to control the service via the FreeNAS interface.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Thoughts and opinions?
Mount points, maybe? It seems a bit odd you are pointing to /media and then /media/videos. Typically it would be e.g. /media/pictures & /media/videos, but you didn't explain your storage. Was there anything interesting in the jail logs, messages or minidlna.log?
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
There don't seem to be any jail logs in FreeNAS actual. The minidlna.log is not being updated at all.

Regarding the config setup. I did try having just media_dir=V,/media/videos in the Media Directory section. That didn't do anything for me. Same issues. I really only care about videos, I just added pictures as a test. And pictures work great. Put media_dir=P,/media/pictures and it works just fine. Even along side media_dir=V,/media/videos. Videos just never show up. But to get more specific on the storage setup.

In FreeNAS actual I have /mnt/Codex/Movies, and in the jail I have /media/videos. Both are owned by the same user ID, 1002 in this case. In FreeNAS actual it shows the actual user name, in the jail it shows 1002. drwxrwx--- in FreeNAS, drwxrwxrw- in the jail. And that's that. It really seems fairly straight forward. Why it's not working (or logging) I couldn't say. I am befuddled.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
In FreeNAS actual I have /mnt/Codex/Movies, and in the jail I have /media/videos. Both are owned by the same user ID, 1002 in this case. In FreeNAS actual it shows the actual user name, in the jail it shows 1002. drwxrwx--- in FreeNAS, drwxrwxrw- in the jail.
AFAIK, 9.1.1 is using the proper port UIDs/GIDs, dlna:*:933:933. If nothing else 1002 is outdated. The no logging is quite odd. It doesn't even show scanning the pictures? Maybe the default logging options were changed? I haven't played around with the latest minidlna yet.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If you haven't already done so, I'd delete the dlna_1 jail (remove the plugin) and install it again. Do a simple setup of sharing just your movies content with the /media in the jail. Configure like you had before but leave the Aux Parameters empty. Now start the MiniDLNA application.

Once you prove you can get MiniDLNA to work in this way, then go mess with the aux parameters. I would also change the media directory to /media/videos or try to leave it empty if you are going to define it in the Aux Parameters section. And as usual, do not share the same source or destination locations when establishing shares for the jail. You know that doesn't work from the FreeNAS 8.x days. Heck, it's never worked properly.

EDIT: You know you don't really need to use the aux parameters, you could just put your shares under the /media/ area and point the MiniDLNA to /media, MiniDLNA will figure out which files are music and videos and photos based on the file extensions, as far as I have experienced. Let me know how this all works out.

-Mark
 

shanghaijo

Cadet
Joined
Oct 21, 2013
Messages
9
Hi,

I concur with Joeschmuck, this should work. It is important to have the user dlna 933 having enough permission to the pointed folder.

I am now having an issue with my configuration, I can see the file in the folder without any problem BUT the files in the sub-folders are not visible. I have been poking around for hours without a solution. Any idea?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Hi,

I concur with Joeschmuck, this should work. It is important to have the user dlna 933 having enough permission to the pointed folder.

I am now having an issue with my configuration, I can see the file in the folder without any problem BUT the files in the sub-folders are not visible. I have been poking around for hours without a solution. Any idea?
Be very descriptive here... List all the shares you have mounted in the GUI under Jails -> dlna_1 -> Storage.
And list the folder structure within the jail if you created subfolders under "/media" which is the default location.

This is typically the one place people get into trouble.
 

shanghaijo

Cadet
Joined
Oct 21, 2013
Messages
9
Hi Joeschmuck,

Happy to see such a specialist answering, those 2 days left me helpless!

here is my minidlna.conf

media_dir=V,/media
port=8200
inotify=yes
enable_tivo=no
strict_dlna=no
notify_interval=300
friendly_name=Media UPNP
model_number=1
serial=12345678
media_dir=A,/music
media_dir=P,/pictures

I've created with the shell inside dlna_1, \music and \pictures for which the permissions are given to dnla for user and group (\media already existed)
In the meantime, I mounted 3 points to my Datasets (respectively /Media/Video, /Media/Music, /Media/Pictures) with permission Owner dnla, Group Family (where I belong). I then chmod 777 all of them.


The access is no problem but if I copy a folder with music in it, it is not indexed, only the files directly in the dataset are indexed. I tried to make the permissions recurring but it didn't help.

thanks a lot

jo
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Jo,
Not sure I understand... Is your only problem when you add media into a shared directory and it does not show up through the MiniDLNA application (not available to DLNA services) ?

If this is the case, the answer is clear but if you have files in say /Media/Video/A_to_D/ and they are not showing up then it's different.

-Mark
 

shanghaijo

Cadet
Joined
Oct 21, 2013
Messages
9
Joeschmuck,

to be clearer:
in my folder, say Music, if I put an mp3 there, then it shows in the list. However, if I put a folder of an album, then I don't see or the folder or the files in the folder.
In a diagram: /Media/music/something.mp3 will show up in the list
/Media/music/MyGreatAlbum/somemusic.mp3 will not show up in the list
I am not sure if it is a normal behavior of minidlna or not.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
No, this is not normal as far as I know, or in other words I do not have that problem at all. But then again I only have videos under the /media folder.

Let me ask you this... What happens if you just share /Media in the GUI with /media in the jail then restart MiniDLNA. I do not restrict content type as you have but I should test out your scenario to see if there is a real problem that should be documented. I have had some issues with the new jails in 9.1.

When you define the V, P, or A you are forcing a restriction to limit the content to that particular type. So if you have a music video in your /music directory (something.mpg) , using the media_dir=A,/music setting, well the video content would not be visible. By setting up /media to hold all the content and you are leaving the auxiliary parameters empty, you will get all the content shared in it's appropriate place.

I hope my comments are clear.
 

shanghaijo

Cadet
Joined
Oct 21, 2013
Messages
9
Your comments are very clear, thank you for your time.

I actually started as you mention. I had /media with no definition on the content and sub-folders where not indexed. I then tried to separate them (V, A, P) hoping it would help but sub-folders stayed undiscovered.

Looks like I have to scratch my head longer to make that work. At least, I am glad to know it is not a normal behavior and, somehow, I am not searching for something that is not there from the beginning!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Well lets look at this...

1) Delete and reinstall MiniDLNA. Share only the /media folders like you were prior to using the V, P, and A attributes. If that works, great.
2) If that didn't work, maybe you have the permissions set incorrectly in your shares? Can you try to share one of the subfolders to see if that works?

When you install the dlna plugin it will create the dlna user. Maybe you should remove the user after you remove MiniDLNA and let it recreate the user again.
I'm sure it's something simple, we just need to figure it out.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
As joe said just work with the main path for MiniDLNA for now.. Anything in the main path will be fully scanned a/v/p..

I also added a request (I think) in features/bug area for username field to be added into the GUI for Readymedia1.1.0 / MiniDLNA1.1.0.. It will allow you to run as any user you choose to config.. I'm not sure if main usernames from base freenas install are carried forward into jails this should help resolve any permission issues if they do carry forward.. Username can't be appended to the bottom of the config (aux parameters).. It won't work that way..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Oh, also I don't know if this was fixed but a space in the path my not be tolerated. Use and underscore (/media/Music/Love_My_Music/).
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
It was not fixed as of 1.1.0.. Not sure what the problem is with the spaces..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
It's not MiniDLNA, it's FreeNAS.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
True.. I guess it is an issue with FreeNAS jail storage mounts probably the parsing of spaces?.. To be clear.. I don't mean no spaces in the actual music path.. I mean if I point videos to /TV Shows it will fail.. But if I point it to /tvshows it will mount.. Anything with spaces deeper after this works for me..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
That is correct. The mount point in the GUI is the point of failure, it cannot pass the value with a space in it. I know I put in a ticket for it and I believe it was fixed in the code, due to be in the next version published, or a nightly build when you can find one of those.
 
Status
Not open for further replies.
Top