View Full Version : Linux Media Server Build How Too


snuffy47
08-04-09, 12:55 PM
Hello

I am currently putting together a server to use as a central storage server and would like it to stream video.

Using older equipment
Asus AV8NX-X board
AMD 1800 XP
right now 512 Ram
20G drive for OS
looking at buying 2-3 1T or 500G drives
Raid not sure if card or linux raid

I downloaded ubuntu server but was unable to find a good how too doc to ues the terminal so i have downloaded ubuntu desktop
If there is a better solution out there let me know. I was going to use samba for the file sharing

Video streaming need input. I have tried to stream using a windows machine and VLC but could not get it to stream a mkv file.
Help needed here

How to setup my hard drives.
I currently have 2 20G drives to use for OS. Should I back the OS with another drive or just do a recovery disc?
My storage will consist of either 2-3 drives (500G to 1T each)
What is the best config for the money to ensure recovery and back up
2 drives in raid 1 with an external backup drive?
3 drives in raid 5

Thx

mythmaster
08-04-09, 02:06 PM
If you're just watching/listening to stuff in a windows box, then you don't need to stream with VLC. You can play the files via samba.

If you're streaming to other devices, this article should be helpful: http://www.geek.com/articles/chips/feature-linux-media-server-using-ubuntu-810-2009065/

EDIT: for backup, an external drive is the most reliable, but I don't think that I've ever had more than one drive fail at the same time, so RAID 5 is probably the most common solution

hiaig
08-04-09, 02:12 PM
Hello
I downloaded ubuntu server but was unable to find a good how too doc
Thx

You can always go to howtoforge. I love their tutorials.

http://www.howtoforge.com/perfect-server-ubuntu-9.04-ispconfig-2

Cheers

snuffy47
08-04-09, 06:28 PM
Okay I am going to do some reading tonight

I will update and sure to have more questions.

If I use the destop version of ubuntu is it possible to copy cfg files to a server install?

joebruin
08-04-09, 06:41 PM
The desktop version of ubuntu is essentially the same thing as the server version except it runs Gnome/X. If you are just planning on using it inside your house and not directly to the internet, use the desktop version.

snuffy47
08-05-09, 07:46 AM
I am using ubuntu server and the guide from http://www.geek.com/articles/chips/f...u-810-2009065/

I have made it to the part were I am to edit MediaTomb cfg

I am finding it alittle difficult to understand or find how to search and edit these cfgs

Using the http://www.howtoforge.com/perfect-se...04-ispconfig-2 I have installed the vim editor I believe.

Can someone give me a more noobie walk through on this step

Now let’s get MediaTomb configured so it will be up and running & you can tell it where your media directory is.

The MediaTomb config file is located at:
/etc/mediatomb/config.xml

Search for and make changes to the following lines:

<accounts enabled=”yes” session-timeout=”30″>
<account user=”admin” password=”yourpassword”/>

<name>GX50</name>

<protocolInfo extend=”yes”/><!– For PS3 support change to “yes” –>
<!– Uncomment the line below for PS3 divx support –>
<map from=”avi” to=”video/divx”/>

<!– Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 –>
<map from=”avi” to=”video/avi”/>

<transcoding enabled=”yes”>

<profile name=”vlcmpeg” enabled=”yes” type=”external”>

When done, save the file. Now restart MediaTomb by issuing the command:
/etc/init.d/mediatomb restart

tux99
08-05-09, 01:09 PM
You don't have to use 'vim' or even the console to edit these config files, you can use the Gnome editor (gedit) or any other editor you like.

If you don't have a graphical desktop installed try to use 'joe' which is a more user friendly text editor than'vim'.
'vim' is for Unix gurus... :D

mythmaster
08-05-09, 02:06 PM
You'll need to be super-user to edit the configs, but you can still do this from the gui, e.g.:
gksudo gedit /etc/mediatomb/config.xml
It's easier to search for specific strings this way.

Also, remember to backup the config files before you change anything.

EDIT: "nano" should be installed by default and is easy to use, also, if you don't have gui

newlinux
08-05-09, 04:14 PM
If you use nano, don't forget to use sudo:


sudo nano /etc/mediatomb/config.xml


You can search with Ctrl-w in nano...

snuffy47
08-05-09, 08:09 PM
hope to get some time tonight to try these suggestions out

will update thanks

snuffy47
08-05-09, 10:34 PM
nano worked out for me to edit the cfg
Had to do alittle reading to get the save and ext cmds
Have not figured out how to copy yet.

It worked so well that I now have a fail to restart problem with MT but atleast I am learning

This is alot harder then I expected that is for sure.

If I am going to stream to another PC do I need to add those line regarding the ps3 ect.

This unit will only be streaming to other pcs likely 2 at some point.

Also do all the videos have to be the same format? I have avi,mkv,and divx files currently

I would also like to get my 2 20G drives installed and a practise raid setup done. Is there any T's that are recommended? Should I have the OS installed on the same drives or can I use my smaller 6G drive for this? What happens if my OS drive fails? Help here is much appreciated

snuffy47
08-06-09, 08:05 AM
I still have the mediatomb error

Here is my cfg
<?xml version="1.0" encoding="UTF-8"?>
<config version="1" xmlns="http://mediatomb.cc/config/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/c$
<server>
<ui enabled="yes">
<accounts enabled="yes" session-timeout="30">
<account user="admin" password="admin"/>
</accounts>
</ui>
<name>Mediatomb</name>
<udn>uuid:0a6b21c9-a5f6-4871-b27a-b48c82e294ef</udn>
<home>/var/lib/mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="yes">
<database-file>sqlite3.db</database-file>
</sqlite3>
<mysql enabled="no">
<host>localhost</host>
<username>mediatomb</username>
<database>mediatomb</database>
</mysql>
</storage>
<protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
<!- Uncomment the line below for PS3 divx support ->
<map from="avi" to="video/divx"/>

<!- Uncomment the line below for D-Link DSM / ZyXEL DMA-100 ->
<map from="avi" to="video/avi"/>
<!--
Uncomment the lines below to get rid of jerky avi playback on the
DSM320 or to enable subtitles support on the DSM units
-->
<!--
<custom-http-headers>
<add header="X-User-Agent: redsonic"/>
</custom-http-headers>

<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
-->
<!-- Uncomment the line below if you have a Telegent TG100 -->
<!--
<upnp-string-limit>101</upnp-string-limit>
-->
</server>
<import hidden-files="no">
<scripting script-charset="UTF-8">
<common-script>/usr/share/mediatomb/js/common.js</common-script>
<playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
<virtual-layout type="builtin">
<import-script>/usr/share/mediatomb/js/import.js</import-script>
</virtual-layout>
</scripting>
<mappings>
<extension-mimetype ignore-unknown="no">

mythmaster
08-06-09, 02:13 PM
Once again, if you'll just be connecting local pc's, then all you need to set up is file-sharing, and you needn't bother with "streaming" software.

snuffy47
08-06-09, 03:49 PM
Thanks for the information

Okay so it appears that if I am going to use a pc to play videos and music on my 52"TV and older 5.1 Kenwood RV I do not need to stream video just setup samba file server.

Does streaming not allow to transcode from different files to one format? I just donnt understand what streaming is I guess.

If that is the case then all is good for my hardware for my server.

On a different note if I was goingto build a ubuntu HTPC out of older equipment access my server videos and play them on my TV at DVD quality not HD what hardware resources would be the min to use? An would Wireless N work or do I have to use wired connections.

mythmaster
08-06-09, 04:40 PM
Wireless N is fine for DVD's (and maybe even HD, but I haven't tried it), and you can use just about any hardware with a VDPAU-capable video card. I'd try to use a board with PCIe, though, as numerous problems have been reported with the PCI cards.

It would probably be best to use your older hardware as the file server since that requires the least amount of resources.

Some streaming software can transcode on-the-fly, but that's only necessary when sending video to a UPnP device that can't decode the original format. PC players like VLC and XBMC can decode any format, so you would probably only want to transcode files in order to conserve space and/or bandwidth.