14

I've tried a few DLNA servers (including MiniDLNA, uShare, MediaTomb, Rygel), but none of these works as expected. The problem with MiniDLNA is that most of the shared content simply didn't appear on the TVs list or if they appeared the TV couldn't play them (unsupported or unregistered format). uShare didn't want to work. First i runned it manually using the screen ushare -c /mnt/Films/ --content /mnt/Music/ --content /home/savanweylyn/Képek, and it was working well. After i configured it with sudo dpkg --reconfigure ushare, it suddenly stopped working. The error message on the TV was 'no media detected'. MediaTomb was removed pretty fast, because it was hard to configure and the TV didn't even detect it. And finally: Rygel. I absolutely don't know how to configure it.

So please could you tell me an easy-to-use DLNA server for a GUIless server?

user275214
  • 164
  • 1
  • 1
  • 9

5 Answers5

24

The simple way is to use MiniDLNA, because it should be on Ubuntu repositories and it is a simple tool.

You can try all DLNA apps and still your TV is not going to run some file types. You need to check what type of files your capable DLNA TV support.

I recommend you to check the Community Wiki entry on how to configure MiniDLNA or watch an instructional video. Very simple and straight forward.

For MiniDLNA follow these steps:

  1. Install MiniDLNA

    sudo apt-get install minidlna
    
  2. Edit configuration file

    gksu gedit /etc/minidlna.conf
    
  3. Add the following text to the file. Replace the folders name by the ones you use. You can just use one type if you want.

    inotify=yes
    media_dir=P,/home/user/Pictures
    media_dir=V,/home/user/Videos
    media_dir=A,/home/user/Music
    media_dir=/home/user/Videos
    friendly_name=UbuntuDLNA
    
  4. Then restart the service to apply changes

    sudo service minidlna restart
    
  5. Make sure the file list is rebuild

    sudo service minidlna force-reload
    
Peter Ark
  • 463
  • 3
  • 9
2

Well, how about trying Universal Media Server, a fork of former PMS server, and see how it goes.. comes with a free web interface and a pretty adequate help support as well. Had it in 14.04 64 bit, worked like a charm to like almost 95% of video formats tested to a Panasonic Tv, and 99% to a Samsung.

1

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:

  • FILENAME EXTENSIONS:

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.

  • REBOOT SERVER:

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.)

  • REBOOT CLIENTS:

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.)

  • PERMISSIONS:

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."

0

You have to understand what the different media apps do.

MiniDLNA only serves up teh files, no conversion, so the file types and formats must meat the playing devices requirements. Not all MP3's for instance are the same, some many encoding schemes, bit rates and types. So all files should be the same type, format etc to meet all players requirements.

You can use one of the media server apps that has conversion so no matter the audio format will convert to the players format. However this takes a good bit of processing so best to have a good speedy computer.

Gryu
  • 8,002
  • 9
  • 37
  • 53
MWC
  • 1
-1

The functionality is built-in to Ubuntu since 19.10. Just go to Settings → Sharing and enable Media sharing.

Ref: https://www.omgubuntu.co.uk/2019/10/ubuntu-dlna-media-sharing-server