Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, June 30, 2013

AIM Media Center Remote Control RC118 with Linux and XBMC

Bought myself a new remote control from Maplin yesterday for my media centre running XBMC on Linux (Debian Testing). It's an AIM Media Center Remote Control, model RC118 and only costs £20.


It's nicely made for the price, the only cons are that it's got a Windows logo on one button (uck!) and unlike my old remote (also from Maplin) not all the buttons work 'out of the box' on Linux & XBMC.

The 'pro' of this remote however is that it's a 'standard' MCE RC6 remote so the buttons can be translated and mapped with lirc. I couldn't do this with my old remote as it emulates a keyboard device.

For a relatively popular remote, surprisingly little information can be found on the web on how to set it up properly with lirc and XBMC, just the usual array of forum posts and incomplete or non-working advice. So some reading was required of the lirc & XBMC's Lircmap.xml documentation.

So here's the solution, if you discount creating the map files (as I've supplied them here) it's actually very simple. I've tested this on Debian (Testing) & Fedora 18 so I assume this would work just as well on derivatives such as Ubuntu/Mint and CentOS/RHEL respectively.
 

So first, install lirc...

Either use your preferred software installer GUI or save time by opening a terminal & using the command line;

On Debian & Ubuntu

 sudo apt-get install lirc  

On Fedora

 sudo yum install lirc  


Configure lirc

The lirc daemon is configured with the file /etc/lirc/lircd.conf.
 In the terminal, you can open this file for editing in gedit (or your preferred text editor);
 sudo gedit /etc/lirc/lircd.conf  
Append the following text your lircd.conf.
 begin remote  
  name rc118  
  bits      13  
  flags RC6|CONST_LENGTH  
  eps      30  
  aeps     100  
  header    2700  855  
  one      486  419  
  zero     486  419  
  pre_data_bits  24  
  pre_data    0x1BFF83  
  gap     107341  
  min_repeat   1  
  toggle_bit_mask 0x8000  
  rc6_mask  0x100000000  
    begin codes  
      Power          0x1BF3  
      Record          0x1BE8  
      Stop           0x1BE6  
      Pause          0x1BE7  
      Rewind          0x1BEA  
      Forward         0x1BEB  
      Previous         0x1BE4  
      Play           0x1BE9  
      Next           0x1BE5  
      Zoomout         0x1BD9  
      Zoomin          0x1BDA  
      Eject          0x1BB7  
      Select          0x1BDB  
      Menu           0x1BF2  
      Back           0x1BDC  
      Info           0x1BF0  
      Up            0x1BE1  
      Down           0x1BE0  
      Left           0x1BDF  
      Right          0x1BDE  
      OK            0x1BDD  
      Vol+           0x1BEF  
      Vol-           0x1BEE  
      Chan+          0x1BED  
      Chan-          0x1BEC  
      Mute           0x1BF1  
      PICTURES         0x1BB6  
      VIDEOS          0x1BB5  
      MUSIC          0x1BB8  
      1            0x1BFE  
      2            0x1BFD  
      3            0x1BFC  
      4            0x1BFB  
      5            0x1BFA  
      6            0x1BF9  
      7            0x1BF8  
      8            0x1BF7  
      9            0x1BF6  
      0            0x1BFF  
      Star           0x1BE2  
      Hash           0x1BE3  
      Clear          0x1BF5  
      Keyboard         0x1BA5  
      Edit           0x1BF4  
      Red           0x1BA4  
      Green          0x1BA3  
      Yellow          0x1BA2  
      Blue           0x1BA1  
    end codes  
 end remote  

On Debian...

The Debian package of lirc comes with a /etc/lirc/hardware.conf file, the Fedora install does not and just works without one. On Debian I had to also amend the hardware.conf file by amending the DRIVER & DEVICE variables to...
 DRIVER="default"  
 DEVICE="/dev/lirc0"  
This is likely to be the same for most installations but if in doubt of what your device is, look in /dev;
 ls -l /dev/lirc*  

Restart lirc

 sudo service lirc restart  

Configure XBMC

XBMC already comes with a set of key maps for remote controls via lirc in the file /usr/share/xbmc/system/Lircmap.xml. You can also have a user specific Lircmap.xml in your ~/.xbmc/userdata directory.
Here we'll put our mappings for our 'rc118' lirc remote (this name being defined in our /etc/lirc/lircd.conf file) to our user Lircmap.xml file.

In a terminal, open a new file in gedit (or your preferred text editor);
 gedit ~/.xbmc/userdata/Lircmap.xml  
Paste the following text into your new file;
 <lircmap>  
   <remote device="rc118">  
     <mypictures>PICTURES</mypictures>  
     <liveradio>RADIO</liveradio>  
     <myvideo>VIDEOS</myvideo>  
     <mymusic>MUSIC</mymusic>  
     <record>Record</record>  
     <pause>Pause</pause>  
     <stop>Stop</stop>  
     <skipminus>Previous</skipminus>  
     <play>Play</play>  
     <skipplus>Next</skipplus>  
     <reverse>Rewind</reverse>  
     <forward>Forward</forward>  
     <start>Menu</start>  
     <back>Back</back>  
     <info>Info</info>  
     <volumeplus>Vol+</volumeplus>  
     <volumeminus>Vol-</volumeminus>  
     <left>Left</left>  
     <right>Right</right>  
     <up>Up</up>  
     <down>Down</down>  
     <select>OK</select>  
     <channelplus>Chan+</channelplus>  
     <channelminus>Chan-</channelminus>  
     <mute>Mute</mute>  
     <recordedtv>Eject</recordedtv>  
     <guide>Zoomout</guide>  
     <livetv>Zoomin</livetv>  
     <menu>Select</menu>  
     <one>1</one>  
     <two>2</two>  
     <three>3</three>  
     <four>4</four>  
     <five>5</five>  
     <six>6</six>  
     <seven>7</seven>  
     <eight>8</eight>  
     <nine>9</nine>  
     <star>Star</star>  
     <zero>0</zero>  
     <hash>Hash</hash>  
     <clear>Clear</clear>  
     <teletext>Keyboard</teletext>  
     <enter>Edit</enter>  
     <red>Red</red>  
     <green>Green</green>  
     <yellow>Yellow</yellow>  
     <blue>Blue</blue>  
   </remote>  
 </lircmap>  
Save your new file.

Disable the remote's kernel driver

Now the RC118 remote is handled by lirc you have no need for the Linux kernel to handle it. To prevent XBMC from receiving input from both lirc and xinput (resulting in double key presses for those buttons that did work out of the box) you need to disable the relevant kernel module.

Unload the RC6 decoder driver with the following command;
 sudo modprobe -r ir_rc6_decoder  
To disable this driver so it's not loaded when the system is booted, blacklist it as follows;
 echo "blacklist ir_rc6_decoder" | sudo tee -a /etc/modprobe.d/ir_rc6_decoder.conf  


Now start or restart XBMC and your AIM RC118 remote works completely.

Saturday, March 16, 2013

Converting Sony's PlayTV M2TS recordings to Xvid

Recently, I had to replace my PS3 and one of my PS3's main roles for a long time has been as a DVR. The PS3 together with the PlayTV peripheral and the official BD remote does an excellent job of this providing the ability to watch, pause, rewind & record over-the-air TV with a nice HD interface, it even improves image quality due to the PS3's built-in upscaling.

The slow death of my old PS3 together with the timely introduction of Live TV support on XBMC 12 prompted me to take the PlayTV peripheral and stick it in my Linux-based media centre PC running XMBC and setup TVheadend to pull the signal from the PlayTV's tuners. The result of this is the XBMC box has now become our DVR and TV viewing platform as well as all the other media content it serves up, however there was still a lot of decent recordings left on the PS3 that I wanted to keep and having exported them from PlayTV and transferred them from the PS3, I felt that the M2TS files are a little too large to warrant leaving them in that format using all that disk space.

So for any out there who are left with a bunch of these huge M2TS files and want to make them smaller or simply transcode them to a format that is supported by more devices then this post is for you.
Firstly you will need to have ffmpeg installed on your PC together with appropriate Xvid & LAME MP3 libraries.

ffmpeg

As always ffmpeg is my goto toolkit for video convertion and a single MT2S file can be converted to a smaller file without much loss of quality with a one-liner.

Example

 ffmpeg -y -i "awesomeshow.m2ts" \  
 -vcodec libxvid \  
 -b 1200k \  
 -acodec libmp3lame \  
 -ac 2 -ar 44100 -ab 128k \  
 -s 576x460 -threads 2 -deinterlace "awesomeshow.avi"  

In this example the filename of the M2TS file that is being converted (the input file) is 'awesomeshow.m2ts' and I've given the output file the name 'awesomeshow.avi'.

Option tips

-vcodec = video codec

Here I've used the Xvid MPEG4 library to achieve a higher compression ratio than the source file's MPEG2, reducing the size of the output file, also many devices (including the PS3) support Xvid playback.

-b = video bitrate

I've specified a video stream bitrate of 1200 Kbits per second, after lots of tries this seems to be a nice compromise between quality & output file size.

-s = frame size

My PAL TV signal is processed at 576i, the resulting resolution of the original recording is 720x576. In the above example I've used the -s option to reduce the output file resolution to 576x460. This helps to further reduce the output file size.

-acodec = audio codec

MP3 is the common counterpart to the Xvid video codec, it compresses audio well and playback is supported everywhere.
I specified the output audio stream to be a 2 channel stream with a sample rate of 44KHz and a  bitrate of 128Kbps with the -ac, -ar & -ab options.

-deinterlace

As the video source is an interlaced TV signal it will look terrible when played back on a progressive display unless deinterlacing is applied on the transcode or on the player playing the convertion. Therefore I've specified to deinterlace during the conversion with the delinterlace option, this also introduces additional processing on the transcode so ffmpeg will take noticeably longer to complete.

-threads = number of conversion processes

Set this figure to match the number of processor cores on your computer, the more processors you can get to work on the conversion job the quicker it will finish.

Finally, a script...

I had a lot of recordings to convert so naturally, to convert all of them all in one go on my media centre PC which runs a popular Linux distro I wrote a little shell script.
If you want to use this script just save it to your local filesystem (your Downloads directory presumably), pop it in your /usr/bin directory & make it executable;
 cd ~/Downloads  
 chmod +x playtv2xvid  
 sudo mv playtv2xvid /usr/bin  

Then in a terminal 'cd' to the location of your *.m2ts files and run...
 playtv2xvid  

It will show you what M2TS files have been found in the current location, press enter to begin the conversions and all will be logged in a log file for you to review later.

Download the playtv2xvid script here.


Wednesday, February 11, 2009

Transcoding to your Playstation 3 with Mediatomb

The Playstation 3 is a brilliant bit of kit, not only is it a cutting edge games console but it is also a excellent media centre.
Not only does it play Blu-Rays, DVDs, CDs, MP3s and DivX/Xvid as standard through proper HDMI & optical audio connections but the rendering quality of compressed video is noticeably better than on a computer or a cheapo DivX/DVD player with richer colours and less artifacts.


The feature that is used a lot at my place is the PS3's ability to stream from a DLNA media server, this does away with the need to use physical media such as optical discs or hard disks if the audio/video files already resides on my server.
Using a streaming server can actually enhance the functionality of your PS3, something I was keen to experiment with when I first bought my PS3 about a year ago.

My DLNA server of choice is Mediatomb, this runs on my desktop machine which is also my home server, this machine currently runs Ubuntu 8.10 64bit.
Mediatomb requires some basic configuration to get the PS3 streaming from it, this entails editing Mediatomb's config file to enable PS3 support. This enables your PS3 to stream MP3s & DivX/Xvid media from your server over your network.

But what if your media is not supported by the PS3? What about ogg, flv and mkv files for instance?

Transcoding 

Mediatomb can be configured to convert certain media types in realtime and stream it to the PS3 in the format it supports, this is called transcoding.
There are many forum discussions about how to get Mediatomb to transcode various formats to PS3s however I have never been able to find a proper guide to setting up Mediatomb to transcode, just a hodge podge of partial solutions.

I managed to use some of these partial solutions as building blocks to setup my Mediatomb properly so that I can play MP3 and OGG audio and DivX/Xvid, FLV & Matroska videos upto resolutions of 1080p on my PS3 across my network. However this took a lot of experimentation and I never managed to document it so here's my chance to remedy that and knock up a guide for setting up Mediatomb on Ubuntu to transcode media to your PS3.

The Guide

Install the required software
Firstly install Mediatomb and the software required for the transcoding process along with any dependencies.

 sudo apt-get install mediatomb vlc ffmpeg ffmpegthumbnailer transcode  

Configure Mediatomb
Backup the original Mediatomb config file...

 cd /etc/mediatomb  
 sudo cp -p config.xml config.orig  
You'll need to create 3 shell scripts in /etc/mediatomb...

Script #1

 sudo nano mediatomb-transcode-audio  
Copy in the following text, save the file and exit nano ([Ctrl]+[x] then [Y])...

   #!/bin/bash  
   INPUT="$1"  
   OUTPUT="$2"  
   AUDIO_CODEC="pcm_s16le"  
   AUDIO_BITRATE="192k"  
   AUDIO_SAMPLERATE="44100"  
   AUDIO_CHANNELS="2"  
   FORMAT="s16le"  
   exec /usr/local/bin/ffmpeg -i "${INPUT}" -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -me zero -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} -f ${FORMAT} - &gt; "${OUTPUT}" 2&gt;/dev/null  
Script #2


 sudo nano mediatomb-transcode-video  

Copy in the following text, save the file and exit nano ([Ctrl]+[x] then [Y])...



   #!/bin/bash  
   VLC_PATH="/usr/bin/vlc"  
   INPUT="$1"  
   OUTPUT="$2"  
   VIDEO_CODEC="mp2v"  
   VIDEO_BITRATE="4096"  
   VIDEO_FRAMERATE="25"  
   AUDIO_CODEC="mpga"  
   AUDIO_BITRATE="192"  
   AUDIO_SAMPLERATE="44100"  
   AUDIO_CHANNELS="2"  
   FORMAT="ps"  
   SUBTITLE_LANGUAGE="eng"  
   exec "${VLC_PATH}" "${INPUT}" -I dummy --sout "#transcode{vcodec=${VIDEO_CODEC},\ vb=${VIDEO_BITRATE},fps=${VIDEO_FRAMERATE},acodec=${AUDIO_CODEC},ab=${AUDIO_BITRATE},\ samplerate=${AUDIO_SAMPLERATE},channels=${AUDIO_CHANNELS},soverlay,audio-sync}:\ standard{mux=${FORMAT},access=file,dst=${OUTPUT}}" --sub-language=${SUBTITLE_LANGUAGE} \  
   vlc:quit  

Script #3
 sudo nano mediatomb-transcode-video-ffmpeg  

Copy in the following text, save the file and exit nano ([Ctrl]+[x] then [Y])...



   #!/bin/bash  
   INPUT=$1  
   OUTPUT=$2  
   VIDEO_CODEC="mpeg2video"  
   VIDEO_BITRATE="24576k"  
   AUDIO_CODEC="mp2"  
   AUDIO_BITRATE="192k"  
   AUDIO_SAMPLERATE="48000"  
   AUDIO_CHANNELS="2"  
   FORMAT="dvd"  
   exec /usr/bin/ffmpeg -threads 4 -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \  
   -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} \  
   -f ${FORMAT} -copyts - &gt; "${OUTPUT}" 2&gt;/dev/null  

Remove the original config.xml file...

 sudo rm -f config.xml  

Create a new config.xml in nano...

 sudo nano config.xml  

... copy in the following text...



 <?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/config/1 http://mediatomb.cc/config/1.xsd">  
 <server>  
 <ui enabled="yes">  
 <accounts enabled="no" session-timeout="30">  
 <account user="mediatomb" password="mediatomb"/>  
 </accounts>  
 </ui>  
 <name>MediaTomb</name>  
 <udn>uuid:aa8ba7dd-5533-4ec1-b32c-b3b807677f9a</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 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="yes">  
 <map from="mp3" to="audio/mpeg"/>  
 <map from="ogg" to="application/ogg"/>  
 <map from="ogv" to="video/oggtheora"/>  
 <map from="asf" to="video/x-ms-asf"/>  
 <map from="asx" to="video/x-ms-asf"/>  
 <map from="wma" to="audio/x-ms-wma"/>  
 <map from="wax" to="audio/x-ms-wax"/>  
 <map from="wmv" to="video/x-ms-wmv"/>  
 <map from="wvx" to="video/x-ms-wvx"/>  
 <map from="wm" to="video/x-ms-wm"/>  
 <map from="wmx" to="video/x-ms-wmx"/>  
 <map from="m3u" to="audio/x-mpegurl"/>  
 <map from="pls" to="audio/x-scpls"/>  
 <map from="flv" to="video/x-flv"/>  
 <map from="avi" to="video/x-divx"/>  
 <map from="divx" to="video/x-divx"/>  
 <map from="mkv" to="video/x-matroska"/>  
 <map from="mov" to="video/quicktime"/>  
 <map from="qt" to="video/quicktime"/>  
 <map from="mpg" to="video/mpeg"/>  
 <map from="mpeg" to="video/mpeg"/>  
 </extension-mimetype>  
 <mimetype-upnpclass>  
 <map from="audio/*" to="object.item.audioItem.musicTrack"/>  
 <map from="video/*" to="object.item.videoItem"/>  
 <map from="image/*" to="object.item.imageItem"/>  
 </mimetype-upnpclass>  
 <mimetype-contenttype>  
 <treat mimetype="audio/mpeg" as="mp3"/>  
 <treat mimetype="application/ogg" as="ogg"/>  
 <treat mimetype="audio/x-flac" as="flac"/>  
 <treat mimetype="image/jpeg" as="jpg"/>  
 <treat mimetype="audio/x-mpegurl" as="playlist"/>  
 <treat mimetype="audio/x-scpls" as="playlist"/>  
 <treat mimetype="audio/x-wav" as="pcm"/>  
 <treat mimetype="audio/L16" as="pcm"/>  
 <treat mimetype="video/x-msvideo" as="avi"/>  
 <treat mimetype="video/mp4" as="mp4"/>  
 <treat mimetype="audio/mp4" as="mp4"/>  
 <treat mimetype="video/x-divx" as="avi"/>  
 </mimetype-contenttype>  
 </mappings>  
 </import>  
 <transcoding enabled="yes">  
 <mimetype-profile-mappings>  
 <transcode mimetype="video/x-flv" using="vlcmpeg"/>  
 <transcode mimetype="application/ogg" using="vlcmpeg"/>  
 <transcode mimetype="application/ogg" using="oggflac2raw"/>  
 <transcode mimetype="audio/x-flac" using="audio-common"/>  
 <transcode mimetype="video/x-divx" using="video-thumbnail"/>  
 <transcode mimetype="video/x-matroska" using="video-common"/>  
 <transcode mimetype="video/quicktime" using="video-common"/>  
 <transcode mimetype="video/oggtheora" using="video-common"/>  
 </mimetype-profile-mappings>  
 <profiles>  
 <profile name="oggflac2raw" enabled="yes" type="external">  
 <mimetype>audio/L16</mimetype>  
 <accept-url>no</accept-url>  
 <first-resource>yes</first-resource>  
 <accept-ogg-theora>no</accept-ogg-theora>  
 <agent command="ogg123" arguments="-d raw -f %out %in"/>  
 <buffer size="1048576" chunk-size="131072" fill-size="262144"/>  
 </profile>  
 <profile name="vlcmpeg" enabled="yes" type="external">  
 <mimetype>video/mpeg</mimetype>  
 <accept-url>yes</accept-url>  
 <first-resource>yes</first-resource>  
 <accept-ogg-theora>yes</accept-ogg-theora>  
 <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>  
 <buffer size="14400000" chunk-size="512000" fill-size="120000"/>  
 </profile>  
 <profile name="video-thumbnail" enabled="yes" type="external">  
 <mimetype>image/jpeg</mimetype>  
 <accept-url>yes</accept-url>  
 <thumbnail>yes</thumbnail>  
 <resolution>128x128</resolution>  
 <agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 128"/>  
 <buffer size="524288" chunk-size="512" fill-size="1024"/>  
 </profile>  
 <profile name="audio-common" enabled="yes" type="external">  
 <mimetype>audio/x-wav</mimetype>  
 <accept-url>yes</accept-url>  
 <first-resource>yes</first-resource>  
 <accept-ogg-theora>no</accept-ogg-theora>  
 <agent command="/etc/mediatomb/mediatomb-transcode-audio" arguments="%in %out"/>  
 <buffer size="1048576" chunk-size="131072" fill-size="262144"/>  
 </profile>  
 <profile name="video-common" enabled="yes" type="external">  
 <mimetype>video/mpeg</mimetype>  
 <accept-url>yes</accept-url>  
 <first-resource>yes</first-resource>  
 <accept-ogg-theora>yes</accept-ogg-theora>  
 <agent command="/etc/mediatomb/mediatomb-transcode-video-ffmpeg" arguments="%in %out"/>  
 <buffer size="52428800" chunk-size="524288" fill-size="1048576"/>  
 <!-- <buffer size="26214400" chunk-size="524288" fill-size="1048576"/> -->  
 <!-- <buffer size="14400000" chunk-size="512000" fill-size="120000"/> -->  
 </profile>  
 </profiles>  
 </transcoding>  
 </config>  
...then save the file ([Ctrl]+[x] then [Y]).

Make the 3 scripts you created executeable.
 sudo chmod +x media*  

Lastly restart Mediatomb.

 sudo /etc/init.d/mediatomb restart  

Create some symlinks in your root directory to your media directories.
For example linking my Music, Photos, Videos and Downloads directories within my home directory would go like this...

 sudo ln -s ~/Videos /Videos  
 sudo ln -s ~/Music /Music  
 sudo ln -s ~/Photos /Photo  
 sudo ln -s ~/Download /Downloads  

Share some media

To share some media from Mediatomb, open up a web browser and goto... http://localhost:49152 You'll get the front page as below, select the [Filesystem] link...



Now select one of the symlinks you just created in the filesystem tree on the left /Videos for example, then select the "add autoscan" button.

The 'Add Autoscan' button...





Then select the options...
Scan Mode: Timed
Scan Level: Full
Recursive: ticked

Enter scan interval in seconds.



If the contents of the directory changes often and does not contain a great deal of files you may want to set this to something low like 300 seconds (5 minutes), however if the directory contains a huge amount of files (like my Music directory) you may want Mediatomb to only scan for changes every 21600 or 43200 seconds (6 or 12 hours) you could also reduce the scan level to 'Basic' to speed up scanning a large amount of files.
Once done select the [Set] button, Mediatomb will start to scan the chosen directory.

Select the next symlink in the root directory as required and repeat the process.

Playing your shared media on the PS3
Now on your PS3 run the 'Search for Media Servers' option, once found Mediatomb will show in the media menus and you can browse your shared content, videos and images will also have thumbnail previews...


All works well however you cannot scan back & forward or pause transcoded media on the PS3 as it is effectively a 'live' stream.
The only way to pause is to hit the PS button to back out to the menu, pushing the PS button again will resume playback.

Hardware Limitations
The process of streaming transcoded content to your PS3 can be a good test of your server & network hardware.
My server has a 2.1GHz Intel Core 2 Duo with 6GB of 1066MHz DDR2 RAM along with 3TB of RAIDed SATA storage.
My network hangs off a very reliable but getting old Netgear Wi-Fi G / 100Mbps Ethernet router.

My first tip will be do not bother with wireless networking.
You need some reliable bandwidth between the server and the PS3 so both need to be on a wired network.

Additionally wireless networking is slow even if your wireless network is 108Mbps, that is 108Mbps shared between all connected wireless devices.

Once I started to experiment with streaming/transcoding 8GB 1080p Matroska (.mkv) files I found that there can be limitations even on the 100Mbps wired network
during fast-action high-detail scenes (smashing glass, moving water, flocks of birds).
Pressing [Select] on the PS3 controller when playing these videos shows the video bandwidth on the top right of the screen.



Additionally when I started to test 720p - 1080p Matroska videos the 2.1 GHz Core 2 Duo was not fast enough to transcode in realtime during the fast-action high-detail scenes resulting in choppy video output on the PS3.


After much testing and changing of video bandwidths to find the sweetspot between network bandwidth and CPU load I settled on the bandwidths found in the above 'mediatomb-transcode-video' scripts and a CPU overclocked to 2.9GHz to do the job.
Therefore the suggested hardware requirements are as follows...

DLNA Server Hardware Requirements
Intel Core 2 Duo 2.9GHz or better (for transcoding proper HD videos)
100-1000 Mbps wired LAN


Enjoy!