Danny Tsang
image_alt_text

MediaTomb DLNA To Playstation 3

Filed Under Linux at 8th February 2010 0:01 by Danny
Tags: , , , , , , , , , , , , , , ,

Overview

I found the Video plugin for MythTV 0.21 to be inadequate for streaming to the Sony Playstation 3. It didn’t update fast enough when you dropped a video into the UPnP directory and also there was no external way of telling it to refresh it’s list of files without starting up Myth Frontend.

MediaTomb

MediaTomb is a UPnP server which can run as a standalone or as a daemon. It uses an XML configuration file for it’s settings (pretty neat stuff) and is pretty small in size. The software comes with it’s own web server so you don’t have to install a full apache install to get to the control panel and it uses SQLite by default so no big database backend to be installed.

Install & Configure MediaTomb

Install MediaTomb and ffmeg thumbnailer
sudo apt-get install mediatomb ffmpegthumbnailer
That’s it for the install!

edit the file config file in /etc/mediatomb/config.xml and change the following settings:

Enable PS3 support change this:

<protocolInfo extend=”no”/><!– For PS3 support change to “yes” –>

to

<protocolInfo extend=”yes”/><!– For PS3 support change to “yes” –>

and also

<!– <map from=”avi” to=”video/divx”/> –>

to

<map from=”avi” to=”video/divx”/>

Add the line
<pc-directory upnp-hide="yes"/>
below
<webroot>/usr/share/mediatomb/web</webroot>
so that it looks like this
<webroot>/usr/share/mediatomb/web</webroot>
<pc-directory upnp-hide="yes"/>

This hides the full directory path from the Playstation so it can only view the directories added and not the full system.

Add the following to enable thumbnail previews. I have found this does not work 100% of the time.

Enable transcoding
<transcoding enabled="no">
to
<transcoding enabled="yes">

Add the following transcode mappings under <mimetype-profile-mappings> tag:

<transcode mimetype=”video/divx” using=”video-thumbnail”/>
<transcode mimetype=”video/mpeg” using=”video-thumbnail”/>
<transcode mimetype=”video/mp4″ using=”video-thumbnail”/>
<transcode mimetype=”video/x-ms-wmv” using=”video-thumbnail”/>

Add the following settings between the <profiles></profiles> elements. Not the parent is plural and each profile is singular.

<profile name=”video-thumbnail” enabled=”yes” type=”external”>
<mimetype>image/jpeg</mimetype>
<accept-url>yes</accept-url>
<thumbnail>yes</thumbnail>
<resolution>128×128</resolution>
<agent command=”/usr/bin/ffmpegthumbnailer” arguments=”-i %in -o %out -s 128″/>
<buffer size=”524288″ chunk-size=”512″ fill-size=”1024″/>
</profile>

Restart MediaTomb service sudo /etc/init.d/mediatomb restart If it fails to restart then double check the config file for errors.

Go to the machine in a web browser on port 49152 e.g http://localhost:49152

On this web page configures the directories available over UPnP. The Database section shows what directories are visible / registered to MediaTomb and Filesystem shows the computer directories that can be added for DLNA / UPnP visibility. When a directory is added MediaTomb scans the directory and register them so they show up on the Playstation. These can include music, videos and pictures.

Go to the Playstation, turn it on and go to the relevant category e.g photo in the menu. There should be a MediaTomb server in the list. If it does not appear go towards the top and scan for more media servers to look for MediaTomb.

Summary

The software is pretty self contained but I would have liked the option to use Apache and MySQL because those are already installed on my system.

MediaTomb does the job for now and whilst I cannot get the thumbnails to work on all the media it still does a brillant job of streaming the media to the Playstation. Unfortunately it’s not integrated into MythTV so records will still have to be done via MythTV but this is not a problem because all recorded TV shows are registered in the database.

A problem I did encounter was that I added multiple directories but reguardless of where they reside on the computer, all videos appear in one directory on the Playstation. I’m not sure if this is a bug or how it’s suppose to work.

[HOWTO]:Stream DivX/XviD to a PS3 with firmware 2.10 using MediaTomb and Ubuntu 7

energy@home 0.4

Filed Under Software, energy@home at 4th February 2010 22:15 by Danny
Tags: , ,

I have just published version 0.4 of energy@home. It includes Twitter integration and a new graph which shows how much energy was used for each hour of the day.

energy@home project page

WordPress Avatar

Filed Under WordPress at 4th February 2010 0:01 by Danny
Tags: , , ,

To get an avatar to work in WordPress you need to sign up for an account on Gravatar’s website. Make sure the email address matches the email set in the user profile.

Gravatar’s website

Enable SFTP On VSFTPD In Ubuntu

Filed Under Linux at 31st January 2010 0:01 by Danny
Tags: , , , , , , ,

Enabling SFTP is very easy and makes FTP protocol a lot more secure than traditional FTP because passwords are not sent in plain text which is susceptible to a lot of things such as packet sniffers, man-in-the-middle, etc.

Assuming VSFTPD has been installed (in the default location) edit the file /etc/vsftpd.conf and check there are security certificates installed and configured.

There are two entries which start with either:
dsa_cert_file
dsa_private_key_file

or
rsa_cert_file
rsa_private_key_file

Each specifying a file path to where the key and certificates are located.

The last step is to enable SFTP by adding the following line:
ssl_enable=YES
Save and exit the file and restart the FTP server sudo /etc/init.d/vsftpd restart

Windows 7 Monitor Power Test

Filed Under Windows at 27th January 2010 10:28 by Danny
Tags: , , , , , , , , ,

There is a report generator in Microsoft Windows 7 which can help you track down what is being used in terms of power. The report tells you what is stopping the computer going into sleep mode (if sleep mode is turned on) as well as devices that do not “suspend”.

Go to the command line as an administrator. This can be achived by going to Start Menu and typing cmd in the search bar. Search for cmd.exe under Programs, hold Shift key and right click on cmd.exe. At this point you can let go of the shift key and select Run as administrator.

A dialogue box may warn you when starting the the program but OK it to start the program. Type:
powercfg -energy
and press enter to start it. The program will monitor your computer for 1 minute. In this time do what you wish.

Once it has finished it will print out the location of the report which is in a HTML (web page) format. You may need to copy to a suitable folder for your browser to open it.

Tekzilla Daily Tip #511