How to: Configure Mediatomb/DLNA on Fedora 12 to work with a Samsung TV

I just purchased a Samsung LN46B650 TV and decide to play with the DLNA capiblities of the TV.  The TV come with a CD containing a Windows DLNA server but because I am a geek, I dont have a Windows machine in my house.  I though that since DLNA is a standard that it would be easy to use any DLNA server to host content for my TV.  Well I was partly right.  After reading several forum post I have successfully got everything working on my Fedora 12 netbook.  I will most likely be doing this on a Ubuntu machine at some point at which time I will update this post.

Step 1:
Assuming that you have a working Fedora 12 system that is connected to the same network as your TV make sure that you have port 50500 open or just disable your firewall (your choice).  You can manage this by going to System > Administration > Firewall

Step 2:
Open a terminal and do a yum install mediatomb.

Step 3:
Login as root and using your favorite text editor, open the /etc/mediatomb.conf file and modify the following parameter:

Enter the correct network interface for mediatomb to communicate to. In my case I am using the wireless connection of wlan0

## Network interface on which the server will run, you need to edit this!
MT_INTERFACE="wlan0"

There are other options that you can configure in this file but the network interface is the only on the I had to modify.

Step 4:
As root open a terminal and run mediatomb. This will start the software and configure the sqlite database and setup the default config.xml file that we are going to need to modify. Once the software is running go ahead and hit ctrl-c to exit from the software because we need to modify that config.xml file

Step 5:
With out this step your TV will be able to browse the content but not be able to do anything with it.
Also as root, edit the file /root/.mediatomb/config.xml
Look for the section:

<!–
<custom-http-headers>
<add header=”X-User-Agent: redsonic” />
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
–>

and change to to this

<custom-http-headers>
<add header=”X-User-Agent: redsonic”/>
<add header=”transferMode.dlna.org: Streaming”/>
<add header=”contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000?/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>

Now save the file.

Step 6:
In the terminal windows as root type mediatomb to start the application.

Now you should be able to connect to the Mediatomb webpage and start adding content to share via DLNA. Typically this is on port 49152 or 49153. You will be able to get this infomation from the lastline of output given when you run mediatomb from the command line.

Step 7:
To play videos you may have to re-tag the MIME information to video/mpeg. You can do this in the web interface. Once you have added a video to the database click on the notepad/edit button and change the mimetype to video/mpeg. There is also an option in the config.xml file where you may be able to do this globally for all media. I have not tried this yet and will update this post once I have.

Step 8:
Instead of having to start mediatomb manually each time you reboot there is also a daemon that you can start via /etc/init.d/mediatomb. If you plan on using this in daemon mode you will need to configure it by doing this:
Start the daemon so that it will install the default config files and sqlite database

root#  /etc/init.d/mediatomb start

Then go to /etc/mediatomb/config.xml and make the changes that you made above. Once you have made these changes restart the mediatomb daemon

root# /etc/init.d/mediatomb restart

Now you can go to the web interface and start adding content.

Please let me know if you have any other experiences connecting to your Samsung TV with mediatomb or any other DLNA server. Also please leave a comment if you have found this guide useful or if you see any correction that I need to make.

Also to give credit where it is due here is where I got some of the information above Cnet Forum Post

10 thoughts on “How to: Configure Mediatomb/DLNA on Fedora 12 to work with a Samsung TV

  1. Hi Terry

    Thanks a lot for the steps provided – My Samsung TV is able to browse but cannot play the AVI files that I have in my Fedora 12 PC. I am however having great difficulty in getting this to work – Please let me know or email me your config.xml file and exact path it should be in – I really appreciate your patience with this…

    Kind regards,

    Niraj (Sydney)

  2. Unfortunately I just formated my netbook, which is where I had Mediatomb installed on but I will try to help you out as best as possible.
    Your config.xml file could be in one of two places. If you are running mediatomb as a service then the config.xml file will be int he /etc/mediatomb directory. If you are running it as root then it is located in /root/.mediatomb/ directory.

    To fix your AVI issues:
    If you added the custom headers and made sure that you removed the that is around the custom headers section. Then go to the mediatomb web interface and select the avi file that you want to play and click the edit icon and change the mimetype to video/mpeg. Even though its an AVI for some reason the TV has to think its a mpeg.

  3. Hi Terry,

    Thanks for your patience and cooperation. Also thanks a lot for the steps provided, I am running as a service. I don’t like it, but there is a machine(WinVista64) on my WI-FI network that does the job with(Nero MediaHome 4). Please, I want MediaTomb & Linux F14.

    Two more question please:
    1-> Do you have any change for recent release of fedora, that is F13 or F14?
    2-> Sorry I did not get it to work with the LG 42LE5500, any suggestion?

    Kind regards,
    Lucélio(Brasil)

  4. @Lucelio Freitas
    Sorry I haven’t tried to use this in Fedora 13 or 14. Actually I haven’t used MediaTomb since writing this article. I now have an actual HTPC that I have connected directly to my TV.

    I have that you find an answer to your question. Possible check out minidlna as recommended by @trapster.

  5. I can confirm that these instructions work for Centos 6 (based on Fedora 12/13). However, the Mediatomb config files are in different locations (/etc/sysconfig/mediatomb and /etc/mediatomb/config.xml).

    Also, thanks a ton for the tip on editing files to “video/mpeg”! This fixed the problem I was having with MKVs not streaming… it works flawlessly now! :)

    Instead of editing the hundreds of files I have in the Mediatomb web-GUI, I simply edited the config.xml file to make MKVs as video/mpeg… then I removed and re-added my directories to Mediatomb so that they were rescanned.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>