AC3Filter ver 0.55b

SourceForge Logo
Russian version
Download: server1 sourceforge


AC3Filter - it is DirectShow filter for AC3 decoding. Playing .AVI with AC3 audio tracks and MPEG2 (DVD). Distributed absolutely for free (FREEWARE). Sorry if my English is bad, but I think it is better to have something than nothing.

Main features:



Contents



Download.

New versions can be found at site:
http://ac3filter.sourceforge.net
http://xvalex.hotbox.ru/programs/ac3filter

If you want to subscibe to a mailing list that announces new versions you can post a message to:
mailto:ac3filter_news-subscribe@yahoogroups.com

All versions:
http://sourceforge.net/projects/ac3filter

ac3filter ver 0.55b
server1:
http://xvalex.hotbox.ru/download/ac3filter_0_55b.zip - binary
http://xvalex.hotbox.ru/download/ac3filter_0_55b_src.zip - sources

ac3filter ver 0.54b
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_54b.zip - binary
http://ac3filter.sourceforge.net/download/ac3filter_0_54b_src.zip - sources
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_54b.zip - binary
http://xvalex.hotbox.ru/download/ac3filter_0_54b_src.zip - sources

ac3filter ver 0.53b
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_53b.zip - binary
http://ac3filter.sourceforge.net/download/ac3filter_0_53b_debug.zip - debug version
http://ac3filter.sourceforge.net/download/ac3filter_0_53b_src.zip - sources
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_53b.zip - binary
http://xvalex.hotbox.ru/download/ac3filter_0_53b_debug.zip - debug version
http://xvalex.hotbox.ru/download/ac3filter_0_53b_src.zip - sources

ac3filter ver 0.52b
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_52b.zip
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_52b.zip

ac3filter ver 0.51b
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_51b.zip
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_51b.zip

ac3filter ver 0.5b
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_5b.zip
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_5b.zip

ac3filter ver 0.3a
server1:
http://ac3filter.sourceforge.net/download/ac3filter_0_3a.zip
server2:
http://xvalex.hotbox.ru/download/ac3filter_0_3a.zip



Install.

Ñommand file - install.bat.

To install from command line run:
x:\somedir\> regsvr32 ac3filter.ax
Then import presets file preset.reg.

After install you may need to set speaker configuration (look at Speaker configuration).

If you are using Windows 98 Simplified Chineese and filter's property dialog is too small you can try dialog_patch.exe patch (run it again to revert changes).



Uninstall.


Ñommand file - uninstall.bat.

To install from command line run:
x:\somedir\> regsvr32 ac3filter.ax /u
If you want to remove all settings from registry then import uninstall.reg file.



Usage.

Filter decode ac3 streams from .avi and mpeg2 files. If everything is good then when file is open filter must be in application filter list. For Windows Media Player 6.4 filter list is at File->Properties->Advanced:



First in this example is ac3filter itself. If we open properties we'll see:



Main settings

* Bitstream information.

Top left it is bitstream information (BSI):

* Speaker configuration switch.

Left bottom it is an output speaker configuration switch. It define the real speaker configuration to wich ac3 channels will be mixed. Checkbox Subwoofer define presence of independent subwoofer (.1 channel). When present LFE is routed there, else LFE is routed to all other channels.

'SPDIF' checkbox means that ac3 stream will be routed to digital out of sound card directly and without any modification. So no one of other settings will work if this checkbox is checked.

It is nessesary to note that speacker configuration from filter properties can be changed only in certain cases. First of all playing must be stopped before (not paused). But in some cases speaker configuration cannot be changed at all (look at Speaker configuration).

* Gain levels.

Buttom middle it is gain level controls. Master and Gain controls are responsible for global gain level. Master sets desired gain level. If current sound level is too high and overflow occurs then real gain level will decrease. Current gain level shown at Gain control.

* Dynamic range compression.

By its nature ac3 is a logarithmic format. Samples are stored in form of exponents and mantissas. In terms of bits one sample can be up to 40bits long (only theoretically) or up to 24bits (normal). It provide huge dynamic range (but, as said by great Einstein all good things in this word are relative :-). This means that quiet sound with low level when played on 16-bit sound card will be not audible at all or will have very low absolute level (=> high distortions). To solve this problem it is dynamic range comression. Main idea is to raise level when sound is quiet (and vice versa when loud) before converting to 16-bit form. There are special markers in ac3 stream for current level change. This markers are set by producer at a mastering stage, so it guarantees high quality. DRC level indicates this level. With 'Use DRC' chekbox you can enabe/disable using DRC. (of course this is only rough problem description).

DRC Power control adjusts how much DRC level changes sound level. When DRC Power is increased all quiet sounds will be more stressed and loud sound will be more shaded. When decrease DRC Power dynamic range compression will have less influence at output. Zero DRC Power level means that dynamic range compression applied at normal.

* CPU load.

Indicates CPU load by sound decoding and processing. All sound processing (if exists) before reproduction included here.

* Input/output levels.

Right part - levels indication. Note that levels here are in logarithmic scale. Input levels shows real channels configuration. Often happens that when BSI shows 5.1 in real LFE channel is absent.

* Presets

Combo box at bottom right allows to load predefined sets of settings (presets):


Mixer settings

Second page is mixer settings.



Main control here is mixing matrix. It is in form of matrix multiplication: S' = M S, where S = { L, C, R, SL, SR, LFE } - input sample, S' = { L', C', R', SL', SR', LFE' } - output sample.

For convenience some controls from Main page are placed here. For its description look at Main settings.

Settings description:
Combo-box allows to save and load saved matrices.



Setup.


Speaker configuration.


When first run filter checks for current speaker configuration for downmix. It uses settings from Control Panel->Sounds and Multimedia->Audio->Sound Playback->Advanced->Speaker Setup. (For SB Live! users. When change speaker configuration from Surround Mixer it is not always change in Control Panel. So it is always good to check there.).

Current speaker configuration is always saved in registry when filter unloads. So after first start speaker configuration is independent from ControlPanel settings.

To change speaker configuration you can use ac3speakers.exe program:

Program changes speaker configuration in _deafult preset which is loaded when filter loads (look also Registry). Autodetect means that speaker configuration will be readed from Control Panel (see above).

To reset current configuratin you also can import reset.reg file (look at Registry).

You can change speaker configuration from filter properties only in certain cases. First of all playing must be stopped before (not paused). Second, all intermediate audio filters must support dynamic reconfiguring (format change without full graph rebuild).

In most cases problems are because of mmswitch filter (filter that support .avi (and DVDs too) with several audio tracks and allow to switch between, especially for multi-language films). If you mainly watch DVDs it is better to uninstall this filter and use MPEG2 parser wich support stream switching directly (standart MPEG2 Splitter for example). In this case you'll also get lower CPU usage. If MPEG2 parser does not support stream switching (Elecard for example) then many audio rendering chains created, all of them are working together when only one really reproducing.

If mmswitch is really needed then it is several possibilities:

Windows 98

Only stereo configuratin supported by default in Windows 98 (and no spdif also). Support of this modes is at experimental stage now so it may not work on some systems.

First you need is install microsoft patch for WaveOut:
http://xvalex.hotbox.ru/download/269601usa8.exe

Second is set WaveOut Device as default device for audio output. In some players you can configure it but in most you cannot. So in most cases you need to explicitly set WaveOut Device as default sound renderer. You can do it with set_waveout.bat comamnd file (set_directsound.bat command file set back DirectSound as default renderer).

After it in most players multichannel modes and spdif output may work. Speaker configuration you have to set before (it will not work in filter properties).


Configuration advices

* General

* Maximum standart compatibility

Recommended in all cases.

* One-pass normalization.

To play at maximum loudness.

Registry.

Filter saves its state in registry key: [HKEY_CURRENT_USER\Software\AC3Filter]. 'preset' key contain different keys for each set of settings (preset). When filter is loading '_deafult' preset is always loaded, when filter is unloading all settings are saved there. Registry values:
acmod value meaning:

Value
Speakers
0
2/0 (stereo)
1
1/0 (mono)
2
2/0 (stereo)
3
3/0
4
2/1
5
3/1
6
2/2 (quadro)
7
3/2

Add 8 to this value to indicate LFE channel. So in 5.1 mode acmod is 15 (7+8). To indicate SPDIF add 32 to acmod. Value 64 and more mean non-existing mode and interpreted as autodetect.

Mixing matrices are stored in 'matrix' key. Each sub-key contains only one matrix. When filter is loading '_default' matrix is always loaded, when filter is unloading current matrix is saved there. Matrix values called next way: [from_channel]_[to_channel], where from_channel is mixed to to_channel with factor given in value.

All levels are stored in factor form (not dB).

To reset all settings to default import reset.reg file. This will delete '_default' preset and '_default' matrix.



Misc.

I want to say thanks to Marcello Mota for support and big help in hard work of debugging and testing.

Filter was primarily based on Open Source LibA/52 library (http://liba52.sourceforge.net) and mainly inherits its characteristics. Much was rewritten but I tried to keep its merits. I want to note high quality of this lib and high compliance with standart (http://www.atsc.org/standards/a_52a.pdf).



Distribution.

This program distributed under GNU General Public Licence v2, placed in GNU_eng.txt at english language and GNU_rus.txt at russian language. Russain language version is only for information purpose only and english version have priority with all variant reading.

This application may solely be used for demonstration and educational purposes. Any other use may be prohibited by law in some coutries. The author has no liability regarding this application whatsoever. This application may be distributed freely unless prohibited by law.

This product distributed in hope it may be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose and compliance with any standarts. I do not guarantee 24-hour (and any) support, bug correction, repair of lost data, I am not responsible for broken hardware and lost working time. I am not responsible for legality of reproducted with this program multimedia production.



Contact author.

With all questions about this program please, email to this address. Please, respond about all errors in porgram with following information:
This will help me a much in bug fixing.


Changelog.

0.55b - 25.11.2002
+ Bug fixed: surround and voice gain controls did not work in 5 channel mode
+ Bug with decoding stereo files fixed

0.54b - 01.10.2002
+ SPDIF pass-through output.
+ Preset loading and several standart presets added.
* Speaker configuration is now saved to registry.
+ Speaker configuration program added.
+ Patch for dialog size in Win98 Chieneese
+ Bug filxed - in some cases filter settings was not saved.

0.53b
- 14.09.2002
! Filter is distributed under GPL lisence now.
+ save settings to registy.
+ mixer control page with mixer matrix added.
* LFE channel is now mixed only to front speakers.
* 'Normalize' checkbox on main page means now one-pass normalization.

0.52b - 01.09.2002

+ Bug fixed - hang on corrupted PES streams.
+ Sound volume increased.
+ Overflow control and automatic gain control added.
+ Master gain control added.
+ DRC power control added.

0.51b - 18.07.2002

+ Bug fixed (crash on some ac3 formats)

0.5a - 07.07.2002

* AC3 decoder code was fully rewritten
+ PES support added.
+ Levels for LFE, Surround and Voice locked to BSI by default.
+ CPU usage indicator
+ Input and output levels inidicators.
+ DRC level indicator.
+ Some information about stream added.
+ Some bug fixes.


0.4a
- 23.06.2002

+ LFE support and LFE gain added.
+ Added buttons for reset all gains to BSI values.
+ Stereo now transmitted in standart format, so now filter can work
with sustems with no multi-channel support (Win9x/WinNT).
+ DVD decoding added.
+ Syncronization problem fixed.
+ Option to enable/disable dynamic range compression added.

0.3a - 03.04.2002

+ Volume gain for central (voice) and surround channels.
+ Speaker configuration change support added. Only works when
all intermediate filters support dynamic reconfiguring and only
in stopped (not paused!) state.

0.2a - 01.04.2002

* LibA52 code was rewritten for multitasing, so now possible to
create many instances of the filter in a filtergraph. It is primary
used for multi-language films.
+ Information panel added (but settings are not working now).

0.1a - first working alfa



Useful links


AC3Filter site (rus+eng): (http://xvalex.hotbox.ru/programs/ac3filter)
AC3Filter site (rus+eng): (http://ac3filter.sourceforge.net)

A/52a standart (AC3) (eng): (http://www.atsc.org/standards/a_52a.pdf).
LibA52 library (was ac3dec) (eng): (http://liba52.sourceforge.net).
Multichannel audio reproduction at Windows (eng): (http://www.microsoft.com/hwdev/tech/audio/multichaudP.asp).
Just useful video-related site (eng): (http://www.doom9.org).
And one more (rus): (http://freetime.sinor.ru/observatory/digitalvideo).



Copyright (c) 2002 by Vigovsky Alexander.
Last updated 25.11.2002