Java PS3 Media Server for Windows
=================================
by shagrath

Hi there... you will find on this page an experimental upnp media server I've written in Java
(so you can also use it on Linux), with precious help from MPlayer/MEncoder, FFMpeg,
AVISynth eventually, and currently using with my Playstation3.... I was quite fed up with TVersity
and others servers I've tried as none of them easily supports subtitles and 1080p transcode,
as well as any kind of files I want to play without worrying about ps3 compatibility.
I'm currently transcoding in real-time and no quality loss, 1080p mkv files.
The drawback is the high bitrate your network must support: with the default settings,
specific scenes with a lot of details (e.g.: zoom on a newspaper article) can have
bitrates near 100mb/s, so gigabit is maybe useful.
However, you can limit the bitrate (with maybe a loss of quality, of course)


Current features
================

- Ready to launch and play. No folder configuration and pre-parsing or this kind of annoying thing. 
- All your folders are directly browsed by the PS3. Theres an automatic refresh also.
- Real-time video transcoding via Avisynth/FFmpeg in MPEG2 + experimental seeking.
- DTS -> LPCM real time muxing. Lossless transcoding !
- OGG/FLAC/MPC Audio transcoding
- Thumbnail generation for Videos
- All formats PS3 natively supports: MP3/WMA, JPG/PNG/GIF/TIFF, and all kind of videos (AVI, MP4, TS, M2TS, MPEG) the ps3 is willing to play
- ZIP/RAR files as browsable folders
- Support for pictures based feeds, such as Flickr and Picasaweb
- Internet TV / Web Radio support with MPlayer/VLC


Requirements
============

A core 2 duo CPU (mine is a E6750, 2.66GHz) for smooth 1080p transcoding, but 720p seems to be transcodable with a good P4 :p


Installation
============

- Get a Java Runtime Environment: http://www.java.com. JRE version 6 is a minimum.
- Launch PMS.exe (PMS.sh on Linux).
- If the server is not detected by the PS3 (this can happens if you have several network interfaces),
check the traces firs, and try setting a correct IP address in the "General Configuration" Tab, and restart the application


Transcoding on Windows: HOWTO
=============================

2 possible methods:

A) Using the server "as is": Nothing else to install, it will use Mencoder for the transcoding part.

B) Using Avisynth/FFDshow. Paired with CoreAVC, it's quite efficient with multi cores.
1- If not already done, get and install a codec pack with ffdshow (VSfilter must be included for subtitles).
   My favorite is CCCP Codec Pack [http://www.cccp-project.net/download.php?type=cccp]
2- Get and install AVISynth 2.5.7 (I've met some framerate problems with 2.5.8 betas)
   [http://downloads.sourceforge.net/avisynth2/Avisynth_257.exe?modtime=1168199840&big_mirror=0]
3- Set up the FFDShow Audio Mixer to 5.1 (3/0/2 LFE)
4- Set "Autoload VS Filter" to true
5- Configure Haali Splitter (audio/subtitles language priorities)

Optional Codecs: CoreAVC is a good choice for H264 decoding, Quicktime Alternative and Real Alternative are also useful
(Apple 1080p trailers for example).


Transcoding on Linux: HOWTO
===========================

You just need to have mplayer, mencoder and ffmpeg binaries on your path (the more recent, the better).


Usage
=====

Navigation/Transcode
--------------------

By default, wmv, avi, mpeg files are streamable, except in case of srt/sub file present with the same file name.
All videos can be transcoded, as each streamable video appears once into its folder, and once into
a special folder "#Transcoded#" present in each sub folder,
with different options (audio/subtitles/other transcoding tools maybe) so you can choose what's working best on ps3.
For the audio part, only ogg, flac, mpc audio files and such can be transcoded: I suppose (?) all mp3s, wma and wav files
can be played 'as is' by the ps3

Custom cover art
----------------

Just drop an image in the same folder as your movie file (jpeg or png) called <mymovie>.cover.jpg (or .png). For example,
for a movie called 'tokyo.mkv', the cover file will be named 'tokyo.mkv.cover.png'


Transcoding engine prioritization by folder
-------------------------------------------

If you have some movies who plays well with the tsMuxer engine, and nonetheless want
mencoder as your default engine, you can add [tsmuxer] at the end of this folder.
The tsmuxer engine will be the first suggested, either as a replacement for your non ps3 compatible video,
or on the top of the list proposed in the #Transcoded# folder. 

Available engine names:

Mencoder = [mencoder]
AviSynth/Mencoder = [avsmencoder]
AviSynth/FFmpeg = [avsffmpeg]
tsMuxer= [tsmuxer]

It's also working the same way for virtual based folders, such as web folders names (see WEB.CONF)
See the following web streaming engines:

MPlayer audio streaming = [mplayerwebaudio]
VideoLan audio streaming = [vclaudio]
MEncoder video streaming = [mencoderwebvideo]
VideoLan video streaming = [vclvideo]
Mplayer stream dump = [mplayervideodump]


Linear PCM Muxing
=================

The version 0.98 introduces a preliminary feature: Linear PCM remuxing with tsMuxer
(only working on Windows right now, struggled a few minutes without luck with pipes
and tsMuxer on linux). LPCM muxing is disabled by default, but you can safely enable it.
If there are some troubles with channels order, you can try the following switch
in the "Decoding settings" configuration line:

 -af channels=6:6:0:0:1:1:2:4:3:5:4:2:5:3 (NEW 1.01: it's ac3 decoding order, so not this one)
 
this should be the right order, but in case of, you can also try this one: 
 
 -af channels=6:6:0:0:1:2:2:3:3:5:4:1:5:4
 NEW 1.01: -af channels=6:6:0:4:1:0:2:1:3:2:4:3:5:5
 NEW 1.01: -ac ffdca -af channels=6:6:0:4:1:0:2:1:3:2:4:3:5:5 
 
maybe this order is not correct as well. Feedback are welcome, of course :)


Known issues:
=============

- No cover art is displayed for audio files.
- Seek to specific time is OK, but fast forward/fast rewind is not very reactive, especially with Avisynth transcoding (depends of the machine)


Thanks
======

- boblinds and snoots for the network test cases :)
- sarraken, bleuecinephile, bd.azerty, fabounnet for the support and feedbacks


Contact
=======

shagrath : ps3mediaserver@gmail.com

http://ps3mediaserver.blogspot.com/