in

andy vt's tools & blog

automating lazy

This Blog

Syndication

andy vt's blog

August 2009 - Posts

  • ToDvrms - 1.0.1.0 : Early Access Release

    This is an Early Access release.

    1.0.1.0
    - force todvrms to run as x86
    - explicitly load haali source for mkv
    - explicitly load MPC-HC Mpeg source for ts, m2ts, and mpeg
    - added c, path to edl or dtb xml file for commercial skipping (experimental; requires DSCutter filter included in DTB 1.2.1.8)
    - change -w to 45 for wtv files since the SBEv2 allocates in 500MB chunks
    - replace FakeTransform with AVC1toH264 (thanks Jere) filter for streaming H.264 into WTV (mkv supported with Haali source; ts,m2ts suppported with MPC-HC Mpeg source)
    - add AAC as an allowed audio type

    ToDVRMS includes two DirectShow filters, they must be registered by running registertodvrmsfilters.cmd prior to use.  After they are registered ToDVRMS can stream h.264/AC-3 files from mkv/m2ts into WTV files.  

    bin | source

  • Going Mainstream

    Brent, Adam, Josh and I had a great discussion a few nights ago on the HTPC's place in the mainstream.  Since you're finding it here, you probably already know which camp I fell into :)

    Enjoy.

    Posted Aug 28 2009, 11:51 AM by babgvant with 2 comment(s)
    Filed under:
  • Keeping your HTPC Awake

    Yesterday when we discussed how to make your HTPC use S3 standby I pointed out that my preference is use fairly aggressive idle timers on my client and server PCs, the downside to this approach is that it can cause some undesirable side effects.  Today's topic is how to workaround some interesting design shortcommings in two popular applications to keep the PCs awake when you want.

    Media Center:

    One of the more frustrating moments in my Vista Media Center experience was the first time the PC when to standby 5 seconds after a show finished playing.  As it turns out one of the features (and yes I was able to confirm that this behavior is "by design") is that VMC does not reset the display/system idle timers during playback.  So if for example you watch a 60 minute show without interacting with the PC (and why would you if DTB is doing it's job) and the system is configured to standby after 30 minutes of inactivity the machine almost immediately turns the display off and goes into standby.

    To workaround this issue, er feature, the DVRMSToolbox (DTB) addin has a configurable setting to reset the display idle timer during playback.  Open up the DTB settings tool, then check "Keep Display On" on the "MC Addin" tab and you're all set.



    SageTV:


    The approach to keeping PC's with SageTV isn't as elegant as the MC one because when I started using Sage I wasn't familiar enough with how to extend the application from within, so this problem was addressed in LcdWriter as it was adapted to work with Sage.  For those who don't have a HD44780 compatible display don't worry, a "NullWriter" is included so anyone can use it to keep the display active.  One thing to note is that when using LcdWriter with Sage it is dependant on neilm's GetStatus pluggin so it must be installed on the client as well.

    Walking through the setup for those without a real display.  Select the NullWriter on the writer tab of the LcdWriter settings tool.

    And check "Keep Display Active" on the "Sage" tab.  Note that the "Watched Exe" will need to be changed to "SageTV.exe" or "SageTVClient.exe" depending on how you're running Sage.  



    Server:

    Version 1.2.1.6 of DTB added a feature in the FileWatcher (FW) application to watch for a local process to launch and send requests to the instance of the FW on the server machine asking it to reset the idle timers.

    The client FW has different capabilities depending on how it is run.  When run as a WinForm (standard exe), it can not only base the messages back to the server on the process being open and the PC not being in away mode (available in Vista+), but also if the display is currently on.  Personally I think this is the best option as it lets the server start its idle countdown when the the display turns off on the client (or the watched process closes).  Unfortunately, it's not possible to detect if the display is on from a service, so if the FW is run in service mode only the process being active or away mode settings will work.

    In the DTB settings tool go to the "Remote" tab and enter the name of your server PC in "Remote Host", the name of the process to watch for, and select the messaging behavior.


  • DVRMSToolbox 1.2.1.9 - Early Access Release

    This is a Early Access release.

    Version 1.2.1.9

    - Change MP4 muxer to GDCL filter for iPhone/iPod compatibility
    - Add ExtraData action for adding static context values by type using xml document (<root><data name="ForceStereo" type="bool" value="true"/></root>)
    - Add WMV to supported output types from ConvertVideoFile and DTBVideoEditor.  Default prx is cbrZune (supports AC3 btw), to use a different PRX in ConvertVideoFile ExtraData must be used with <root><data name="PrxPath" value="prxfile.prx"/></root>
    - Add "Convert For Zune (no commercials)" and "Convert for iPhone (no commercials)" profiles
    - PC support > < testing with numeric and string values
    - Add FWThrottle action to profiles created with DTBVideoEditor

    bin | source

  • Configuring Standby on your HTPC

    My main HTPC uses around 130 watts at idle, 7 watts in standby (S3), and 4 in hibernate (S4) so the case for having it take a nap whenever it can is quite clear.  There was a time when getting S3 standby working properly was a black art involving careful motherboard and device selection, regsitry hacks, and some pixie dust.  When Vista came out and even low-end motherboards included full standby support all of that changed; setting up your PC to properly take a nap, and wake up when you need it, is something anyone with a few minutes can do. 

    Before going any further lets take a moment to define the PC's power states:

    • S0: On
    • S1: CPU and most components receive power, CPU doesn't execute any instructions and the hard drives should power down
    • S2: CPU stops receiving power
    • S3: Standby, only RAM is powered (USB devices and NIC should be in a lower power state)
    • S4: Hibernate, RAM is no longer powered so the contents of RAM are written to the hard drive 
    • S5: Soft off, only devices that can turn the PC back on are powered (i.e. the NIC if WOL from S5 is enabled)

    Depending on your use case either S3 or S4 are good choices for saving power.  S4 will save a few watts vs. S3, but requires a full POST and about 15-20 seconds more beyond that do be fully functional, where resuming from S3 only take a few seconds.  Given that, I opt to use S3 for my HTPC and a combination of S3 and S4 for the other PCs at my house.

    Configuration:  

    The first step is to make sure that that BIOS is configured properly.  Every OEM's BIOS is slightly different, but the idea is always the same.  There should be a option group for power managment; in this case (Gigabyte) it's a option on the main page, on my dev box (Asus) it's a tab on the top of the screen.

    Usually there's just two options S1 and S3 but some boards also have an "Auto" option.  In my experience Auto is the same as S3, but since that's what we want anyway there's why not to be explicit.  Below are some configuration screens from three different vendors.

    Asus:

    Intel:

    Gigabyte:

    We are going to enable wake on lan (WOL) later so as long as we're here, let's make sure that the BIOS is setup correctly for that.  Again this isn't a one size fits all setting; in most cases we need to enable PME (like Gigabyte).  The other cases I've seen have an explict WOL setting, or like this Asus board the setting is split across PCI/PCIe devices.

    Now that the BIOS is set to enable S3 stanby and let us wake the PC when we need it, save the settings and boot into Vista (or 7 which is almost exactly the same).  Power settings are found in the control panel under "Power Options".  I like to work off of the "Balanced" plan, but there are some other plans available if you'd like to choose a different baseline.  There are several ways to change the settings we're after, but instead of hiting them one at a time, we'll just go to the master list and make them all in one place.

    Select "Change plan settings" to get to the most basic set;the display and system idle timers.  I usually use very agressive idle timers (10/30) on my regular PCs (dev box, laptop, Sage client) and slightly less so on the main [server] HTPC (20/60).  There are some drawbacks to going too far in either direction, so you really need to find the right setting for your environment.  Too short and the PC goes to sleep while you take a break, to long and it never goes down since there's a recording coming up.  When you're ready select the "Change advanced power settings".

    To get the full list select "Change settings that are currently unavailable" (not shown) before moving to the next step.  While I have a password defined for the user account on my HTPC, I don't want to ever have to enter it manually.  While it's bad policy to do it, I think authentication shouldn't be part of the media consumption experience so I disable the need for a password on wakeup on my HTPCs; leave this one alone on the other PCs.  

    I've never been able to get hybrid sleep (a feature where the PC doesn't have to transition through S1 to get to S4 from S3) to work properly so this get's disabled on everything.  If you don't want S4, change the "Hibernate after" setting to "Never" otherwise choose a setting that works for you.  Note that if your motherboard doesn't support WOL from S5 you will not be able to WOL from S4.

    I don't have seperate power and sleep buttons on any of my PCs.  So every one of them has the power button tied to the sleep action.  Most modern systems will turn off if the power button is pressed and held for 5 seconds so you don't lose anything by going this route.  The upside, besides a more CE device experience, is that if one of your kids hits the power button, the PC goes to sleep instead of killing any unsaved work left open.

    The last step is to make sure that sharing content resets the idle timers.  AFAIK, this is really only effective for Microsoft's applications (other apps could use it by making an API call, but don't) so other solutions may be required to keep the server PC awake while you're using the content hosted on it.  Click "OK" when you're done.

    The next step is to setup WOL.  Open the Device Manager by right clicking on "[My] Computer" and selecting "Manage", browse to the "Network adapters" section and double click the apdapter to open the properties dialog.

    Most modern NICs support both magic packets and directed packets (also called pattern match).  A magic packet is specally crafted packet broadcast to a specific MAC address, where a directed packet is just traffic that specifically targets the IP address of your PC.  If all the devices you want to be able to wake up the PC can send a magic packet only select that option, otherwise select both.  Generally this setting is configured on the "Advanced" tab, but if you have an Intel NIC it could be there

    or on the "Power Management" tab


    In either case we need to make a stop on the "Power Management" tab and make sure that "Allow this device to wake the computer" and "Only allow management stations to wake this computer" are selected.  If for some reason directed and magic packets don't wake the machine you can opt to disable the last setting, but be warned that any broadcast traffic (like enumerating network shares) will cause the box to wake up.

    Click OK (the NIC may reinitialize so make the change later if you're doing anything that needs the network up) and we're done with configuration.

     

    Troubleshooting:

    There are several background tasks (like the defragmenter) that can wake the PC and keep it from idling to sleep while they work.  It is possible to force the PC to standby during those times (Vista actually removed the ability to keep the PC awake using idle timers and standby notifications), but usually that's not a great idea because these processes are doing vital work.  The best advice initially is to create the right environment and not get frustrated if your PC goes through a period where it won't go down.  That said, if after 24hrs it still won't sleep during idle periods or stay down for any length of time there are a few things to check.

    The first place to check is to see if any remote file sessions are open.  Open up the system manager (right click on Computer and select "Manage") and select the "Shared Folders" section (great place to see what folders are shared on the box too).  From here you can see all the open share sessions and files, generally an open file handle will keep the machine awake.

    Vista and 7 include a great command utility for troubleshooting standby issues called powercfg.  Open up an elevated command prompt and type powercfg /?  to list all the options.  The most useful ones for this task are:

    • LASTWAKE - tells you what device/event cause the last resume from standby (if the bios supports it)
    • DEVICEQUERY - queries devices that can wake the box; most interesting sub args are wake_armed (devices that are configured to wake the PC) and wake_from_any (list all devices that can wake the PC)
    Given the information from "powercfg -DEVICEQUERY wake_from_any" you can go through all the devices in the Device Manager and uncheck the "Allow this device to wake the computer" option.  But be careful to not disable things like the power button or the keyboard/mouse or remote control.

    The last place to look is the task scheduler.  Most of the task are necessary, but you can mess with when they run and if they can "Wake the computer to run this task".


    Posted Aug 18 2009, 09:00 AM by babgvant with 6 comment(s)
    Filed under: ,
  • DVRMSToolbox 1.2.1.8 - Public Release

    This release is the same as the R4 Early Access rev.

    Version 1.2.1.8 

    - ConvertVideoFile supports Native A/V container swaps (w/ editing); user must verify that container swap works
    - ConvertVideoFile supports TS output if SageTV is installed
    - Added hang detection to underlying converter class
    - Added ExtractCC action (uses ccextractor - included in package) dumps SRT subtitles
    - ConvertVideoFile will mux SRT subtitles into MKV if ExtractCC is used in profile
    - ConvertVideoFile file editing much more robust, works with compressed and uncompressed samples (i.e. transcoding is not required)
    - Use MediaInfo.dll for non-SBE file types media metadata
    - Setting to disable adding media type information to metadata
    - Updated version of mencoder
    - Updated Comskip to 80.023
    - Added DTBVideoEditor GUI application (UI for VideoConvertor, convertor used by ConvertVideoFile)
    - Included "MPC - Audio Decoder Filter (babgvant)"; customized audio decoder from MPC-HC project
    - Included "MPC - Mpeg Splitter (Gabest)"; MPEG-PS/TS splitter from MPC-HC project (MERIT modified)
    - Included "MPC - MPEG-2 Video Decoder (Gabest)"; MPEG video decoder from MPC-HC project (MERIT modified)
    - Included "MPC - SubtitleSource (S_TEXT/UTF8)"; SRT source filter from MPC-HC project
    - Included "MPC - Video decoder (babgvant)"; customized video decoder from MPC-HC
    - ConvertVideoFile supports source filters in preferred filter list
    - Exe assemblies are complied as x86 applications (no more x64 rev)
    - ConvertVideoFile will write show metadata to MKV files
    - Removed reboot requirement from installer
    - ConvertVideoFile supports writing audio/video only files (i.e. converting to mp3/aac); user must validate container (DTBVideoEditor enforces simple rules)
    - Include MencoderProper application
    - DSCutter caches media type changes and passes them downstream on the next allowed sample
    - Add workaround in MPC - Audio Decoder Filter (babgvant) for multi-channel AAC where channel information isn't set in the negotiated media type
    - ConvertVideoFile supports SBE files
    - Media type dection supports SBE files
    - Add media info dialog to DTBVideoEditor
    - Add ConvertVideoFile profile creation option to DTBVideoEditor
    - Add more error handling and path testing to FW
    - Recreate FW Service & Installer class (potential fix for 2869 issues?)
    - Create profile button in DTBVideoEditor adds FindCommercials and ExtractCC actions if corresponding options are selected
    - "Modify File Permissions" is now checked by default
    - Update MencoderProper

    bin | source

  • Enabling Multi-Channel for Other Audio Formats

    If you're fortunate enough to have a PC with multi-channel LPCM output enabling full fidelity audio output is easy (and there's not much point in reading the rest of this) but for those using a SPDIF or stereo only HDMI connection getting multi-channel audio working can be challenging.  This guide intends to explain two different options and how to configure each to attain this goal.

    TERMS

    • (L)PCM - Uncompressed audio
    • Bitstream - Transmit compressed digital audio over a digital connection to another device (usually an AVR) for decoding
    • Multi-channel - Streams containing more than two (stereo) channels of data (5.1, 7.1, etc)
    • SPDIF - Optical (toslink) or coaxial cable with enough bandwidth for stereo PCM or compressed multi-channel audio
    • HDMI - Digital connection used for audio and video; has enough bandwidth for 7.1 channels of uncompressed audio.  In some implementations audio is restricted (why?) to function like SPDIF

    While there are many multi-channel audio codecs around (AC-3, DTS, AAC, WMAPro, and FLAC to name a few) most* AVR will only decode bitstreamed AC-3 and DTS variants, so even though technically possible to send other compressed multi-channel formats to the AVR it won't know what to do with them.  If all your content is one of those formats, like all DVDs and Blue-ray discs which contain either an AC-3 or DTS (and sometimes both) audio track you're all set, just setup AC3Filter in SPDIF mode and you're done.  If on the hand, you have a more diverse collection of multi-channel formats in your collection and you want to enjoy more than stereo sound it is necessary to configure the PC to decode those audio formats to PCM then compress it to a format that can be bitstreamed to the AVR for decoding.

    Turning this.


    Into this.

    I'm aware of two methods to get this working (ignoring using multi-channel analog connections) over SPDIF; both are DirectShow based so media players using a different framework will need an alternate solution.  Please read both solutions before choosing one.  For simplicity they will presented [for the most part] as if each one was the only one provided.

    ReClock


    ReClock is a DirectShow audio rendering filter that can be configured on a per application basis to replace the default DirectSound renderer used by most DirectShow based players. While there are many features that make ReClock a really slick addition to any HTPC, we're only going to focus on "Use AC3 encoder for PCM sound" feature here. 

    When using ReClock it's important to understand that there are some potential tradeoffs.  Because its original purpose is to synchronize A/V streams for PAL content by correcting the adjusting audio samples, all the audio you feed it should be PCM for it to be processed correctly by the renderer.  Which of course means that all audio formats, even ones that could be bitstreamed, should be decoded on the PC.  For most (including me) this shouldn't be an issue, but it may be for bitstreaming purists.  If you fall into that camp, it will let you configure the renderer to accept SPDIF formats (AC-3, DTS) and they will pass through as-is but it's not recommended.  In some limited testing (a 720p 60fps ATSC and a 1080 24p clip on my TV running at 60Hz) using SPDIF formats seemed to work OK for both AC-3 and DTS.  I couldn't hear any difference between bitstreamed AC-3/DTS, AC-3/DTS that was decoded and rencoded to AC-3, and AC-3/DTS that was decoded and output as multi-channel PCM so ultimately it's up to you.

    After installing ReClock open up the "Configure ReClock" application and select "Use AC3 encoder for PCM sound", depending on your preferences select "only with multi channel sources" which will leave stereo PCM untouched.  Note that there are options for forcing ReClock into applications and think about how you would like it to behave.  If you're using SageTV, or another application that allows the renderer to be selected, you can opt to uncheck the box if you want.  I let it replace the default renderer then blacklist applications where I don't want it used.

     

    If you want to try out leaving SPDIF alone, check "Accept SPDIF formats (not recommended)" and they will pass through.  If the option to replace the default renderers is left checked the next time playback is initiated a dialog will appear for the application allowing ReClock to white/black list or defer.

     

    The last step is to configure the difference audio decoder filters that will be used.  It's not practical to walk through every decoder available, so I'm just going to point out how to configure AntiPack.

    The MPC-HC Audio Decoder will handle every multi-channel format I'm aware of, including LPCM, except WMAPro which uses an OOTB decoder (note the player must configure the decoder to output high resolution audio for it to work; I know SageTV does this) so we should be covered.  If you're using AC3Filter for AC-3 and DTS leave "Decode AC-3 and DTS" unchecked, and configure the audio decoder exactly as noted below; otherwise check the box and you're done.


    Go ahead and fire up the AC3Filter page configure the "Main" tab for PCM output (note that "Use SPDIF" is unchecked).


    And check that PCM is not selected on the "System" tab. 

    For those who would like to use the bitstreaming option click through to the AntiPack page and follow the instructions for configuring AC3Filter to bitstream. 

    Enjoy.

    AC3Filter

    AC3Filter is a DirectShow audio decoder filter that decodes AC-3, DTS, and MPEG Audio (claims LPCM support, but that appears to be broken).  It also accepts PCM types and can be configured to encode the uncompressed audio to AC-3 for SPDIF bitstreaming.  The main benefit to using AC3Filter over ReClock is that it will not strongly suggest that formats that can be bitstreamed get decoded on the PC first.  The main drawback is that because AC3Filter is a transform filter and not a renderer, it needs to have a very high merit to automattically join graphs and requires the underlying player to use Intelligent Connect at very specific points when building the graph so it can be difficult to make it work consistently in every player.

    Setup is pretty easy.  Open the AC3Filter configuration utility as an administrator (we will be changing the merit) or using the AntiPack configuration utility select PreferrerdPlus2 then launch the configuration page. 

    Check "Use SPDIF" on the Main tab.

     

    And passthrough AC3, DTS on the SPDIF tab.


    Before moving to the System tab check that "Use AC3 encoder" is checked in the SPDIF options.  Depending on your preference for stereo PCM encoding check "Do not encode stereo PCM".

     

    Then on the System tab, ensure that PCM is selected in the "Use AC3Filter for" section and "Prefer AC3Filter" in the "Filter merit" section before clicking OK.

     

    That's the easy part.  Now you need to figure out how to make your media player of choice always load AC3Filter.  Based on observation it seems most likely to join graphs when the audio decoder is unknown or if the file is simply "Rendered.  If the graph is built explicitly or semi-explictly with prefered filters in place before rendering the output pins, I have not been able to figure out how to make it join.


    * If you have a Pioneer AVR chances are it supports WMAPro bitstreaming; if you configure Vista to bitstream WMAPro it works just like AC3 & DTS.  MC and WMP will respect this setting without needing to do anything else, but if you use SageTV the client properties file will need to be edited to use the "WMAPro over S/PDIF DMO" for WMAPro audio streams

    Posted Aug 11 2009, 08:47 PM by babgvant with 7 comment(s)
    Filed under: , ,
  • DVRMSToolbox 1.2.1.8 - Early Access Release (R3)

    [Early Access]

    UPDATED: I included the wrong version of the aac encoder filter which caused a registration issue during install.  The problem has been fixed in a new installer.

    Version 1.2.1.8
    - ConvertVideoFile supports Native A/V container swaps (w/ editing); user must verify that container swap works
    - ConvertVideoFile supports TS output if SageTV is installed
    - Added hang detection to underlying converter class
    - Added ExtractCC action (uses ccextractor - included in package) dumps SRT subtitles
    - ConvertVideoFile will mux SRT subtitles into MKV if ExtractCC is used in profile
    - ConvertVideoFile file editing much more robust, works with compressed and uncompressed samples (i.e. transcoding is not required)
    - Use MediaInfo.dll for non-SBE file types media metadata
    - Setting to disable adding media type information to metadata
    - Updated version of mencoder
    - Updated Comskip to 80.023
    - Added DTBVideoEditor GUI application (UI for VideoConvertor, convertor used by ConvertVideoFile)
    - Included "MPC - Audio Decoder Filter (babgvant)"; customized audio decoder from MPC-HC project
    - Included "MPC - Mpeg Splitter (Gabest)"; MPEG-PS/TS splitter from MPC-HC project (MERIT modified)
    - Included "MPC - MPEG-2 Video Decoder (Gabest)"; MPEG video decoder from MPC-HC project (MERIT modified)
    - Included "MPC - SubtitleSource (S_TEXT/UTF8)"; SRT source filter from MPC-HC project
    - Included "MPC - Video decoder (babgvant)"; customized video decoder from MPC-HC
    - ConvertVideoFile supports source filters in preferred filter list
    - Exe assemblies are complied as x86 applications (no more x64 rev)
    - ConvertVideoFile will write show metadata to MKV files
    - Removed reboot requirement from installer
    - ConvertVideoFile supports writing audio/video only files (i.e. converting to mp3/aac); user must validate container (DTBVideoEditor enforces simple rules)
    - Include MencoderProper application
    - DSCutter caches media type changes and passes them downstream on the next allowed sample
    - Add workaround in MPC - Audio Decoder Filter (babgvant) for multi-channel AAC where channel information isn't set in the negotiated media type
    - ConvertVideoFile supports SBE files
    - Media type dection supports SBE files
    - Add media info dialog to DTBVideoEditor
    - Add ConvertVideoFile profile creation option to DTBVideoEditor
    - Add more error handling and path testing to FW
    - Recreate FW Service & Installer class (potential fix for 2869 issues?)
    - Create profile button in DTBVideoEditor adds FindCommercials and ExtractCC actions if corresponding options are selected
    - "Modify File Permissions" is now checked by default

    bin | source

  • 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

    Both:

    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.

@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems