Bosse_B
Posts: 834
Joined: Thu Jan 30, 2014 9:53 am

Config question for MiniDlna (RPi4)

Thu Sep 19, 2019 7:38 pm

I am setting up an RPi4 (2GB RAM) as a DLNA server on my home network to serve out videos to my SmartTV.
But I am having problems configuring the minidlna server to show the media sensibly...
I want a single selection box to appear when I go to the RPi4 media on my LG smart-TV, but instead I am being shown no less than 3 different choices:
"All Video"
"Folders"
"Recently Added"
I just want there to be one single selector "Videos" which will show up the videos and subfolders at the top of the video store.
Is this possible?

Here is my current /etc/minidlna.conf file (only active lines shown):

Code: Select all

media_dir=V,/home/pi/Videos
merge_media_dirs=no
db_dir=/var/cache/minidlna
log_dir=/var/log
root_container=V
port=8200
friendly_name=RPi4 Media
inotify=yes
Bo Berglund
Sweden

Kendek
Posts: 127
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 6:02 am

Bosse_B wrote:
Thu Sep 19, 2019 7:38 pm
I just want there to be one single selector "Videos" which will show up the videos and subfolders at the top of the video store.
Is this possible?

Code: Select all

root_container=B

Bosse_B
Posts: 834
Joined: Thu Jan 30, 2014 9:53 am

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 8:35 am

Thanks, that brought me right into the specified folder and I could navigate the subfolders as intended. :D

Just one additional (minor) question:
Now all folders within the top folder are shown including log and php (the video store is a website too)...
If I navigate into them there is no media shown (empty folder) so that is OK, but is there a way to hide some folders from view?
I have some that are not part of media like log, php, streams etc.
Bo Berglund
Sweden

Kendek
Posts: 127
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 10:04 am

Bosse_B wrote:
Fri Sep 20, 2019 8:35 am
Now all folders within the top folder are shown including log and php (the video store is a website too)...
If I navigate into them there is no media shown (empty folder) so that is OK, but is there a way to hide some folders from view?
This is the Browse Directory container, which is similar to the standard file sharing, but hiding any non-media files (since only the media files are indexed). If you want a clean view, just set the wide_links=yes and create a new root directory with symlinks in it.

Bosse_B
Posts: 834
Joined: Thu Jan 30, 2014 9:53 am

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 10:33 am

Kendek wrote:
Fri Sep 20, 2019 10:04 am
Bosse_B wrote:
Fri Sep 20, 2019 8:35 am
Now all folders within the top folder are shown including log and php (the video store is a website too)...
If I navigate into them there is no media shown (empty folder) so that is OK, but is there a way to hide some folders from view?
This is the Browse Directory container, which is similar to the standard file sharing, but hiding any non-media files (since only the media files are indexed). If you want a clean view, just set the wide_links=yes and create a new root directory with symlinks in it.
Thanks a million!!
Yes I had already thought of the symlinking so I created a dir ~/dlna into which I symlinked the video dirs.
It all seemed to work well except when I clicked on a file name it would not play!
So scratching my head I returned to this thread only to find your solution already present! :D
The wide_links=yes setting fixed it totally!

So now my mini-dlna works just fine!
Thanks again for your help!
Bo Berglund
Sweden

Bosse_B
Posts: 834
Joined: Thu Jan 30, 2014 9:53 am

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 2:24 pm

Unfortunately I have run into another problem with the sym-linked configuration:
When new videos are added into the original directories they do appear when I do an ls inside the symlinked dir as well as in the original dir.
But on the SmartTV the new videos do not appear at all! Only the previously existing are listed.

I have thought that maybe it is because it takes some time to propagate via dlna, but no.
I have now waited several hours and they simply do not appear. I only see the videos that were there at the time I reconfigured minidlna.

Why is this and is there a way to remedy it?

EDIT:
I just checked with my Samsung Galaxy S7 phone via the VLC app and there I could see the new files. And the changed friendly name of the minidlna server.
I also turned on my other LG SmartTV to have a look and on that the old configuration of DLNA appeared (I had renamed the server as part of the edits to have a better friendly name). So on this TV the old server was still used, but here the file lists were jumbled such that files not in a dir was still listed in the dir...
How very strange. How can a file exist when looked at from one device and not from another and how can a server be viewed which has been replaced?
Bo Berglund
Sweden

Kendek
Posts: 127
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 3:36 pm

I tested it, and the inotify is working well with symlinks. Maybe do a

Code: Select all

service minidlna restart
when the LG TV is on, and see if the new server appears. You can do a refresh on the clients as well, so the new files should be there.
I have a Samsung TV, so I changed the notify_interval's value to 90000 as a workaround. But even with this setting, the TV's DLNA client tracks the changes.

Bosse_B
Posts: 834
Joined: Thu Jan 30, 2014 9:53 am

Re: Config question for MiniDlna (RPi4)

Fri Sep 20, 2019 7:01 pm

Kendek wrote:
Fri Sep 20, 2019 3:36 pm
I tested it, and the inotify is working well with symlinks. Maybe do a

Code: Select all

service minidlna restart
when the LG TV is on, and see if the new server appears. You can do a refresh on the clients as well, so the new files should be there.
I have a Samsung TV, so I changed the notify_interval's value to 90000 as a workaround. But even with this setting, the TV's DLNA client tracks the changes.
I have notify_interval=300, but I don't know what it is for...
Notify whom of what?

I unplugged power to one of my LG TV:s and then plugged it in and switched it back on. Then I also restarted the minidlna service on the server.
After this the recently added files were visible. I have not been able to do it on the main TV because it is in use...

Concerning "refresh on the clients" that would be on the LG SmartTV, but I can for the life of me not find any such command anywere.
I notice that VLC seems to do just that whenever one opens the UPnP dialogue. Would be good if the TV also had that functionality....
Bo Berglund
Sweden

Return to “General discussion”