Log in

View Full Version : 5.1 AAC over SPDIF


daft009
18th June 2006, 03:14
i have a movie which has a 5.1 AAC soundtrack but i'm only able to get stereo output to my amp.
my htpc is connected to my amp via a digital coaxial cable.

I feel like i'm missing something very basic as I've been googling for a couple of days and tried various things..



tried ac3 filter v1.01a. according to its mixer tab input is 6ch and output is 6ch. but amp is only getting stereo.
tried ffdshow audio, but on the output tab, 'AC3 and bitrate' is greyed out.
i tried Dolby Out DS filter by Haaan, but that just crashes the various media players I use.


I have no problems playing a dvd and getting 5.1 DD or DTS over SPDIF, so my connections are okay.

anyone have any suggestions?

thanks! :)

Skelsgard
19th June 2006, 01:36
I have no problems playing a dvd and getting 5.1 DD or DTS over SPDIF, so my connections are okay.
Thatīs cause your decoder "understands" SPDIF AC3/DTS signals. The PCM signal send thru SPDIF to an external decoder carries the flags needed for the decoder to know if itīs a standard PCM or encoded PCM (AC3 and DTS). The SPDIF signal IS STEREO, the decoder (analysing the flags) decides wheter to read it as PCM (wich is always stereo) or decode it as AC3 or DTS (wich can be multichannel).
U need to convert on-the-fly to AC3.
U can do it with ffdshow.
1) Use ffdshow to decode the AAC.
http://img115.imageshack.us/img115/664/ffdshow0013fb.jpg

2) Resample on-the-fly to 48.000.
http://img131.imageshack.us/img131/9367/ffdshow0035ac.jpg

3) And encode to AC3 (640, for quality purposes).
http://img128.imageshack.us/img128/9660/ffdshow0025tc.jpg

Hope it helps.

SeeMoreDigital
19th June 2006, 16:36
You might find this link might be helpful too: -

http://forum.doom9.org/showthread.php?p=718812#post718812


Cheers

daft009
1st July 2006, 02:06
thanks heaps for the suggestions..

got it working now! :D

Z0r0b
5th July 2006, 10:57
I tried this method, but it didn't work for me. When i tried to play my video i got an error that media center was missing files to play the media. However I noticed something interesting. Today for another issue I had enabled PCM in AC3Filter. I hadn't actually tested the effect of this on my video files. Now when I play all videos my AMP is getting 5.1 Dolby Digital. AC3Filter is mixing it to 5.1. It sounds great, much better than using PLII mode in the amp to do the same thing. How is this different to the method listed above?

Ok, I uninstalled the K-Lite codec pack and resinstalled the standard version. This got rid of AC3 filter. I did everything listed above and when i playback a media file, Media Center freezes. In windows media player I get this error "The pin cannot use the supplied media type". I can only use 16 bit in the output options but then i don't get AC3. If i switch it to AC3 during playback the sound just cuts off.

Any ideas on how to resolve this issue?

Skelsgard
6th July 2006, 04:08
... How is this different to the method listed above?
Not much. U just changed the 3rd step: instead of having ffdshow doing the ac3 encoding, uīre using AC3filter. I imagine that in Graphedit u can see ffdshow connecting to ac3filter, right?.

Ok, I uninstalled the K-Lite codec pack and resinstalled the standard version.
I am seriously against codec packs, no matter wich one. Personally, the only way to pinpoint possible problems with DirectShow is by having absolute control on the filters and codecs installed. And that only comes with personalized installation of specific filters/codecs one at a time.

...Media Center freezes...
I also stay away from anything from M$, considering that there are thousans of better apps outthere, so canīt help u there.

sjchmura
6th July 2006, 04:53
SO I have this setup and working well for MP4 video I make with MeGUI or Nero (all AVC 5.1 souround)

However the MP4's from quicktime download (like trailers) "pause" for 3 seconds at startup and then there is no audio (but thie video plays fine).

With teh NVIDIA drivers, purevideo, and Nero 7 along with FFDSHOW for the audio my 720p MP4 AVC encodes are playing with 25% CPU. So I have NO idea wy the quicktime trailers are not using.

Z0r0b
6th July 2006, 09:12
Ok I uninstalled K-Lite and installed ffdshow and the Haali media splitter. Once again I used the same settings as specified above and exactly the same problem. I can't get AC3 output working. I also tried CoreAAC, but that doesn't have any options to output AC3. All I could do with that was disable downmix to 2 chanels.

One question, if I'm outputting 6 channels at 16bits to my amp, and amp is showing ProLogic II, how would this differ to an AC3 output?

daft009
6th July 2006, 22:20
a similar idea crossed my mind...

currently, we can use software (ffdshow) to 'enhance' picture quality.
is there a way (software) we can upmix stereo to 5.1 in realtime? (like what those HDA mystique soundcards do)

Rockaria
6th July 2006, 23:47
Among several DSF enabled players, I prefer MPC and gomplayer. Both have the builtin plugins but also can use and override the default(global, system) codec priorities.

@sjchmura, it seems to be the codec/filter conflicts. evaluate & choose the best environment for you : players, codec packs..

@Z0r0b, WM is not flexible in controlling the filters. try using the MPC and right click to see the filters being used. you might want to override the filter merits for the player : disable, reorder the filters used, set the priority internally for the player.

@daft009, yes, the mentioned AC3filter & FFDShow-Audio do the upmix by setting the output/speaker mode to 6ch.
Also you can adjust the predefined matrix value depending on the environment & tastes.

There are some differences between the digital out mode :
1. AC3 output by codec setting(ffdshow's spdif-out/passthrough) : no decoding, bypasses the DSPs and system mixer, requires the sampling rate & size compatible to the driver-codec-decoder(48k-16~24bit was OK for me).
2. AC3 out by s/w dynamic encoding : affected by filter chains, but bypasses the system mixer. upsampling DSP will be useful to make the stream compatible for the spdif output.
3. AC3 output by the system mixer(soundstorm or HDA...) : affected by the filter chains and system mixer. Faster than the s/w ac3 encoder.

4. DPL II dynamic encoding in FFDShow & AC3filter : not full-implementations yet, faster in encoding & decoding(less latency than AC3), not discrete channel seperations, but also supports analog connections to the decoder. This also includes the game surrounds.
5. DPL dynamic encoding by the system mixer : some codecs/drivers do the downmix to the DPL compatible streams, never have seen the DPL II supports yet.

So if the sources are supported by the codec-decoder to be passthroughed, use the codec setting in the FFDShow.
If not, but the system mixer supports the dynamic ac3 encoding output, use it for the clearer output & less cpu usage.
If not, use the FFDShow's upsample DSP(& AC3-output mode) to make the stream compatible for the spdif-out related components.

If the connection compatibility or latency of the AC3 output mode is the concern, try using the FFDShow's DPL II out mode, although not fully DPL II compatible yet.

Skelsgard
7th July 2006, 03:42
@sjchmura:
However the MP4's from quicktime download (like trailers) "pause" for 3 seconds at startup
I donīt know how much "MP4" those trailers truly are. Wich player gives that "pause"? Quicktime or WMP?.
The best way to see how it renders is by checking it thru GraphEdit. Can u post an image?.

@Z0r0b: could u post a GraphEdit image too?

sjchmura
9th July 2006, 07:10
Skel,

I checked in graphedit and they look IDENTICLE to the MP4's I make with MEGUI (High profile) or Nero 7 REcode (Main) aVC. I find it all quite odd.

THe trailers play fine wtih 5.1 analog sound through nero showtime. Using ANY directshow player (nero+FFDSHOW) has these issues (WMP, Zoomplayer, Graphedit):o

Skelsgard
9th July 2006, 13:17
Try to repack the trailers to MP4 with YAMB and play the repacked files. Check if the problem remains.

sjchmura
9th July 2006, 22:13
Good idea. I thought MP4BOx only went one direction - muxing .... so YAMB can demux? Ok will try. Very strange but 100 reprodiucble.

Skelsgard
9th July 2006, 23:37
Yes, it can. It does everythign MP4Box does. Plus, when importing containers (AVI, MPG, MP4) demuxing is mandatory anyways. At least this way we can see if the problem is tracked exclusively to Quicktimeīs MP4 container or not.

sjchmura
11th July 2006, 21:15
Btw,

DItto happens when using MEGUI/MP4BOX and the SLow-HQ setting. Again, using nero digital works just fine. Remuxing does NOT solve the problem.

As a test clip (small) I am using a clip from AVIA the 5.1 sourand test. I can send you the files if you would like since they are all small (MPG=10meg, MP4's are 5meg etc)

AC3Filter handles them all just fine. I like the "control" and 640kbit encoding of the FFDshow :(

sjchmura
11th July 2006, 21:15
Btw, could libfadd vs. realaac in FFDhow make a difference??? I have been using realaac...

Skelsgard
12th July 2006, 20:34
u havenīt tested it with libfaad?
Yeah, post the files (the one that works and the one that doesnīt) if u can. U can use Rapidshare o some other free host. I īll try to test them.