AC3Filter ver 0.70b

SourceForge Logo
English   Russian   Italian  
Download Sourceforge project Project forum Author's homepage

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

Main features:

Related projects:

    MatrixMixer - Allows to upmix any audio source (not only ac3s) up to 5.1 format (based on AC3Filter mixing matrix).
    WinampAC3 - Multichannel Winamp ac3 playback plugin (based on the same decoder as AC3Filter).
    LibA52 - Crossplatform ac3 decoding library (by Michel LESPINASSE).



New versions can be found at site: - home page - sourceforge project page (bug reports, feature requests) - AC3Filter forum

All versions:

ac3filter ver 0.70b - binary - sources


    Just run setup program.

    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).

    For normal filter operation all accompaniment files are not required and shipped only for serviceability. The only required module is This module is also Control Panel configuration module for itself. For W2K+ it can be registred in registry key [HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Cpls]. But for W98 compatibility at installation it is copied to windows system folder with .cpl extension.


    Just run uninstaller from Start Menu or Control Panel.

    ! Note that all your saved matrices, equaliers etc will be lost !

    It is possible that filter was installed with one of codec packs. In this case most simple way to uninstall codec is to uninstall this codec pack. If you want to uninstall only this codec you may uninstall it manually:

System setup

    If installation was successful then in most cases filter is ready to work immediately and does not require any settings.

    Most compatible mode of operation is stereo mode. It should work with any Windows version and any sound card.

    Some drivers (Creative!) do not update settings in 'Control Panel->Sounds and Multimedia->Audio->Sound Playback->Advanced' after speaker configuration change in drivers. So it is necessary to check it.

    It is possible that some audio processing filter (equalizers, enhancer, etc) may handle multichannel audio format incorrectly and cause problems with playback. For example center channel may fairly disappear or it will be impossible to change speaker configuration at playback time. To prevent this things do not install filter-packs and unregister unnecessary filters.

    One of problematic filters is mmswitch filter (filter that support .avi and DVDs with several audio tracks and allow to switch between it, 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 (standard 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 are created, and all of them are working together when only one is really reproduced.

    If mmswitch is really needed then it is several possibilities:

    Some of system settings may be configured from filter properties page (read Filter configuration to know how to call it):

* Filter merit

    After installation filter have highest priority, i.e. it will be used instead of any other installed ac3 decoder. If for any reason it is needed to use other decoder it is possible to decrease filter's priority to minimal with 'Prefer other decoder'. In this case filter will be used only if it is no other decoders installed. It is needed for example to use NVDVD player. It can only use its own decoder. But with AC3Filter installed NVDVD tries to load AC3Filter instead and cannot proceed. To revert high priority choose 'Prefer AC3Filter'.
    This option requires relogon in W2k/XP and system restart in W98.

* Default audio renderer

    Sound card may work in two modes: DirectSound and WaveOut. If it is some problems when using filter (for example if SPDIF does not work) it is possible that mode switch may help. Some media players (BSP) have corresponding settings but most of others use system default settings. Choose 'Use DirectSound' to make DirectSound to be default interface; choose 'Use WaveOut' to make WaveOut to be default interface.
    This option requires relogon in W2k/XP and system restart in W98.

* Audio/Video sync.

    Sometimes it may happen that audio and video are not in sync. Mostly it happens because of incorrect mixing, but it may be also some hardware reasons. This option is designed to fix hardware issues. You can use it to watch movies that was incorrectly mixed but do not forget to change it back after! This option specifies time shift between audio and video. If audio is played before video you need to increase this value. If audio is played after video you need to decrease this value. Note, that this option allows to fix only constant time shift.
    This option have immediate effect. When you change it picture may freeze for several seconds to resync, it is normal.

* System options

    Auto load movie configuration files - If this option is enabled filter will try to find and load configuration file with the same name as media file.

    Generate timestamps - This option may affect video stuttering. Try to switch it if you see video stuttering, non-fluent video. It is most common case when this option is enabled. In this case filter will calculate time for each ac3 frame decoded. But this time may differ from time got from media file (in fact times are always different for .avi files) and this may produce video stuttering on some systems. It does not mean that filter calculate timestamps incorrectly or timestamps in media file are incorrect, but it is a general problem of .avi files with frame-based interleaving. Partially this porblem may be solved with 'Jitter correction' option.
    If this option is disabled filter will use only timestamps from media file. This may solve the problem with different timestamps. But in this case some decoded ac3 frames will have no timestamps at all. Some players/drivers cannot handle this situation correctly and may produce stuttering/frozen frames or other unpleasant effects.

    Jitter Correction - works only when 'Generate timestamps' is enabled. Decrease the stutterring due to the difference between calculated and received timestamps. 'Current jitter' shows the current amplitude of deviations.

    Use WAVEFORMATEXTENSIBLE - generally for multichannel modes it is WAVEFORMATEXTENSIBLE structure used (described at Some old drivers cannot work with it (opposite, some new drivers can work only with this structure in multichannel).

Windows 98

    By deafult Windows98 does not support multichannel and spdif modes.
    First you need to install microsoft patch for WaveOut:
server2: ftp://downloa
server3: http://ac3filter

    This patch is described at
    Second is set WaveOut Device as default device for audio output.
    After it in most players multichannel modes and spdif output may work.


    ServicePack6 is required.


    ServicePack2 is highly recommended.


    If muiltichannel modes do not work try to uncheck 'Use WAVEFORMATEXTENSIBLE' option at 'System' filter's property page.

Players setup.

    Most players do not require any setup and filter is used automatically.


    In player settings (Options->Preferences) set:


    To play AVI files player does not require any settings. But this player can be used as DVD player (instead of widely used PowerDVD or WinDVD). To play DVDs with using of AC3Filter next files are required:

    Place this files to ...\ZoomPlayer\DVDGraph folder. In player settings Player Options->DVD->DVD Setup choose required option (depends on installed video decoder).

Filter configuration.

    First it is two main rules of tuning:
    1. If you do not understand what some option does do not touch it.
    2. If you did not follow the first rule and broke anything and do not know how to fix it just load 'standart' preset.

    Filter can be configured with several ways. Best is if player allow to call filter properties (WMP 6.4, BSP, Sasami, etc, not in WMP 7, 8, 9!). For example in WMP 6.4 filter list can be accessed File- >Properties->Advanced:

    If player does not allow to reach filter settings it is possible to configure it from Start menu with 'AC3Filter Config' icon or Control Panel icon. But this method do not show current activity and do not affect it! I.e. levels will not change, bitstream information will be filled with zeros etc. Moreover all players should be closed (because when player is closing filter saves its configuration to registry, so now configured values may be overwrited with old values that was read at player startup). So it is highly recommended to configure filter from within player that allow access to filter properties (almost any of widespreaded: BSPlayer, Sasami, ZoomPlayer, LightAlloy, etc). In last case you can hear how any change in settings affects sound. WMP v7, 8, 9 are not recommended.

Main settings

    Here is Main property page (levels and bitstream info are only shown when property page is called from player):

* Bitstream information.

    Top left it is bitstream information (BSI):

* Output.

    Here you can change output configuration. It define the real speaker configuration to wich ac3 channels will be mixed. Shown in form front_channels/surround_channels + subwoofer presence flag (SW). For some configurations common names are given. What is the difference between LFE and subwoofer read in What is LFE? section.

    'Dolby Surround/ProLogic' modes mean that that all channels presented in ac3 stream will be mixed into two channels so Dolby Surround/Pro Logic decoder can extract surround channel. 'Dolby ProLogic II' mode is similar to DPL but for DPL II decoder. DPLII support is only experimental because of lack of reliable information.

    'SPDIF' mode 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.

    'Sample format' combo box sets output sample format. There are PCM 16 bit, 24 and 32 bit and PCM Float formats are now supported. On some sound cards some formats may not work so use this option with care.

* Gain levels.

    Here you can control gain levels.     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 be decreased. 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 provides 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 DRC Power is decreasd 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.

    Current audio levels indication for each channel. 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 (read What is LFE? section for more information about this). If output levels become red it indicates overflow and you need to decrease gain.

* Presets

    This section allows to manage persets. You can load/save/delete presets. Several predefined presets are available:
    You can also load/save presets to/from file with file button:

    Configuration file may be saved with the same name as movie (proposed by default). In this case this configuration will be loaded automatically with movie.
    All filter settings are divided to several categories. It is recommended to save only general settings (and maybe equalizer) to autoloaded config files because in future you may watch this movie at different system. Settings that not in configuration file are not altered with file load.

Mixer settings

    Second page is mixer settings.


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

    Main controls here are 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', SW' } - output sample.

    More simple it means next rule for each cell: we mix channel specified by column to channel specified by row with gain specified in cell. So if we want to route left channel to right speaker we should set 1 in cell at cross of 'L' column and 'R' row. If we don't want to hear left channel from left speakers anymore then we set 0 at cross 'L' column and 'L' row. If we make same operation with right and surround channel then we fully swap left and right channel. (Note, that in this case we fully swap 'L' and 'R' rows).

    It is nessesary to clearly distinct concepts of input and output channels. Input channel is what was coded in AC3 stream. Output channel is what we'll hear from speakers.

    Row determines what we'll hear from corresponding output channel. For matrix shown above from left chanel we'll hear 1 part of input left channel, part of center channel, lowered left surround and LFE.

    Column determines where input channel will be mixed. For matrix shown above center channel will be routed to left and right channel with factor 0.7. So we'll hear center channel in center of left and right speakers. If we make it louder in one of speakers then center will be 'shifted' toward this speaker.

    When Auto matrix is enabled then matrix is automatically calculated and changed with parameters change. For example if we change Center level we'll see factors change in 'C' column.

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

Equalizer and delays.

    Right part is fully about equalizer. Everything is obvious so I will not bother myself with full description ;-).

    Left top corner are delay settings to compensate different distances to speakers. Ideally all speakers should be at equal distance to listener so sound emitted simultaneously from all speakers reach listener at the same time. Otherwise sound picture will be distorted. But in practice distance to speakers may be different. To compensate this difference sound should be delayed.

    Delay value may be set directly in ms or samples. Negative value means that channel should be reproduced 'earlier' than 'null time' (if speaker is placed farther then it should start to work earlier because sound needs more time to reach listener).

    For convenience it is possible to set distance to speakers. In this case positive values means negative delay for speaker start to work earlier. Negative values means positive delay.

What is LFE?

    First and most important thing is that LFE is not the same thing as subwoofer! And 5.1 in case of AC3 is not the same as 5.1 in case of computer acoustics.

    AC3 format was created for cinema rather than computer acoustics. In theaters acoustics is well enough to reproduce low frequencies. LFE channel was designed for powerful low frequency effects, i.e. effects that usual acoustics cannot handle. So all channels in ac3 stream contains low frequencies and LFE works only in certain moments to help main speakers to quake the walls and earth. And it is quite possible that LFE will not be enabled during the film. And it is normal.

    Computer acoustics is totally different. Most of 5.1 systems cannot reproduce low frequencies through satellites at all. So subwoofer must work all the time.

    So if we connect 5.1 acoustics and start to watch movie with 5.1 sound track with subwoofer designated only for LFE channel we will not hear basses at all!

    Threrfore if acoustics have separate subwoofer it is highly recommended to route there basses from all channels (since all channels have basses). I.e. enable Bass redirection in filter properties. Or use analogous option in sound card driver settings (if exists) and turn filter option off. Some may ask about 'right' playback. This people should read this document: ( n.0011.LFE.pdf) with explanation about LFE role and how to handle it.


LFE mixing.

    When it is no separate subwoofer at output configuration LFE is mixed only to front channels. If rear channels are powerful enough we can mix LFE there for louder effects:

Swap channels.

    For better understanding read Mixer settings section first (at mixer matrix description).

    Do you want real center channel on 4- channel sound card? It is possible. Of cource it is impossible to get 5 channels out of 4-channel sound card but we can use one of rear speakers as center, i.e. make 3/1 (3 front / 1 rear) configuration instead of 2/2 (2 front / 2 rear).

Maximum loudness

    If it seems that standard settings are too silent it can be fixed. Actually standard settings produce standard output. And any manipulations lead to deviations from standard.

    First that should be noted is that most films are normalized to avoid overflows. So if we just raise gain level because sound is too silent at one moment at some other moment overflow may occur.

    It is 3 main methods to avoid overflows:

    Simplest method to increase loudness is disable Auto gain control and raise Master gain level. In this case overflows will be clipped. This method increases loudness to the prejudice of quality.

    More advanced method is to enable Auto gain control, enable Normalize and raise Master gain level (till maximum level maybe). In this case after overflow gain level will be decreased. After some time gain will almost stop changing. In this case can get maximum loudness with maximum quality. This methods have imperfecttions. First it is some time needed for gain to stabilize. Second, our main goal to clearly hear low-level sound may not be reached. This method may be recommended as quick way to get maximum loudness with minimum artefacts.

    As kind of previous method Normalize may be turned off. In this case gain level after overflow will  be gradually restored up to Master level. This method is more sensible to choice of Master level. When Master level is too high and it is much of overflows (what is the consequence of high Master level) frequent and sharp gain changes may be annoying. Previous method is devoid of this defect because current gain level is not raising after overflow. But now we can hear low-level sounds  (speech for example) after explosions (after some time after it). But speech in between of explosions will be masked agian. This method is recommended for insignificant increase of Master level when it is expected rare overflows or no overflows at all.

    Next method is to use dynamic range compression (enable Use DRC option) with Master level raised. Current DRC gain level is shown at respective indicator. At silent scenes it should raise and at loud scenes it should lower. It is possible that effect from DRC is not enough so it is possible to increase effect with DRC level control. It is obvious that 'jumps' of loudness are more noticable with high DRC level. So it should be choosen carefully to make silent sounds clearly audible on the one hand and minimize gain jumps on other hand. In this method gain jumps caused by two reasons: DRC itself and auto gain control. To avoid some gain jumps auto gain can be disabled. But in this case clipping distortions may appear. So it is needed to maintain some kind of balance between all this factors.

    Next parameters affect loudness: Master, Auto gain control, Normalize,Use DRC, DRC Level. All this paramteres should be adjusted individually depending on type of acoustics, listener, and movie itself (lazy sound producer forgot to set DRC marks :-).

Registry and configuration files.

    Filter saves its state in registry key: [HKCU\Software\AC3Filter]. All filter settings are divided into 4 parts: general, matrix, equalizer and delay. Each is saved in its own registry key. Each have its own presets so we can have several equalizers and matrices and load it independently. Special meaning have preset named '_default'. At filter startup it loads all '_default' presets (for general settings, matrix, equalizer and delay) and saves settings there at shutdown.

    Configuration files are also divided into 4 sections: general, matrix, equalizer and delay. Each section contains exactly the same values as registry presets.

    All levels are stored as floating point values in factor form (not dB!).
    All floating point values are stored as 'REG_SZ' registry values.
    Boolean values are stored as integers to registry and as 'true'/'false' values to configuration files.

    Channel name abbreviations are as part of some values name:
Left front
Right front
Left surround
Right surround
LFE channel
or subwoofer


Registry values:

Mixing matrices.

    Matrix values called next way: [from_channel]_[to_channel], where from_channel is mixed to to_channel with factor given in value.


    Filter was primarily based on Open Source LibA/52 library ( 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 standard ( Thanks to Aaron Holtzman and Michel Lespinasse for it.

    I want to say thanks to Marcello Mota for support and big help in hard work of debugging and testing.
    Big thaks to Gabest for DVD playback support.
    To Frank (doom9 forum) for Dolby ProLogic II downmix matrix.
    Valery Shabaev for installer script.
    IXBT and Doom9 forum members for lots of testing and bug reporting and forum owners for these forums.
    And much of other people who made this project live.....


    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 standards. 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:  with subject 'AC3Filter' Please, respond about all errors in porgram with following information:
    This will help me a much in bug fixing.


0.70b - 18.07.2003
  ! Serious bug in decoder fixed. Sound is _much_ better now
    especially on low bitrates.
  * Some optimizations.
  * Updated DPLII downmix matrix according to
    (thanks to bleo!)

0.69b - 09.07.2003
  + Jitter correction (more smooth playback)
  + Italian translation added
  ! Sometimes sound disappeared in MPC.
  ! 'File' button now works at stand-alone configuration.

0.68b - 03.04.2003
  ! Speaker configuration switched to spdif with
    auto load of config file enabled. Fixed

0.67b - 31.03.2003
  - Auto switch to stereo was a bad idea... Removed.
  + Delete preset buttons added for all preset boxes.
  + Save/load settings to file.
  + Auto load setting from file with the same name as media 
    file (so it is possible to create individual settings
    for each movie).
  + System configuration property page.
  + Output levels indicate overflow.
  + Time shifting for audio/video sync.
  ! Video stuttering again. Now it is possible to choose
    sync method between v0.63 method and v0.64 method.

0.66b - 19.03.2003
  ! Switch from SPDIF to stereo after seek fixed. 

0.65b - 18.03.2003
  ! DVD playback is back

0.64b - 17.03.2003
  * Much of testing
  + Speaker configuation can be changed when playing
    (no more need to stop playback). Thanks to Gabest for ideas
  + Bass redirection option
  + 100Hz-7000Hz filter for Dolby Surround/ProLogic downmix
  + Automatic switching speakers to PCM 16bit stereo
    if selected mode is not supported. ('Some streams 
    are in unsupported format' error message)
  + Time delay can be specified as diatance to speakers
  + You can now switch using ac3filter or other installed
    decoder (for NVDVD)
  ! Reject to work with SPDIF on some systems bug fixed.
    ('Some streams are in unsupported format' error message)
  ! Video stuttering with SPDIF fixed
  ! Silent center/surround (-3dB gain removed for center/surround)
  ! Surround decoding matrix changed
  ! W98/ME config crash fixed
  ! W98/ME ControlPanel icon is working now
  ! W98/ME 'Use WaveOut' & 'Use DirectShound' files fixed.

0.63b - 23.12.2002
  ! fixed SPDIF mute issue

0.62b - 22.12.2002
  + Signal clipping on overflow
  + Auto gain control can be turned off now
  * filter_merit now accepts common abbrevations for root registry keys
    instead of senseless codes
  * More error-tolerante
  ! Seeking bug fixed.
  ! Bug fixed: sometimes timestamps may be lost.
  ! Bug with SPDIF output fixed (incorrect frame size)
  ! WaveOut/DirectSound switching is now working more correct in W98
    (thanks to Mario *LigH* Rohkramer!)
  ! Fixed little bug in uninstaller

0.61b - 20.12.2002
  + Installer
  * Changed syncronization algorithm
  ! Crash with WaveOut and ReClock renderers fixed

0.6b - 17.12.2002
  + Equalizer
  + Audio delay adjust
  + Support for different output sample formats: PCM16, PCM 24, Float
  + Dolby Surround/ProLogic/ProLogicII downmix.
  + Control Panel icon
  ! Mono output bug fixed
  ! Bug with WMP9 playback fixed
  * Mixer page is redesigned
  * Made filter code smaller

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.
  ! Some bug fixed and new added.

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.5b - 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): (
AC3Filter site (rus+eng): (

A/52a standard (AC3) (eng): (
Dolby explanations about LFE (eng): (
LibA52 library (was ac3dec) (eng): (
Multichannel audio reproduction at Windows (eng): (
Just best video-related site (eng): (

Copyright (c) 2002-2003 by Vigovsky Alexander.
Last updated 18.08.2003