Here's a list of the gotchas that I came across and overcame when working with a couple of DLNA servers and clients. Keeping the below list in mind, I no longer have issues viewing my files.
The following affect media visible to clients:
The DLNA client should indicate which types of
media they support (i.e., read their help menu and/or manual). For
example, one player might understand m4v and mp4 extensions (e.g.,
PlayStation), while another only understands mp4 (Roku), even though
the file is encoded the same for either extension. Thus, you might
have to change the filename (e.g., to mp4 for Roku) or just create a
symbolic-link to the (m4v) file and name the symbolic-link with the
correct extension (mp4).
Another example, this time on the audio side, my Roku will play
lossless "flac" files, but my PS3 won't and requires "wav", instead.
I've not needed this for minidlna, but I did have an
ASUS router that had a built-in DLNA server. Restarting the service
was usually enough, but on occasion I even had to reboot the router,
followed by toggle the DLNA service. (This is why I switched to
minidlna.)
Some DLNA clients (PlayStation 3) may need rebooting
to see the DLNA server and/or changes in media on the
server-side. (Yes, weird, but true.)
Ensure path and filename on media server are accessible
to server user (e.g., "minidlna"). Just because you enter the path
into /etc/minidlna.conf doesn't make it magically work if user
"minidlna" cannot traverse the path ALL THE WAY to the files'
directory, including ensuring having file-level access.
This means, directories not owned by minidlna but needing to be traversed can be set to NOT allow read/write by others (minidlna) but ALLOW traversing ONLY:
chmod o+x-rw /home/myUserName/
Directories that CAN be browsed by the public (minidlna) are set readable:
chmod o+rx-w /home/myUserName/videos/
And finally, all files/folders are recursively set publically readable inside "videos":
find /home/myUserName/videos/ -type d ! -perm 0775 -exec chmod -v 0775 {} \;
find /home/myUserName/videos/ -type f ! -perm 0444 -exec chmod -v 0444 {} \;
- CONVERT MEDIA NOT SUPPORTED:
I had a bunch of AVI files (as well as other formats) that my Roku wouldn't display. With "handbrake" I can pretty much convert my media to MP4 files. I also use command-line tool ffmpeg for either video or audio conversions, although ffmpeg doesn't always convert my AVI-to-MP4 files successfully.
- RESTART SERVICE AND REBUILD DATABASE:
After all is said and done:
sudo service minidlna restart
sudo service minidlna force-reload
NOTE: It also helps to have "inotify=yes" in /etc/minidlna.conf to ensure "Automatic discovery of new files in the media_dir directory."