Media Server under Ubuntu

Using Freebox at home, I’m lucky to have a tool to display video, music,… directly on my TV screen.
I have disks storing such multimedia content on my FreeNAS.
I was looking for a server distributing it on my home network, and I came to pms-linux, now known as ps3mediaserver


One year ago, I manually installed everything necessary, but things have changed.
On my Ubuntu server (10.04), I just need to add a specific repository to get things installed:

sudo add-apt-repository ppa:happy-neko/ps3mediaserver
sudo apt-get update
sudo apt-get install ps3mediaserver

That’s all ! Nothing else to install…

Now, if you want to proceed manually, you will need to install:

  • mplayer
  • mencoder (with a special installation required on Lucid because of a bug)
  • ffmpeg
  • (optional) vlc
  • (optional) dcraw
  • (optional) tsmuxer
  • libmediainfo0 (specific repository: ppa:shiki/mediainfo)

Then you can install pms-linux:

sudo apt-get install pms-linux


ps3mediaserver is provided with a nice User Interface.
You can start it by using command sudo ps3mediaserver

My Freebox is immediately detected as potential “renderer”, as well as my FreeNAS server (but not properly recognized: this is a non-issue, as I will never use it to display media !)

Using this interface, I personally modified the following parameters:

  • List of directories to manage (Navigation tab)
  • interface language (General Configuration tab)
  • transconding setup (Transcoding tab)

Note that this will create configuration file in ~root/.config/ps3mediaserver (files PMS.conf & WEB.conf)
But, when starting ps3mediaserver as a service (file /etc/init.d/ps3mediaserver), it looks for configuration file in /etc/ps3mediaserver

So, I decided to setup a small hack to solve this.
Once config files are created in root directory with GUI, I stopped it (button “Quit”), and I did this:

sudo -s
cd ~root/.config/ps3mediaserver
mv PMC.conf WEB.conf /etc/ps3mediaserver/.
ln -s /etc/ps3mediaserver/PMS.conf .
ln -s /etc/ps3mediaserver/WEB.conf .

Note: in order to start when system is starting also, ps3mediaserver uses a start/stop script located in /etc/init.d/ps3mediaserver (which is normal behavior…).
But… this script relies on a configuration file (/etc/default/ps3mediaserver), which overwrites parameter PS3MS_START. Remember to set it to “1” if you want service to autostart…

Then, I customized this configuration file (PMS.conf) even further (that’s up to you):

  • I removed all sub-titles (parameter mencoder_audiosublangs)
  • I also removed thumbnails (parameter thumbnails)
  • I changed the default quality for transcoding (parameter mencoder_encode)
  • As my TV is not audio 5.1, I switched audio parameter back to “stereo” (parameter audiochannels)

Details of PMS.conf values are available here.
For your information, here is my PMS.conf file:

folders =/mnt/BT,/mnt/Multimedia,/mnt/Photos
hostname =
port =
language = en
thumbnails = false
thumbnail_seek_pos = 60
use_mplayer_for_video_thumbs = false
nbcores =
turbomode = false
minimized = false
hidevideosettings = true
usecache = false
embed_dts_in_pcm = true
charsetencoding = 850
engines = tsmuxer,mencoder,ffmpegaudio,mplayeraudio,tsmuxeraudio,mplayervideodump,mencoderwebvideo,vlcvideo,mplayerwebaudio,vlcaudio,rawthumbs
autoloadsrt = true
avisynth_convertfps = true
avisynth_script = #AviSynth script is now fully customisable !\u0001#You must use the following variables (\"clip\" being the avisynth variable of the movie):\u0001#<movie>: insert the complete DirectShowSource instruction [ clip=DirectShowSource(movie, convertfps) ]\u0001#<sub>: insert the complete TextSub/VobSub instruction if there's any detected srt/sub/idx/ass subtitle file\u0001#<moviefilename>: variable of the movie filename, if you want to do all this by yourself\u0001#Be careful, the custom script MUST return the clip object\u0001<movie>\u0001<sub>\u0001return clip
transcode_block_multiple_connections = false
tsmuxer_forcefps = true
tsmuxer_preremux_pcm = false
tsmuxer_preremux_ac3 = false
tsmuxer_mux_all_audiotracks = false
audiochannels = 2
audiobitrate = 640
maximumbitrate = 0
skiploopfilter = false
prevents_sleep_mode = true
enable_archive_browsing = true
maxvideobuffer = 400
mencoder_fontconfig = true
mencoder_font = Ubuntu
mencoder_forcefps = false
mencoder_usepcm = false
mencoder_usepcm_for_hq_audio_only = false
mencoder_intelligent_sync = true
subs_color = -1
mencoder_remux_mpeg2 = true
mencoder_remux_ac3 = false
mencoder_decode =
mencoder_encode = keyint=5:vqscale=1:vqmin=2
mencoder_vobsub_subtitle_quality = 4
mencoder_overscan_compensation_width = 0
mencoder_overscan_compensation_height = 0
mencoder_nooutofsync = true
mencoder_audiolangs = fr,en
mencoder_sublangs = en
mencoder_audiosublangs = off
mencoder_subfribidi = false
mencoder_ass = true
mencoder_ass_defaultstyle = true
mencoder_ass_scale = 1.0
mencoder_ass_margin = 40
mencoder_ass_outline = 2
mencoder_ass_shadow = 0
mencoder_noass_scale = 3
mencoder_noass_subpos = 13
mencoder_noass_blur = 1
mencoder_noass_outline = 4
mencoder_subcp = utf-8
mencoder_disablesubs = true
mencoder_yadif = false
mencoder_scaler = false
mencoder_scalex = 0
mencoder_scaley = 0
ffmpeg = -g 1 -qscale 1 -qmin 2
image_thumbnails = false
uuid = 31dd4720-add9-416d-b07b-64248304283f
hide_enginenames = true
hide_transcode_folder = true
notranscode = m2ts,ts
audio_thumbnails_method = 0
forced_sub_tags =
forced_sub_lang = off
hide_extensions = true

I also wanted a special handling of some attributes for my Freebox.
So I went and modified file /etc/ps3mediaserver/FreeboxHD.conf

  • I forced not to transcode files that were created by Freebox itself (when recording a TV program and moving it to my multimedia disk): m2ts and ts extension files. This is done through parameter “StreamExtensions”
  • I removed automatic extension creation for transcoded files (parameter “UseSameExtension”)

For reference, here is my FreeboxHD.conf file:

#Freebox supports only Mpeg-TS :
#fine tuned :p

Enjoy your multimedia server !

Leave a Reply

Your email address will not be published. Required fields are marked *

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=""> <s> <strike> <strong>