X360: 5.1 DTS/AC3 movies now supported! (magma)

Discuss third-party additions, plugins and translations for PS3 Media Server

X360: 5.1 DTS/AC3 movies now supported! (magma)

Postby whitefrt » Mon Mar 08, 2010 5:25 pm

Hey All,

Streaming AC3/DTS based movies (and DVDs) is now supported on the X360 in 5.1 surround!

As you all know ps3mediaserver only streams movies in stereo to the X360, this is because the X360 only supports WMA-PRO (WMA3) encoded multi-channel audio which is a propriety format that cannot be encoded by mencoder/ffmpeg. (decoding is possible since Sep09)

Recently I've noticed that when streaming movies with media center 7 (after installing the DivX MKV extension, win7 only) the encoding process is completely hardware accelerated and the audio is multi-channel as long as you are playing AC3 based streams (DTS is not supported with media center 7).

That got me thinking, and after some digging around I've decided not to wait for mencoder/ffmpeg to support WMA-PRO encoding (which is obviously a low priority considering the other features) - and therefore have decided to code an ASF remuxer/encoder that will add WMA-PRO and WMV3 (VC1) support - codename magma :)

I'm happy to say that it works and 5.1 AC3/DTS movies can now be transparently re-encoded into WMA-PRO while streaming with ps3mediaserver, there is no need to change or do anything.

The package is here:

Make sure you have ps3mediaserver configured to 6 channels (transcoding settings/common/number of audio channels), set the AC3 bitrate appropriately and use mencoder to play video - after which every video that has a selected audio stream with more than two channels will be played using magma, the rest will play normally using the regular mencoder settings. (subtitles are supported in both as I am still using mencoder for video encoding - which means all your mencoder settings still work, the other option which I've disabled for now is to have magma encode to WMV3(VC1) + WMA-PRO and skip mencoder altogether).

Couple of notes:
  • Magma was written in four days and is as beta as it gets :)
  • Since I am using the new media foundation framework (which was built to replace DirectShow) the minimum required operating system is Windows Vista - DirectShow is deprecated and is being phased out for the hardware based media foundation framework, so I didn't support it - sorry Windows XP users. (and MacOS users.. and linux users :))
  • Hardware accelerated encoding will be added in the near future but will be Windows 7 only (and will require a GPU).

If there are any issues please let me know and attach the debug.log and magma.log.

Last edited by whitefrt on Thu May 06, 2010 5:15 am, edited 1 time in total.
Posts: 18
Joined: Wed Jul 29, 2009 7:22 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby shagrath » Tue Mar 09, 2010 12:42 am

I'm happy to see you took the plunge into the code :p
I'm on XP so I can't test it and sorry to not have helped before but it seems you done well :p
Project Lead
Posts: 2664
Joined: Wed Jan 14, 2009 1:39 pm

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby floor19 » Wed Mar 10, 2010 7:48 pm

I have to ask.

Will it never be available for linux?

Posts: 9
Joined: Sun Feb 21, 2010 9:48 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby whitefrt » Thu Mar 11, 2010 5:04 pm

Since I'm using the internal Windows propriety DLLs, it can only run on Windows. Technically you could use the same DLLs with WINE on Linux but I don't know if WINE supports Vista-level applications. (and you would have to run the windows version of ps3mediaserver through WINE, pretty nasty).

Mac and Linux support will probably only be possible through ffmpeg/mencoder (when they'll support encoding WMV3/WMA-Pro..).
Posts: 18
Joined: Wed Jul 29, 2009 7:22 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby hermano » Fri Mar 12, 2010 2:48 am

Dude. This is amazing. I tried this on Win7 HP x64 and it works. I thought I was going to have to redo all my files in WME for 5.1.
I tested this on mkv's of Rambo with DTS 1.5mbps and Transformers with AC3 and an mp4 of The Hurt Locker with AAC 6-channel.
All work perfectly with 5.1 coming through loud and clear over Toslink.
Blu Ray rips sputter and die after a few seconds. I'm guessing because of the high bitrate.
A few questions:
1)What bitrate does the wma-pro stream at?
2)Does the 360 reconvert the audio to ac3 5.1for output over toslink. Would this change if I got an HDMI receiver?
3)The file says Mencoder, does that mean the video is being reencoded to go with the wma?

Thanks again.
Posts: 1
Joined: Fri Mar 12, 2010 2:25 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby whitefrt » Fri Mar 12, 2010 10:32 am

Glad you like it :)

1) The bitrate is set according to the AC3 bitrate you've set in PMS, currently I am forcing it to 16bits per sample (which is just because it's the first version and I didn't want to add any UI to PMS - going to add magma.conf so you can change it) so for the highest bitrate setting you'll get around 440kbps/16bits or 640kbps/24bits depending on your settings.

2) AFAIK no reconversion, you'll get 5.1/DTS output with any compatible HDMI/toslink receiver.(as you long as your dashboard settings are set properly).

3) I am still using mencoder for encoding video to WMV2 just to be compatible, magma already supports software conversions to most popular formats - next PMS-magma version is going to be VC1/WMA-Pro hardware accelerated so there won't be any need to go through mencoder.

About the Bluray rips that do not work, can you attach the debug.log+magma.log as well as the media file info so I can take a look?

Do they work on a normal (no magma) ps3mediaserver version? I'm trying to figure out if it's a mencoder issue or magma issue.
Posts: 18
Joined: Wed Jul 29, 2009 7:22 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby Mackey » Fri Mar 12, 2010 2:26 pm

This is excellent.

My ps3 is out of commission and have been using the Xbox with Media Centre which has not been the best.

Watched a x264 file today, video and sound were close or the same as ps3 and 5.1 to boot.

Keep up the good work whitefrt!
Posts: 5
Joined: Sun Feb 01, 2009 5:26 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby master3dfx » Thu Mar 18, 2010 2:00 am

Yes this is fantastic!!! Now I don't have to buy another PS3 to get 5.1 in my office...
Posts: 1
Joined: Thu Mar 18, 2010 1:53 am

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby Redlum » Fri Mar 19, 2010 1:08 pm

Nice work for Windows users :) Hopefully mencoder/ffmpeg will catch up soon for the other platforms.
Project Member
Posts: 371
Joined: Mon Jan 12, 2009 9:13 pm

Re: X360: 5.1 DTS/AC3 movies now supported!

Postby gicu2 » Fri Mar 26, 2010 2:35 pm


Fantastic news!!! I decided to use ps3 media server with my xbox about a few days ago and still hadn't figure how to get dts to the receiver. I have two questions:
1) the dts/dd streams are sent as they are to the xbox right? and after that passthroughed to the receiver
2) (this might be a stupid one) do I need anything else installed? (like divx pro...)

Thank you and good luck!

Later edit:

I LOVE YOU!!! OMG it works! I finally have 5.1 DD sound! I and also hear 5.1 from DTS files but the receiver won't show DTS - it shows normal DD. The "Keep DTS in audio stream" option is set. Any ides? or maybe I'm just to obsessed :D

Now I have to get a new CPU :)))))

Many, many thanks!!!!!
Posts: 1
Joined: Fri Mar 26, 2010 2:24 pm


Return to Additions and Plugins

Who is online

Users browsing this forum: Google [Bot] and 7 guests