DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-08-28 23:06:47

aarrgard
New member
Registered: 2007-08-28
Posts: 2

Installing mediatomb

The upnp/av server that runs with the default DSM-G600 firmware does not support localized strings and does not provide that many features. Looking for a replacement I fell for the MediaTomb project and have successfully installed it on my DSM-G600. It is working quite well with the DSM-520 mediaplayer that now displays Swedish titles correctly.

Some notes on what I did:

** Install Gentoo on the device using chroot

** Dowload MediaTomb

Grab the latest source code from the MediaTomb(http://mediatomb.cc/pages/download) website.

** Emerge packages to make mediatomb compile

libiconv is not masked for ppc arcitecture so we have to unmask it before we can emerge it:

echo "dev-libs/libiconv" /etc/portage/package.unmask
emerge dev-libs/libiconv
emerge dev-db/sqlite

now you can do ./configure, however you might want to emerge some other packages in order to parse metadata and do scripting:

** emerge packages for dealing with metadata in audio and photo files

emerge media-libs/id3lib
emerge media-libs/libexif
[emerge media-libs/taglib]
[emerge media-libs/libextractor]

The "taglib" and "libextractor" is disabled by default configuration.

The libextractor depends on "dev-libs/glib" that is "profile" masked. The libextractor shows up as
disabled even if not emerged. Perhaps some other app creates the required files. Have not dug any deeper into this.

** package to enable scripting in mediatomb

emerge dev-lang/spidermonkey

** configure, compile and install
./configure

should now produce the following output at the end

CONFIGURATION SUMMARY ----

sqlite3       : yes
mysql         : missing
libjs         : yes
libmagic      : yes
inotify       : missing
libexif       : yes
id3lib        : yes
taglib        : disabled
libextractor  : disabled

make
make install

** Startup MediaTomb

Startup using RJ45
/usr/local/bin/mediatomb -e br0

Startup using WiFi
/usr/local/bin/mediatomb -e br0:0

** Mount root filesystem

If you have installed Gentoo in a subfolder of your HD_a2 drive you have to mount it again in order to access the files on the root.
After you have chroot:ed into Gentoo do the following:

mkdir /mnt/root
mount /dev/sda2 /mnt/root

** Let MediaTomb start on boot

Place the following lines in the "fun_plug" file:

-----
# Mount Gentoo devices
mount -o bind /dev /mnt/HD_a2/gentoo/dev
mount -t proc none /mnt/HD_a2/gentoo/proc
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo mount /dev/sda2 /mnt/root

# Start MediaTomb
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo /usr/local/bin/mediatomb -e br0 > /var/log/mediatomb.log 2>&1 &
-----

Note: I had some trouble when letting the MediaTomb start as a daemon process using the "-d" switch(Getting defuct processes for some reason). That is why the last line starts MediaTomb in the background using the ampesand instead of "-d" switch. The root mediatomb process still gets parent pid set to 1 and does not die when the fun_plug script exits.

** Stop MediaTomb

Send the kill signal to the MediaTomb process identified by doing a "ps -ef | grep mediatomb". The process that has "ppid" set to 1 should be killed with the "kill <pid>" command.

** Configure UI port

In order to let the MediaTomb UI bind to the same port on each startup you have to add the following line to the config.xml file:
-----
...
<server>
  ...
  <port>8080</port>
...
-----

** Configure MediaTomb to run as non root

TODO! - my mediatomb process runs as root which is bad, I know :-(

** Error - startup

-----
terminate called after throwing an instance of 'StorageException'
terminate called recursively
-----

Solution: Create the database manually

-----
cd /usr/local/share/mediatomb/
cat sqlite3.sql | sqlite3 mediatomb.db
mv mediatomb.db /.mediatomb
-----

See http://wl500g.info/archive/index.php/t-8456.html

** Error - importing dirs

Getting lots of "could not be converted to new encoding: invalid character sequence!" when adding directories using he web UI

Modify the file/meta encoding in config.xml file:

-----
...
  <import ...>
    <filesystem-charset>ISO-8859-1</filesystem-charset>
    <metadata-charset>ISO-8859-1</metadata-charset>
...
-----

Offline

 

#2 2008-02-05 10:55:30

logge
Member
From: Sweden
Registered: 2007-05-30
Posts: 12
Website

Re: Installing mediatomb

Hello,

I just compiled mediatomb and can now enjoy streaming music, photos and videos on my PS3. Thanks a lot for the guide!

There is a small mistake in the description, to unmask libiconv, do:
echo "dev-libs/libiconv -*" /etc/portage/package.keywords


To get it working on the PS3, simply do the following:

First of all, in the file ~/.mediatomb/config.xml
add the line: <protocolInfo extend="yes"/> immediately after the line <server>

Secondly, in order to get divx playback to work, I had to add a missing media type mapping.

In the same file, add <map from="avi" to="video/divx"/> in the section <extension-mimetype>


Now all I would like to do is kill the built-in media server, tried adding: kill `pidof upnp` to fun_plug, but it does not work. Is the server started after fun_plug is executed perhaps?

Thanks

Offline

 

#3 2008-02-05 20:41:47

qn1234
Member
Registered: 2006-08-18
Posts: 94

Re: Installing mediatomb

Try adding something like this to the end of the your fun_plug:

(sleep 10; /mnt/HD_a2/bin/killall -9 upnp)

And I assume you have killall installed, of course.

I was wondering if you experience any lagging when watching video that you ripped from DVDs that you own?

Offline

 

#4 2008-02-06 23:32:32

logge
Member
From: Sweden
Registered: 2007-05-30
Posts: 12
Website

Re: Installing mediatomb

Thanks, that did the trick! Now I don't have to see the annoying error messages the built in media server generated on the PS3...

A small warning - don't try to restart the box while mediatomb is adding files (It takes hours to add a large music collection). It corrupted the sqlite database so I had to delete it and create a new one.

As for lagging, so far it runs smoothly. I just watched a HD divx movie without any problems, even over wifi.

Offline

 

#5 2008-03-23 12:18:14

deeps
Member
Registered: 2007-10-21
Posts: 12

Re: Installing mediatomb

Thanks for your work, lokks like something for. However I fail to unmask dev-lib/libiconv. I have this in package.unmask : dev-libs/libiconv and this in package.keywords: dev-libs/libiconv -*"  put it still fails, saying: (masked by: missing keyword)...any ideas?

Thanks in advance....

Offline

 

#6 2008-05-04 13:45:24

sideris
New member
Registered: 2008-05-04
Posts: 1

Re: Installing mediatomb

deeps wrote:

Thanks for your work, lokks like something for. However I fail to unmask dev-lib/libiconv. I have this in package.unmask : dev-libs/libiconv and this in package.keywords: dev-libs/libiconv -*"  put it still fails, saying: (masked by: missing keyword)...any ideas?

Got the same error!

I solved it by adding the following to package.keywords like this:

echo "dev-libs/libiconv ~* *" > /etc/portage/package.keywords

Hope it helps you...

Offline

 

#7 2008-05-22 16:52:44

cruzer
New member
Registered: 2008-05-22
Posts: 1

Re: Installing mediatomb

Just want to give a thumbs up to the people in this thread. I'm currently listening to music on my PS3 from my G600 thanks to this thread. smile

It's the little things that count.

Offline

 

#8 2008-06-11 17:52:31

spicyvelveetas
New member
Registered: 2006-09-20
Posts: 2

Re: Installing mediatomb

Hey,

Whenever I kill the upnp, I lose the web interface.  Am I killing that too?  Is it inherently one process?
In my fun_plug, I use:  kill 'pidof upnp'

Offline

 

#9 2008-06-21 22:47:22

aarrgard
New member
Registered: 2007-08-28
Posts: 2

Re: Installing mediatomb

If you want to install MediaTomb on your unit you should probably follow the steps on this blog instead :-)

http://michael-peeters.blogspot.com/200 … ively.html

Offline

 

#10 2008-09-03 15:04:11

Mr_Zoidberg
Member
Registered: 2008-05-01
Posts: 11

Re: Installing mediatomb

I get this error:

2008-09-03 03:58:22   ERROR: error while creating database: SQLITE3: (13) database or disk is full

I have 200gb free, what is going wrong here?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB