AC3Filter support
September 02, 2010, 06:34:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download NEW AC3Filter 1.63b
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: SPDIF and AC3Filter  (Read 162626 times)
valex
Administrator
*****
Posts: 509



View Profile WWW
« on: July 24, 2006, 02:41:39 PM »

This info still not included into the doc so I publish it here...

How SPDIF output works.

How sound cards handle SPDIF

General info about SPDIF

Initially SPDIF was used only to transmit stereo PCM data in one direction from one device to another (for example from a CD player to a receiver). It is very straightforward: audio samples are transmitted at constant frequency, one-by-one (and bit-by-bit) in 32-bit blocks where 8 bits are used for synchronization and some side info and 24 bits are used for sample. In most cases, only 16-bit transmission is supported and low 8 bits of a sample are always zeroed.

Obviously, it is very limited (constant bitrate, no synchronization supported, etc). On other hand, it is very simple and cheap and so it became widespread.

Therefore, when multi-channel sound era came to home theaters, SPDIF was ideal candidate for digital interface to transmit multi-channel sound. However, it is a problem: current interface implementations work only with stereo 16-bit PCM but now it is required to transmit up to 6 channels (or 8 channels at present). It was decided not to change the interface but to transmit compressed multi-channel data instead of PCM (for digital interface it does not matter what to transmit). So receiver must recognize compressed data and decode it. For this purpose a new standard was introduced (IEC 61937) that describes how compressed data must be transmitted and how receivers can distinguish PCM and compressed data.

Because compressed data is transmitted in place of PCM data, the bitrate of compressed data must be exactly the same as uncompressed stereo 16-bit PCM bitrate. Most of compressed streams (even multi-channel) have lower bitrate. Because of this compressed stream must be padded with zeros to match PCM bitrate. But some DTS streams may have bitrate higher than PCM bitrate. It is impossible to transmit such streams over SPDIF.

So SPDIF interface has 2 modes: PCM data transmission and compressed data transmission. Unless noted we well use “SPDIF transmission”, “SPDIF output mode” and “SPDIF stream” terms only for encoded streams afterwards.

What is multi-channel AudioCD

Compressed data may be transmitted over SPDIF instead of PCM data. Therefore we can prepare an AudioCD and place compressed AC3 or DTS data instead of usual PCM data. When we playback this disk with a CD player connected to a receiver we'll get true multi-channel sound!

But this trick does not work with analog connection and portable CD players: we'll get terribly loud noise instead of nice music. Because of this AudioCDs with AC3/DTS tracks are rare.

What is 14bit DTS

As was said before, SPDIF data is transmitted instead of PCM data. Therefore, it may be mistakenly played back as PCM format and make harsh noise. To make this noise less unpleasant DTS stream may be converted from 16bit to 14bit format that reduces the loudness of the noise. This conversion is lossless and does not affect the quality of the sound.

14bit DTS format is usually used at multi-channel AudioCD with DTS track (AC3 format does not allow conversion). Therefore, when usual CD player plays it back it makes less noise.

DTS over SPDIF

There are two ways to transmit DTS stream over SPDIF:
* Wrapped - DTS stream is wrapped according to IEC 61937 standard. Each DTS frame is supplemented with SPDIF header and padded with zeros to match SPDIF bitrate.
* Padded - DTS stream is only padded with zeros to match SPDIF bitrate.

Note, that it may be impossible to convert padded DTS stream to wrapped one because excessive SPDIF header may break SPDIF bitrate restriction. Wrapped to padded stream conversion is always possible.

Multi-channel AudioCD usually use padded DTS stream type. Therefore, it may be impossible to decode it with a decoder that only supports wrapped stream type.

How sound cards transmit PCM over SPDIF

When some application starts a multi-channel PCM playback, sound card allows this. However, because of SPDIF interface can carry only two channels, sound card always downmixes multi-channel PCM data to stereo. PCM data transmitted over SPDIF is always stereo!

Some sound cards have several SPDIF outputs that can transmit multi-channel data (3 SPDIF outputs can transmit 6 channels). But most receivers do not support this function (even receivers with several SPDIF inputs). Therefore we will not consider this case afterwards.

SPDIF sample rates

SPDIF interface supports 3 standard sample rates: 48kHz, 44.1kHz and 32kHz. All other sample rates are impossible to transmit. Nevertheless, most audio cards support only 48kHz output. Therefore widely used 44.1kHz audio on such sound card cannot be SPDIF’ed.

SPDIF transmission monopoly

Sound cards allow playback of many audio streams at the same time (either by hardware or at driver level). How it works? All PCM audio streams from all applications are mixed, streams with different sample rates are resampled and result is sent to one physical output. Therefore, Windows works like it can playback any sound at any time. But SPDIF transmission requires playback monopoly because SPDIF stream is encoded and it cannot be resampled and mixed with other streams. Therefore, only one SPDIF transmission at a time is possible. Also all PCM output must be muted during this transmission.

When some application starts SPDIF transmission sound card must do following:
1)   mute all PCM sounds
2)   open exclusive SPDIF output channel
3)   start transmission
4)   prohibit any other try to start SPDIF transmission

When SPDIF transmission stops sound card must do following:
1)   stop SPDIF transmission
2)   close SPDIF output channel
3)   restore all other PCM output
4)   allow applications to start a new SPDIF transmission

For example, imagine that you have Winamp playing some music in background. You start watching a movie with AC3 sound track in SPDIF passthrough mode. When you start a movie, sound card mutes Winamp’s music and gives exclusive playback right to the media player. Media player starts playback. After receiving of some data receiver recognizes compressed SPDIF transmission and changes indication from “PCM” to “Dolby Digital”. When you pause (not stop) the movie playback, sound card closes SPDIF transmission and restores music playback from Winamp. Receiver does not recognize any compressed transmission anymore and changes “Dolby Digital” back to “PCM”. But exclusive right on SPDIF playback still belongs to the media player because it did not actually close SPDIF playback but just pause it. So if you try to start another movie in SPDIF mode (without closing of the current one) filter will fail to start SPDIF transmission and will start PCM playback. When you stop the first movie playback, the media player actually closes SPDIF output and exclusive SPDIF right sets free so any other application can use it.

Bug with switching between PCM and SPDIF

So, sound card handles switching between PCM and SPDIF output mode. But not all sound cards can do this correctly. When you pause SPDIF playback sound card change SPDIF mode to PCM and may not restore SPDIF after playback resumes. In some cases, sound card may disable PCM mode without enabling SPDIF. In the last case sound disappears ALL TOGETHER!

How the filter handles SPDIF

SPDIF modes

SPDIF transmission is used only when “Use SPDIF” option is enabled. It will be implied afterwards.

It is 3 SPDIF output modes possible:
1)   SPDIF passthrough mode. In this mode, compressed stream is sent to SPDIF without any change. It is impossible to process compressed stream without decompression. Therefore no other filter option can work in this mode (even filter cannot display input/output levels). We cannot even change the sound volume from the computer (only receiver’s volume control works).
2)   SPDIF encode mode. In this case, input stream is decoded, processed and encoded to AC3 that is sent over SPDIF. Because we have decoded stream in this case, all processing options work. We can change number of channels, control gain, etc before sending the result to the receiver. This allows any stream (even not directly supported by receiver or SPDIF at all) to be sent to receiver over SPDIF.
3)   Disabled. Filter does not do SPDIF transmission.

DTS over SPDIF passthrough

AC3Filter supports both DTS output modes (wrapped and padded). You may set desired mode with “SPDIF/DTS output” options. “Auto” directs the filter to use wrapped format if possible and padded otherwise.

It may be impossible to convert padded DTS stream to wrapped one. Therefore, if you set the filter to use wrapped format, it may not enable DTS passthrough for some audio tracks (DTS from multi-channel AudioCD for instance) and use AC3 encode mode instead.

To reduce the possible noise level you can set the filter to convert DTS to 14bit format with “Convert to 14bit option”. This conversion increases the bitrate of the stream and converted stream may not match SPDIF bitrate restriction. Therefore, the filter does this conversion only when possible.

Note, that receiver/decoder may not support some combinations of wrapped/padded 16bit/14bit stream types.

SPDIF mode decision

How filter decides what mode to use for given input? Let’s see internal data flow diagram:



It is two SPDIF decision points:

1.   SPDIF passthrough decision. At this point filter does following checks:
1.1.   Is given format supported by receiver and allowed for passthrough? This is controlled by “SPDIF passthrough” options. Only checked formats are allowed.
1.2.   Is given sample rate allowed for SPDIF output? This is controlled by “Restrict sample rates” option. If restriction is enabled, filter allows only checked sample rates. (See below for details)
1.3.   Does sound card support given SPDIF format? This check is done only when “Check output format support” option is enabled. It is not recommended to disable this check! (See below for details)
If all checks passed, filter enables SPDIF passthrough mode.

2.   SPDIF encode decision. At this point filter does following checks:
2.1.   Is encode allowed? This is controlled by “Use AC3 encoder” option.
2.2.   Do we need to encode this stream? It is an option “Do not encode stereo PCM” to inhibit encoding of stereo PCM (See below for details)
2.3.   Can current stream be encoded? Not all channel configurations and sample rates are allowed for AC3.
2.4.   Is given sample rate allowed for SPDIF output?
2.5.   Does sound card support given SPDIF format?
If all checks passed, filter enables SPDIF encode mode.

SPDIF output support

When filter tries to open SPDIF output it first asks: “Dear sound card, would you please playback SPDIF with X sample rate?”. If sound card can do it filter starts an SPDIF transmission. If sound card refuses filter disables SPDIF output.

The reason for this dialogue to fail may be:
1)   Sound card does not support SPDIF output at all
2)   Driver does not support SPDIF output (USB sound cards)
3)   Driver does not support dynamical format change to/from SPDIF (SB Live 24bit)
4)   Sample rate is not supported for SPDIF
5)   Another process has open SPDIF transmission

Filter cannot get to know why sound card refuses SPDIF transmission. It can just to establish a fact. You can disable this dialogue with ‘Check output format support’ option on System page. But in most cases you’ll just get no sound at all instead of correct PCM output (that is better than nothing). So it is strongly not recommended to disable this option.

SPDIF-as-PCM trick

Sound card tricking may solve problems number 2 and 3. Because of PCM nature of SPDIF transmission we can trick the sound card and say that we want to transmit PCM data, but send compressed stream instead. This is controlled by “Output SPDIF as PCM” option.

However, this trick works only when sound card does not alter our data and transmit it bit-by-bit directly to SPDIF output:
1)   Volume settings in both sound card mixer and player must be at maximum level. Otherwise sound card applies gain to our compressed stream and breaks it.
2)   It must be no other sound playing. Otherwise sound card will mix PCM and compressed data what leads to destruction of compressed data structure. Therefore, you must disable any background music. Any sound during movie playback (like ICQ notification, or something other) will temporarily break normal playback and produce loud noise.
3)   Sound card must truly support the given sample rate. Many sound cards support only 48kHz and do sample rate conversion for other sample rates. Sample rate conversion like any other manipulation breaks compressed stream.

Filter cannot control first two conditions so you must set volume and disable all background sounds manually. But filter may verify sample rate and prohibit SPDIF transmissions with incorrect sample rates (thus protecting you from the loud noise caused of broken compressed stream and eliminating the need to enable/disable SPDIF each time for movies with different sample rates).

Warning! This option may force the filter to produce LOUD noise if used incorrectly!

SPDIF sample rate check

SPDIF sample rate check is controlled by “Restrict sample rates” option. If this option is enabled, SPDIF transmission will be enabled only for streams with allowed sample rates. Generally, this option is required when SPDIF-as-PCM trick is used.

Suppose that we have sound card that supports only 48kHz. With SPDIF-as-PCM trick, we transmit compressed data in PCM output mode. Sound card agrees to playback any sample rate but does sample rate conversion for “incorrect” sample rates. Therefore, movies with 48kHz audio track will be played correctly and 44.1kHz will produce terrible noise. To eliminate this we must enable SPDIF transmission only for “good” sample rates and use plain PCM output for any other sample rate.
 
This option is useful anyway. Without SPDIF-as-PCM trick, it forces the filter to report about disallowed sample rate instead of simply stating that sound card cannot do SPDIF transmission.

Why not to encode stereo PCM

When encoding to AC3 loss of quality occurs (it is an axiom for any lossy encoding format like mp3, ac3, ogg, aac and others). It is the only way to transmit 6 channels over SPDIF with reasonable low distortions. But if we have stereo track why we need to encode it and loose quality? As was said before SPDIF interface was initially used to transmit stereo PCM data. Therefore, when we have stereo PCM it is better not to encode it to AC3 but transmit it 'as is' without any quality loss.

Stereo encoding is controlled by “Do not encode stereo PCM” option. When this option is enabled, stereo output will not be encoded. Note that SPDIF status will be set to ‘Disabled’ even in case when SPDIF is enabled and allowed. Sometimes it may be dubious why. Nevertheless, it is recommended not to disable this option.

This option affects only stereo output. Multi-channel output will be encoded anyway (unless “Use AC3 encoder” option is disabled).

SPDIF status reporting

At the “Decoder info” box filter displays processing information. If “Use SPDIF” checkbox is enabled current SPDIF status with all SPDIF options is also shown there. Example:

Code:
Input format: DTS - 44100
User format: PCM16 - 0
Output format: PCM16 3/2.1 (5.1) 44100

Use SPDIF
  SPDIF status: Disabled (Disallowed sample rate)
  SPDIF passthrough for: AC3 DTS
  Use AC3 encoder (do not encode stereo PCM)
  Check SPDIF sample rate (allow: 48kHz)
  Query for SPDIF output support


This means that we have 44.1kHz DTS track at input. Current output format is PCM 5.1 (6 channels) 44.1kHz. 'Use SPDIF' is enabled but transmission was not set because sample rate is incorrect for SPDIF transmission. Below we can see that sample rate check is enabled and 48kHz is the only allowed sample rate.

Let’s summarize reasons why SPDIF transmission may not be possible:
* Do not encode stereo PCM - We have stereo output and “Do not encode stereo PCM” option is enabled.
* Disallowed sample rate - “Restrict SPDIF sample rate” option is enabled and sample rate of the current track is not allowed.
* SPDIF output is not supported - Sound card refused to open SPDIF output channel. See SPDIF output support for more info.
* AC3 encoder disabled - SPDIF passthrough is forbidden and “Use AC3 encoder” option is disabled.

SPDIF pause bug

As was said before some sound cards have a bug with pausing of SPDIF playback. After pause sound card switches to PCM output mode and does not restore SPDIF playback afterwards. In this case, sound card requires complete reinit (i.e. we need to close current audio playback and open it back again) after each pause/seek command. It is controlled by “Force SPDIF to reinit after seek/pause” option. Enable this option ONLY if your sound card has this bug because it breaks normal data flow in DirectShow.

Technical details
It is no direct support for sound card reinit neither in DirectShow nor in any media player. But solution exists. Filter changes output format to PCM and sends several null samples to downstream. So sound card has to close current SPDIF output channel, and open PCM output. After that filter changes output format back to SPDIF and continues transmission from the point it was stopped. Sound card has to open a new SPDIF output channel and starts playback normally.

Details for programmers
Problem occurs with IDirectSoundBuffer::Stop(). Following code switches sound card to PCM mode:

IDirectSoundBuffer8 *ds_buf;
// open, init, start playback...

ds_buf->Stop();
ds_buf->Play(0, 0, DSBPLAY_LOOPING);

It does not matter that Play() is called just after Stop() or after some time. Anyway after Stop() SPDIF transmission stops forever.


SPDIF and post-processing

Some players may use post-processing filters (equalizers, DRC, etc). Usually such filters do not support SPDIF because SPDIF stream cannot be processed at all.

Normally when 'Use SPDIF' option is enabled filter publish 2 output formats: SPDIF and PCM at the same time. It means that filter says: "I can do both PCM and SPDIF output, choose one that you can use, but know that SPDIF is preferred". If sound card that does not support SPDIF, it can choose PCM and work properly with using of AC3Filter. Also if movie contains sound track that cannot be SPDIF'ed on current sound card (for example 44100Hz track) AC3Filter will switch to PCM playback automatically.

Now let's consider a media player that does audio post-processing. If player see that AC3Filter can do PCM output it decides to do post-processing and inserts post-processing filter after AC3Filter. When playback starts AC3Filter asks next filter (that is post-processing filter): "Could you accept SPDIF stream"? Post-processing filter refuses and AC3Fitler starts PCM playback and reports that "SPDIF output is not supported".

The best way to force SPDIF to work in this case is to disable ALL audio post-processing options of your player (equalizers, DRC, etc) or use another player. Some filters installed with super-mega-codec-packs may be used automatically. In this case it's better to uninstall such filters.

But sometimes it's very hard to determine how to force the player not to use post-processing. SPDIF-as-PCM trick cannot force the problem because post-processing filter will certainly break the SPDIF stream. In this case it is possible for AC3Filter not to publish PCM format in SPDIF mode with 'Disallow PCM output in SPDIF mode' option. When this option is enabled filter says that it supports only SPDIF output. Player cannot use post-processing filter after AC3Filter (because post-processing will refuse to work with SPDIF stream) and will be forced to connect AC3Filter directly to sound card renderer filter.

Warning! Using 'Disallow PCM output in SPDIF mode' option may force the player to not use AC3Filter in some cases. If an audio track of a certain movie cannot be SPDIF'ed, the player will not use AC3Filter at all. You have to disable 'Use SPDIF' option to use AC3Filter with this film and enable it back again if you want to watch another movie in SPDIF mode.
Logged
valex
Administrator
*****
Posts: 509



View Profile WWW
« Reply #1 on: July 30, 2006, 05:54:04 AM »

And some more info about real sound cards:

Creative SB Live 24bit
==============
This sound card does not support switching between SPDIF and PCM modes on the fly. Because of this it is 2 ways to enable SPDIF playback:

* Set "Use SPDIF" option BEFORE playback with configuration utility. But in this case bugs with switching between SPDIF/PCM modes possible. For example consider a DVD that has 2 tracks: AC3 and LPCM. If you want to switch from AC3 track to LPCM filter should switch from AC3 passthrough to PCM output (if we do not want to loose quality). This switch will fail. Thus we must turn off "Do not encode stereo PCM" option too and accept the inevitable quality loss.

* Use SPDIF-as-PCM trick. This solves previous problem, but requires to manually setup sound card (set all volme level to maximum) and turn off all sounds before each playack.

SoundMAX (ADI1985)
==============
Stops SPDIF playback after pause/seek (see SPDIF pause bug). Therefore if you want to use SPDIF output you have to enable "Force sound card to reinit after seek/pause" option. This porduces some short (~1 sec) artifacts after each pause or seek (picture stops or moves jerkly and no sound) during sound card reinit.

USB sound cards
===========
Now you can use USB sound cards for SPDIF output. Although most drivers do not support SPDIF output, it can work with "SPDIF-as-PCM output" option enabled. Note that you must set all volume controls to maximum and turn off all sounds before playback. Also it is recommended to use "Restrict sample rates" option.

Abit UA-11 USB sound card supports 44100Hz sample rate! It is the only sound card I have that supports this at all. Even another USB sound card I have (Zalman) does not support this feature.

Creative Live 5.1
===========
This card works well with SPDIF output. But sometimes it looses syncroization after pause/seek (sound disappears or become stuttering). This happens only sometimes so you may just pause, wait a little and resume again or enable "Force sound card to reinit after seek/pause" option to eliminate this at all.
Logged
Naveen
Newbie
*
Posts: 2


View Profile
« Reply #2 on: August 03, 2006, 05:13:41 PM »

Hello

Thanks for the above.

Can we have PCM encoded (non-AC3, DTS, MPEG) SPDIF output support please? I have a DAC in a sony minidisc deck which only supports PCM encoding, I use it to drive a stereo valve amp, and I'd like to bypass the pins past teh AC3 decoder and just output direct to the DAC straight from your plugin.

I do have AC3 supporting and DTS supporting DAC in an amp but it's uses 300w+ ... and it's a BAD amp. Even that DAC with PCM is iffy.

Currently I'm using Reclock with kernel streaming support. I would have preferred ASIO for quality, but it's better compared to not using reclock (say, just direct-sound).

With the settings I used with 1.07a this was reported;

Input format: AC3 - 48000
User format: PCM16 2/0 (stereo) 0
Output format: PCM16 2/0 (stereo) 48000

Use SPDIF
  SPDIF status: Disabled (AC3 encoder disabled)
  SPDIF passthrough for: -
  Do not use AC3 encoder
  SPDIF as PCM output  Check SPDIF sample rate (allow: 48kHz 44.1kHz)
  Do not query for SPDIF output support

Decoding chain:
(AC3 - 48000) -> Decoder -> (Linear PCM 3/2.1 (5.1) 48000) -> Processor -> (PCM16 2/0 (stereo) 48000) -> Dejitter -> (PCM16 2/0 (stereo) 48000)

Filters info (in order of processing):

Decoder:
AC3
speakers: 3/2.1 (5.1)
sample rate: 48000Hz
bitrate: 384kbps
stream: 8 bit
frame size: 1536 bytes
nsamples: 1536
bsid: 8
clev: -3.0dB (0.7071)
slev: -3.0dB (0.7071)
dialnorm: -27dB
bandwidth: 10kHz/18kHz


I need the filter to output simple PCM encoded stereo and not require AC3 (or DTS, Mpeg) format support over the bandwidth of the SPDIF connection.

Thank you.
Logged
valex
Administrator
*****
Posts: 509



View Profile WWW
« Reply #3 on: August 04, 2006, 03:03:17 AM »

Quote
Can we have PCM encoded (non-AC3, DTS, MPEG) SPDIF output support please? [...] I use it to drive a stereo valve amp, and I'd like to bypass the pins past teh AC3 decoder and just output direct to the DAC straight from your plugin.


DirectShow has several types of filters:
* Source filters
* Transform filters
* Renderer filters

Audio output is done by Audio Renderer filter (like Reclock). AC3Filter is transform filter. It means that it just transform an audio stream from one format to another (from AC3 to PCM for instance). Therefore it should not work with sound card directly. Only through Renderer filter (Default DirectSound/WaveOut, Reclock or other).

AC3Filter con do conversion from AC3 (for example) to stereo PCM. If you want to output it exactly as is (bit-to-bit) to SPDIF you should do same things as for SPDIF-as-PCM mode:
1) Raise all volume controls (in both media player and Windows)
2) Sound card must support given sample rate, otherwise sample rate conversion will be applied.
Logged
bobbytimbo
Newbie
*
Posts: 1


View Profile
« Reply #4 on: September 05, 2006, 04:07:43 AM »

HI - thanks for a fantastic product.  I previously purchased a XITEL USB sound card to allow me to play AC3 through my Yamaha receiver.  They supplied a special version of PowerDVD which was apparently custom built for them that allowed me to play DVD's and pass AC3 to the amplifier.  While that version worked, no other software players or even later versions of PowerDVD worked.  In addition, I wanted to play video files that were AC3 encoded but no players would output the AC3.  The custom powerdvd version that worked with dvd's just crashed when I tried to play an AC3 file.  I was tearing my hear out trying to understand what they had done to get dvds on their version to work and yet no other programs had done something similar.  I had tried earlier versions of AC3 filter with no success.  Your description here of how it works is fantastic and I finally thing I understand the issues.  On top of that you have produced this version that has has the SPDIF as PCM option.  I have tried it and can confirm it works perfectly with media player classic!

You can therefore add to your list of working USB cards, the XITEL PRO.  I know there are a number of other XITEL users who were trying to get this to work and will be happy to know that your program finally allows them to get it working.  I am guessing that your SPDIF as PCM trick is what the custom version of powerDVD did.

Thank you from a very happy user of your software.
Logged
vss
Newbie
*
Posts: 4


View Profile
« Reply #5 on: September 09, 2006, 11:39:57 PM »

I tested ac3filter together with the U-Control UCA202 usb sound card from Behringer (http://www.behringer.com/UCA202/index.cfm?lang=ENG)

This sound card is quite remarkable as it supports 32,000 Hz, 44,100 Hz and 48,000 Hz sample rates, has an optical toslink spdif output and costs around 30 euro. The card is based on the pcm2902e chip.

It works perfectly with ac3filter, but there is a trick: stereo channels in “Output SPDIF as PCM” mode must be reversed!

The receiver I’m connecting the card to is Cambridge Audio Azur 540R.

Actually I’ve been trying to get DTS output playing a DTS wav file, but only heard unprocessed hum, the receiver couldn’t lock into it. Then I tried to reverse stereo channels (foobar2000 has a built in plugin), and magically the receiver locked on the stream.

I tried the same trick with Winamp, there is a Stereo Swapper plugin http://winamp.com/plugins/details.php?id=115768. While this plugin is engaged, the card outputs DTS stream that can be processed by the receiver.

Also, using the same plugin and ac3filter in Winamp I was able to play different movies with ac3 sound. Receiver decoded them perfectly. If the stereo swapper plugin is stopped – no lock and only hum is heard.

To further test the card I made a simple mp3 file with one stereo channel muted and played it in normal mode (no reverse). Strangely enough, the card outputs stereo pcm properly, the channel I expected was muted.

So I simply can’t understand what can cause such behaviour, as it seems that both card and receiver process stereo output properly, but hiccup on dts/ac3 streams unless reversed.

I thought, maybe, Alexander, you could add a small switch in the config of ac3filter to reverse channels for such cards as Behringer’s? Would be cool.

I made a small screenshot with the proposed enhancement:


PS. Yes, there is a workaround for foobar2000 and Winamp, but the problem exists if one is trying to play a DVD in Media Player Classic. There is no stereo reverser plugin for it, afaik.

I tried to find a directshow filter that can reverse channels, found only TFM Audio Filter, but that one apparently somehow modifies  the stream (not only reversing channels). With that filter I couldn’t get dts/ac3 to work...

vss.
Logged
jwilson56
Newbie
*
Posts: 1


View Profile
« Reply #6 on: October 13, 2006, 07:52:46 PM »

Ok after playing with my Xitel and AC3Filter for hours and still not getting it to work I am asking for help. I can hear non dolby sound ok but when I play something like T2 Extreme HD all I hear is sputtering... any help in how to get this to work would be appreciated.

John
Logged
deathCab
Newbie
*
Posts: 1


View Profile
« Reply #7 on: October 17, 2006, 03:03:17 PM »

Hi,

I'm using C-Media sound-card (Apache acs200, if it helps anyone Smiley), and it has an optical spdif out. It has a utility that allows me to turn on and off the spdif output, and also change the sampling rate. It supports 48khz and 44.1khz.
The computer is connected via this out to a receiver. Now, when I play a dvd using PowerDvd, it has an option to direct all sounds through spdif. I guess it does that using the digital out of the dvd drive itslef, which is connected to the sound card - bypassing all processing by softwar. This works, and I was able to get Dolby written on my receiver Smiley
This is good only for Dvds but what if I want to watch something downloaded? Ive tried watching the dvd using Media player (not classic - the media player that comes with windows) after installing the latest version of AC3 filter.
The filter didn't recognize the fact that my sound card has spdif, so I tried using the trick - spdif to pcm - alas! that didn't work. All I got was noise (the dvd was using a 48khz sample rate). Of course I followed your instructions carefully - no other program was making sounds, and the volume on the player and on the mixer were at the maximum.
What do you think is wrong???

thanks a lot.
Logged
nimd4
Newbie
*
Posts: 1


View Profile
« Reply #8 on: October 20, 2006, 12:21:33 PM »

deathCab while this isn't the support topic as I reckon rest would agree, Windows Media Player is the trickster (more like $hit$ter, but anyway) .. you should know by now (excuse the attitude) that micro$oft doesn't care about the consumer, but to push its commercial product out by any means necessary (excuse nothing) ..

Perhaps try the following (their info. pages long forgotten - I don't ask questions & they play sound Tongue):

http://hosted.filefront.com/4dmin

I'm guessing upgrading to Media Player 10 might also help (forget 11 - it's useless Wink) .. valex tnx for text! Smiley
Logged
valex
Administrator
*****
Posts: 509



View Profile WWW
« Reply #9 on: October 21, 2006, 03:28:29 AM »

deathCab

Try option "Disallow PCM output in SPDIF mode". I have reports that it helps in such cases. (Read more at new section "SPDIF and post-processing" above).
Logged
Pelican
Newbie
*
Posts: 5


View Profile
« Reply #10 on: November 01, 2006, 01:31:22 PM »

I got a USB sound device (this one) a couple of weeks ago.
It has a Burr Brown PCM 2906 chip inside, and I couldn't make it work with DTS Audio CDs until I read vss's post. The reverse channel in foobar works greatly for me too.
I use this device connected to my H/K avr (with coaxial digital cable).
It works perfectly with normal PCM stereo signal (32, 44.1 and 48 kHz).
I've read valex's detailed information about AC3Filter and spdif, but I still cannot make AC3 sound for movies.
The solution could be the channel reversing which works properly in foobar and winamp.
How can I change the channels in AC3Filter?
I need that new feature of AC3Filter described by vss in his post.

Decoder info:
Input format: AC3 - 48000
User format: PCM16 - 0
Output format: PCM16 2/0 (stereo) 48000

Use SPDIF
  SPDIF status: SPDIF passthrough
  SPDIF passthrough for: MPA AC3 DTS
  Use AC3 encoder (do not encode stereo PCM)
  SPDIF as PCM output  Do not check SPDIF sample rate
  Do not query for SPDIF output support

Decoding chain:
(AC3 - 48000) -> Spdifer -> (SPDIF 3/2.1 (5.1) 48000) -> SPDIF->PCM -> (PCM16 2/0 (stereo) 48000) -> Dejitter -> (PCM16 2/0 (stereo) 48000)
Logged
vss
Newbie
*
Posts: 4


View Profile
« Reply #11 on: November 01, 2006, 11:47:57 PM »

Quote from: "vss"

PS. Yes, there is a workaround for foobar2000 and Winamp, but the problem exists if one is trying to play a DVD in Media Player Classic. There is no stereo reverser plugin for it, afaik.


Hi, that's me again about channel reversing in order to get DD/DTS output. Somehow initially I overlooked the possibility to map channels in Media Player Classic. In fact, via Options->Internal Filters->Audio Switcher one can do such a mapping. Done so I can watch dvds with DTS/Dolby Digital without any probs.

But still, I would be very grateful if Valex decided to implement possibility to reverse channels natively in ac3filter!

vss.
Logged
Pelican
Newbie
*
Posts: 5


View Profile
« Reply #12 on: November 02, 2006, 02:20:21 AM »

Quote from: "vss"
In fact, via Options->Internal Filters->Audio Switcher one can do such a mapping. Done so I can watch dvds with DTS/Dolby Digital without any probs.


It works for me, too!

I've tried to cross map channels inside in AC3Filter, but it doesn't work.
Logged
obvious
Newbie
*
Posts: 5


View Profile
« Reply #13 on: November 17, 2006, 08:57:08 PM »

I dont understand the grid layout for the mapping? I'm probably being dense but how does it work?
Logged
fudun
Newbie
*
Posts: 1


View Profile
« Reply #14 on: November 19, 2006, 11:48:18 AM »

Hi, I've been trying for ages to get proper ac3-output from my computer, but can't seem to get it working.

I am using zoomplayer with ffdshow and ac3filter to play an .avi file with an 48khz AC3 stream, but when I enable SPDIF in AC3filter, there's no digital sound output at all. Do i have to disable FFDshow entirely?

I have a Audigy 2 pci sound card connected to a Pioneer AX2 receiver.

Could anybody please help me?

Here's AC3filters decoder info:

Input format: AC3 - 48000
User format: PCM16 3/2.1 (5.1) 0
Output format: SPDIF 3/2.1 (5.1) 48000

Use SPDIF
  SPDIF status: SPDIF passthrough
  SPDIF passthrough for: AC3
  Use AC3 encoder (do not encode stereo PCM)
  Check SPDIF sample rate (allow: 48kHz)
  Query for SPDIF output support

Decoding chain:
(AC3 - 48000) -> Spdifer -> (SPDIF 3/2.1 (5.1) 48000) -> Dejitter -> (SPDIF 3/2.1 (5.1) 48000)

Filters info (in order of processing):

Spdifer:
SpdiferSPDIF/AC3
speakers: 3/2.1 (5.1)
sample rate: 48000Hz
stream: 8bit
frame size: 1536 bytes
nsamples: 1536

Dejitter:
-
Logged
Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!