andy vt's tools & blog

automating lazy

This Blog


andy vt's blog

AntiPack – Get your videos working without destroying your PC

I’m no fan of codec packs, more often than not they end up causing much more harm than good.  Solving the short term problem (how do I get this file to play) , but leaving behind a larger mess that often leads to the conclusion that there is something fundamentally broken with the PC as a A/V device.

The real problem with PCs (and not just in this case) is complexity; most (understandably) want the convenience and not the hassle of dealing with containers and codecs so they turn to a pack to solve the immediate need.  I completely understand that it’s a complex topic; something that everyone that has ever tried to get mystery file X to play has struggled with.  Doing it the right way is hard, where codec packs are easy. After repeating “uninstall the codec pack” more times than I care to remember, I figured it was time to do something proactively to hopefully reduce the pain.  So it is with some hesitation (and irony) that I’ve decided to roll my own “codec pack”. 

AntiPack is intended to be part guide and part installer; hopefully making it easy enough for everyone to understand what they are doing, and provide an excellent/easy end user experience at the same time.  Most important it is based on the filters I use on my system.  Most are almost completly stock (with some changes to merit to reduce the arms-race nature of many OSS filters) but some I have customized to fix issues or to make them play nice with other filters. 

All of the filters in the installer are OSS filters (all but one are GPL); each is disclosed with the option to opt-out during the install and includes a short description of what it does.  I’ve also written a simple application that makes it easy to configure the filter where applicable and control its merit if necessary.

Essential Downloads:

Optional Downloads

Getting Started:

If you're staring from a pristene install you can skip this part, but chances are you've already installed another pack or ffdshow so the first step is to get rid of them.  Hopefully whatever codec pack you have uninstaller works and cleans out the nasty, if not GraphStudio will help when the time comes.  

Before moving on, let's talk briefly about why I don't like ffdshow.  Generally, I have found ffdshow's audio decoder to OK as long as you always decode to PCM.  It can be configured to bitstream AC-3 and DTS, but will not do so reliably.  Given the way I use audio decoders, that isn't an issue for me, but it is troubling that it doesn't respect it's own settings.  That said the audio decoder is pretty decent, and will decode almost anything so it can be a good solution.  The problem is that you can't install the audio decoder without also getting the video decoder.  With no hardware acceleration and improperly formed media types make for a buggy and craptacular experience.  The only reason I can think of to use it is if you really,really want subtitles in WMP; and even then something like VSFilter is probably a better choice.

Most importantly, ffdshow is not a good DirectShow citizen.  It installs itself with a ridiculously high merit, and in the default configuration will accept almost anything so it ends up doing the same thing that many codec packs do, screwing up your PC.  Usually just breaking hardware acceleration, but because ffdshow also has some stability issues (esp when it is not the only filter) it can also cause the player to crash or exhibit strange behaviors.  If you know what you're doing ffdshow can have a place on your machine, but I wouldn't recommend it.

Installing AntiPack:

Now it's time to install AntiPack.  

Nothing to see here, just click "Next"

All of the filters except one (SubtitleRender, which uses my MS-RL variant) are GPL, so it's easy to agree with the EULA and click Next.

Now it's time to chose from the list of recommended filters.  If you're not running SageTV, there isn't much benefit to installing SubtitleRender.  If installed, it will join playback graphs outside of Sage, so if your player supports SRT subtitles you may want to uncheck it.

Most of the decoding work is handled by the modified MPC-HC filters.  They include some bug fixes and changes to make them play better in my environment.  For e.g. I prefer AC3Filter for AC-3 and DTS, but AC3Filter does not handle LPCM (even though it claims to) properly or decode other audio codecs like FLAC and AAC that I use.  While it is possible to use merit to prefer AC3Filter, the outcome is much more certain if the MPC-HC Audio Decoder won't accept AC-3 or DTS by default.

Click Next when you're ready.

If you don't have a commercial dvd player installed (i.e. PowerDVD) and are installing on XP or a version of Vista that doesn't include a DVD capable MPEG2 decoder, you should select these.  Everyone else, it's up to you.

Click Next when ready.

Select the file source/splitter filters that you'd like to install on this page. Checking the first two (mp3/mp4) will install and register the filters as both source and splitter.  The FLAC filter is a file source only, and the MPEG is a just a splitter.

When a DirectShow player loads a file it tries to find a file format specific filter first by searching HKEY_CLASSES_ROOT\Media Type\Extensions if a matching key is found (i.e.HKEY_CLASSES_ROOT\Media Type\Extensions\.mp3) it looks at the "Source Filter" value for what filter should be used.  If the key or value is missing generally it will use the generic file source filter and search for a splitter filter.  Registering as a source filter will guarantee that the filter will be used if the player loads the file using this method, but since some players will not expect the behavior it can cause trouble in some cases.  In my experience it's only been a problem for MPEG file types, but your mileage may vary.

Click Next when ready.

Choose a location and click next. After the installer completes it will automatically launch the settings tool.

The first tab configures the main video decoder.  Use this page to select which video formats should be supported.  To make it easier, the page tells you what video card is installed and each check box has a tool tip explaining a recommended setting, some basic information about the codec and a link to learn more.  For the lazy, there's a button to apply my recommended settings based on your video card.

One thing to note; if you have a commercial media player that provides H.264 (AVC) decoding (like PDVD or TMT) and you would prefer to use their filter, the H.264 DXVA options should not be checked.  The MPC-HC video decoder has been modifed to not connect to the SageTV MPEG splitter, I was unable to make it work so the media type was removed.  Generally this should not be an issue, since the HD PVR (the only source I know of for H.264 in .ts files for SageTV) comes with TMT.  Both Haali and the MPC-HC MPEG splitter present H.264 using the AVC1 mediatype which works great.

The next tab configures the MPC-HC Audio Decoder.  Unless "Decode AC-3 and DTS" is checked the filter will not work for those media types.  If you would like it to support those types check the box and set your speaker configuration.

Duplication the AC3Filter configuration pages was a more complex than I was willing to do, so clicking the big "Launch..." button will open its configuration page and you can choose the settings that make sense for your system.  My setup is captured below.

PCM output:

The main changes I make on the first tab are ensuring/setting "AS IS" and "PCM 32bit" in the output section. I use Reclock so, SPDIF is left unselected.  If you prefer SPDIF (bitstreaming AC-3/DTS as AC-3 or DTS instead of decoding to multichannel PCM) make sure to check the "Use SPDIF" option (see the Bitstream Output section below).  

Bitstream Output:

Note the "Use SPDIF" option is checked.

On the SPDIF tab, check both AC3 and DTS


The last thing to do is make sure that the types AC3Filter accepts are set correctly.  Most of the problems I've seen with AC3Filter are because PCM is checked, it also doesn't handle LPCM correctly so you should uncheck both.  AC3Filter treats merit like an On/Off switch; it's either crazy high or uselessly low.  Don't worry about making the right choice, the AntiPack settings tool will enforce the merit you choose on the AC3Filter tab.

The last page is where the merit for each of the other filters is managed.  Filters that are not installed will display a "NotInstalled" merit; changing this to another value will not do anything.  Click Save to apply all of the setting changes.  Merit is a machine level setting so the tool will require elevation, but decoder settings are stored at the user level.  If you have multiple user accounts on the PC they will need to be made for each one.

If you ever need to change the settings (or make them for another account), a shortcut is added to the start menu.

Installing Haali:

The next step is to install the Haali Matroska splitter to enable MKV playback.  If you don't need to play MKV (if this is you, we need to talk; you're missing out) you can skip this step.

After you've read the EULA, assuming you're OK with it let's move to the next step.

Where you choose a location for the filter and supporting files.

And the name on the start menu.

Before Installing, it's very important to change the defaults so Haali doesn't cause problems.  By default, the splitter installs not just as the source filter (the thing we just talked about) for MKV, but also wants to act as the source for MPEG-TS (*.ts, *.m2ts) and MPEG-PS (*.mpeg, *.mpg) files.  IMO Haali is the best MKV splitter, but only does so-so with MPEG; so make sure you uncheck those boxes.  I don't use it to split MP4 files (I use the MPC splitter included in AnitPack), so I can't say how well it does with those.

Alright, finally done with installing the filters.  Now let's make sure that everything is working the way we want.

Using MediaInfo:

Don't worry we're almost done :)  MediaInfo is the easiest way I've found to tell me what codec a file uses.  Open the GUI and drag a file in.

Using GraphStudio:

DirectShow uses something called a Graph to handle playback.  It's essentially a container for filters (the things we just installed) that provides the necssary plumbing so they can connect to each other and pass data in a meaningful way.

Just like MediaInfo you can drag a file in, but in this case we can see how DirectShow will create the playback graph using Intelligent Connect.  If everything went OK (getting rid of the bad filters, and installing the good ones) you're done.  If it didn't then you'll want to read this.

Published Aug 02 2009, 08:48 PM by babgvant
Filed under:



dbone1026 said:


I left a comment over on MissingRemote but not sure you check those. Is the AntiPack compatible with Windows 7? Also, is it compatible with x64 systems (I think the link given for Haali is for the x32 splitter)? Thanks

August 3, 2009 5:34 AM

babgvant said:

It should work on XP-7 as long as the player is a x86 (most are) process the underlying OS isn't important..

August 3, 2009 7:04 AM

sialivi said:

Hi Andy,

Haven't had time to try the AntiPack yet, but I appreciate your work and am looking forward trying it when my new system has been built. Maybe I'll have more luck getting reclock to work with this than my current pack.

A quick question: I notice the AntiPack has no version number. Does this mean that you expect it to be a one time release and there are no plans for further updates?

August 8, 2009 2:53 PM

babgvant said:

I intend to revise both the document and installer as the filters and guidance evolve over time.  With the next rev I'll probably push the contents of this post to the wiki so it's easier to find and maintain.

August 8, 2009 6:32 PM

kingtone said:

Andy, thanks for the AntiPack. I always advise against Codec packs too and it is nice to have something like this to link to when people are lost trying to get a file to work.

What is your advice when new things get added to a system. E.g., you have Win7 installed and the AntiPack and it is all good then you decide to add something like an HDPVR and TMT with its crazy high merit. Can you simply rerun the AntiPack config to get everything right again?

August 9, 2009 12:53 PM

babgvant said:

Because the filters in AntiPack have reasonable merits (and the installer will reset them to those levels) that won't work.

Currently, the best approach is alter the merit of the ArcSoft audio decoders (all of them) to UNLIKELY using GraphStudio (or another tool for managing merit).

I've been thinking about how I could address that problem w/o reverting to the "trusted" codec pack approach of using an insane merit value.  So far the only think I can think of is looking for a known set of problem filters and providing an easy way to set the value to a recommended value.

August 9, 2009 1:15 PM

4real said:

Interesting read. Based on this what would be the best filter to use for handling PCM and LPCM.

August 10, 2009 8:09 AM

babgvant said:

PCM doesn't need to be handled unless you're using SPDIF or a constrained HDMI (i.e. 3X00, 780/5G) connection.  In that case I would use Reclock to encode the PCM to AC-3.  Ac3filter has that capability too, but I haven't had much success getting it to work just where I want it, but to be fair haven't tried that hard either.

In my testing the MPC-HC audio filter included in AntiPack handles LPCM audio perfectly.  That said if you're going to free LPCM from plastic, I think FLAC is a better approach (same quality with significant size reduction) which is also handled by the MPC-HC audio filter.  

August 10, 2009 8:38 AM

innie808 said:


Thanks for Antipack. I have installed on my WIN7 RC media Center. Very impressed with the full compliment of hardware accelerated codecs. I run an ATI 2400XT.

I am however having some difficulty with sound from MKV's encoded with AAC. I know the MKV has 6 channel encoded surround sound but i can only get Stereo from them. I guess the question is can Antipack decode AAC and split out through SPDIF?

August 10, 2009 8:42 PM

AntiPack Codec Pack Provides Easy DXVA Install said:

Pingback from  AntiPack Codec Pack Provides Easy DXVA Install

August 15, 2009 6:01 AM

dreamer_cast said:

Any update to a x64 version?  Great work you are doing btw, hopefully I can test this out soon!


August 17, 2009 12:27 PM

Fix your Video Codec Problems with AntiPack « Zune Tips Weblog said:

Pingback from  Fix your Video Codec Problems with AntiPack « Zune Tips Weblog

August 22, 2009 7:29 AM

Meymow said:

Hi Andy,

I really apreciate what you've build. But there is still something i would like to ask. Are you planning on implementing subtitle support in the future? I would be really great. Let me know. And keep up the good work!

September 8, 2009 5:18 AM

babgvant said:

The embedded SRT filter I wrote for SageTV is included.  The problem with a more generalized approach is that it requires a custom presenter to work with the EVR, which is something that is application specific so I can't provide it.

September 8, 2009 6:45 AM

Meymow said:

Ok thanks anyway. Good luck with your future projects! Let me know if something gets developed around external subtitles, i'll be forever grateful!

September 8, 2009 1:05 PM

motocrossmann said:

Does this work with win 7 x64?   It's not clear to me from the comments.

September 15, 2009 12:47 PM

babgvant said:

It will work in any x86 based player independent of the underlying platform.  So if you're using a x86 player on 7x64 AntiPack will work.

September 16, 2009 6:49 AM

motocrossmann said:

So does that mean it will not work with x64 win 7 Media Center?  I think that process is x64, but I'm not sure.

September 19, 2009 8:27 PM

woolooloo said:

Andy, thanks for this, it has solved a problem or two I've had. Unfortunately it has added a problem. I have .mp4 files that have 2 audio tracks (First AC3 and then a 2 channel AAC). The MPC splitter is trying to render both of them so I am getting echoes. Is there a way to get MPC to only render the first stream? There don't seem to be any settings for it.

My other problem is that Graph Studio shows it is decoding the h.264 video in the .mp4 files with the Microsoft DTV-DVD Video Decoder (Merit normal - 1). When I watch the video in WMP or 7MC, I am getting a green band along the right side and it flashes like it is constantly turning the brightness up and down. Interestingly, if I hit play in Graph Studio, it plays normally. I'd like to try to get WMP and 7MC to use the MPC Video Decoder (Merit Preferred + 2), but I'm not sure why it is not using it since the Merit is already higher.  I'm also concerned that WMP and  7MC may not be using DirectShow anyways (aren't they using a replacement now for some things), so I'm not sure fixing it in GraphStudio is going to work. Any ideas?

September 29, 2009 11:22 AM

babgvant said:

Unfortunately not.  There is another mp4 splitter that you can try out (, I don't have any mp4s w/ multiple audio tracks so I'm not sure if it has the same issue or not.

For the second issue, there are two blocking issues.  The first you've identified (WMP and 7MC use Media Foundation for playing mp4), but more importantly MS removed (w/o some serious reg hacking) the ability for 3rd party decoders to load in their players.

September 29, 2009 11:41 AM

kingtone said:

hack7mc has a how-to for changing the default player in 7mc but I've had bad results with it. Namely that thumbnails go away on the Recorded TV screen. May be other issues as well but I went back to using it.

September 29, 2009 12:05 PM

woolooloo said:

I've remuxed one of the files to MKV, I had originally done everything in MP4 because the MC Extenders had native support for it. Now, Win7 transcodes the natively supports MP4 files anyways, so the container is no better than MKV for my situation.

Anyhow, the same video artifacts are showing up in the MKV. Now here is where it gets interesting. If I play the files on my Win7 desktop, they play fine, it is only happening on my Win7 HTPC.

The difference between the two is probably the video card, I run an ATI 4670 in the HTPC and an NVidia 9500 in my desktop. Could the ATI hardware drivers and/or acceleration be causing this? I know Andy gave up fighting the ATI Win7 drivers and went back to Vista. I tried uninstalling Avivo to see if there is any difference, but no. Anything else that I can try that would confirm that this is an ATI issue?

September 29, 2009 2:56 PM

babgvant said:

Drivers can cause issues like that.  But it's kind of weird that it works OK w/ the MPC HC h.264 decoder and not the MS one if it was only a driver problem.

September 29, 2009 3:53 PM

woolooloo said:

They play ok in GraphStudio with the MS decoder, the only programs they don't play correctly in are WMP and 7MC. So I guess I'm having a problem with the Media Foundation decoder, or the ATI driver, or a combination of both? Really annoying, I've got a whole lot of shows encoded like this that played fine in VMC.

September 29, 2009 6:43 PM

The Digital Media Zone » Blog Archive » Converting MKV to WTV said:

Pingback from  The Digital Media Zone  » Blog Archive   » Converting MKV to WTV

January 28, 2010 5:04 AM

The Digital Media Zone » Blog Archive » DVD and Blu-ray to Media Center – One man’s journey said:

Pingback from  The Digital Media Zone  » Blog Archive   » DVD and Blu-ray to Media Center – One man’s journey

March 1, 2010 7:13 AM

Hauppauge HD-PVR support - Page 61 - SnapStream Forums said:

Pingback from  Hauppauge HD-PVR support - Page 61 - SnapStream Forums

March 10, 2010 10:23 AM

DXVA on ION 330 BD - The flawless solution - MediaPortal Forum said:

Pingback from  DXVA on ION 330 BD - The flawless solution - MediaPortal Forum

April 8, 2010 11:47 PM
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems