in

andy vt's tools & blog

automating lazy

This Blog

Syndication

andy vt's blog

November 2006 - Posts

  • Media Center Awards

    Don't forget to vote for your favorite application.

  • Building My MCE

    I evangelize MCE to pretty much anyone who will listen.  Once they're sold on the concept most ask how much it costs, I tell them that the cost of an entry level system is pretty minimal $300-$500 but the sky is the limit depending on what you want to put in it.  Here's my system and the reasoning behind it.  In most cases the link goes to the manufacture's page, but in some cases (OEM or I couldn't find it on their site) I link to where you can buy it.

    Case: Ahanix D4 Media Center Enclosure ($220) - The case comes with a 350 watt PSU, but I didn't use it in my MCE; Ebay it to make some money back.  The case is the most important thing to get right when building any PC.  It is the part I hold on to the longest, a good case can last through many upgrades; the config below is the 3rd HTPC to sit in it.  For a long time I tried to go budget when selecting a case, and always regretted it.  Get the best case you can afford, getting cut up when you're messing around in the case really sucks.  Unless you really need to get a micro case go for a full ATX.  Motherboard selection is very limited in the micro-ATX format and you can always put a micro board in a full size case if you find one that suites your needs.  This is a great case, when I bought it there wasn't much selection in this form factor, now the landscape is very different with some really nice cases from Silverstone and other vendors.  One negative for this case is this case is cooling, stock it has two 60mm fans in the back and no mount in the front.  I added a 60mm-80mm adapter to one of the mounts in the back and it cools OK, an additional fan in the front would be better.

    PSU: SILVERSTONE Strider SST-ST40F ($70) - Like the case a good PSU will last through several PC upgrade cycles.  In a HTPC noise level is more important than raw power.  I opted for a 400 watt, which will provide ample power for several hard drives, a single video card, and a fast CPU.  Get one with PFC, your components will thank you.

    Motherboard:  GIGABYTE GA-M59SLI-S5 ($164) GIGABYTE GA-M57SLI-S4 ($120) MSI K9N Platinum ($100) - When building a new PC, I usually choose the motherboard first.  It forms the foundation of the PC, selecting a good board will save you time and money in the long run.  I stay away from budget and overclocking boards; stability is a must in a HTPC.  When I built my current PC, the selection of Core 2 Duo boards was terrible so AM2 might not be the best price/feature/performance selection right now, but it was then.  Things I look for are gigabit ethernet, firewire, digital audio outs on the board (not through a riser card), and lots of slots, both PCI and PCI-E.  This board is passively cooled, so make sure you have a good case fan(s) in the back.  This board has two big advantages over the boards I had before.  The first, and most important, is that it does Dolby Digital Live encoding; a feature that made me hang onto my Nforce 2 based board far past it's prime.  And the second is that it uses a heat pipe to connect to a heat sink right under the exhaust fans in my case, which has made a huge difference in the system temp. 

    CPU: AMD X2 4200+ (65 Watt) AM2 ($169) - Get two cores, video conversion is multi-threaded; scanning for commercials on one core, recording, playback, etc on the other; you won't regret it.  Intel and AMD both have excellent choices across the budget spectrum.  The AM2 chips are cool, fast, and available in low power models.  Ultimately, make the chip choice based on the motherboard you select, but it's hard to go wrong with any modern (i.e. don't get a P4) dual core cpu.  If you don't need to go over the 4200, get the 65 Watt model, it's just as fast but much cooler; remember that heat is your enemy as heat equals noise.

    HSF (Heatsink and Fan): Retail HSF ($0) - I wish it was quieter, but it's not loud enough for me to do anything about it. 

    Videocard: Gigabyte GV-NX73T256P-RH ($90) - I use the Nvidia PureVideo MPEG decoder, which tends to favor Nvidia's GPU's from a performance perspective; also the picture quality is better with Nvidia's GPU's and the selection tends to be better.  There are valid reasons for selecting an ATI board, and like the CPU it's hard to go wrong with either.  If you aren't going to be doing serious gaming you don't need a high end board.  I'll probably get flamed for saying this, but anything faster than a 7600 class board is overkill in a HTPC.  Get a card with 256MB of fast RAM, the bandwidth between RAM and GPU is the most important thing for studderless HD playback.  Also, spending less on a card today, makes it easier to get the next generation tomorrow; with product cycles around 6 months spending too much on a video card is a waste.  I prefer to get a high-end budget card (7300GT) to a low-end midrange card (vanilla 7600); the GPU's often have the same feature set for video playback (the difference is in pipelines which only helps gaming performance) and the RAM is faster in the GT type cards.  The budget cards usually run cooler, so you'll have more options when it comes to cooling the card (I like the passive cards).

    RAM: OCZ OCZ2G8002GK 2GB ($210) - Get a lot of fast RAM.  In most applications RAM is more important than CPU.  But RAM is easy to upgrade, and with the way the price fluctuates timing is everything, so sometimes it better to get what you need now and upgrade to what you want later.  The price here is $40 more than I paid when I built my box a few months ago. 

    Hard Drive: Seagate Barracuda 7200.10 ST3320620AS ($90) - There's little to no difference in speed between SATA 150 and SATA 300 drives, but some SATA 300 drives have NCQ which does make a difference in multi-user environments.  Even the simplest systems can benefit from the feature, and at $90 a drive you can get a couple and have more space than most will know what to do with. 

    Optical Drive: LG GSA-H22N ($30) - Someone may have a legitimate reason to spend more on a DVD drive, but IMO as long as it burns and reads DVDs, cheaper is better.  This drive is quiet and fast, hard to go wrong with that in a HTPC.

    Network Card: Integrated Gigabit ethernet.

    TV Tuner: Hauppauge WinTV-PVR-150MCE ($65) - I've had, and have other MCE tuner cards, but this one is the best. 

    Remote: Logitech Harmony 680 ($85) - Completely optional, but makes the experience so much nicer.  The activity based control brings the SAF way up.  Before I had this remote, I had a more traditional universal remote and navigating the inputs on the receiver and TV was a pain for everyone but me. 

    IR Receiver: Microsoft MCE 2005 Remote ($40) - Not much to say, you have to have it.

    Keyboard/Mouse: Gyration RF Keyboard and Mouse ($85) - A true anywhere in the room keyboard and mouse solution.  The keyboard is small, so it fits nicely away when I don't want to see it.  The mouse takes some getting used to for in the air use, but it is intuitive and really works.

    Total: $1318

  • Bad news re: CableCARD

    I've speculated before that CableCARD was going to reduce the value of WMC, today Chris Lainer posted some confirmation that CableCARD content will not play nice with others.

    "just as with current CGMS-A protected content it [CableCARD content] can only be played back on the Media Center PC it was recorded on (inside of Media Center only, not in Windows Media Player) or a Media Center Extender."

    ...

    "Another bit that you can not do with CableCARD recordings is convert them to go on portable devices (Zune, Portable Media Center’s, iPod’s, etc)."

    I was disappointed when Microsoft announced that CableCARD was going to be an OEM only feature, but this is too much.  Removing the ability to do useful things to the content on your PC destroys the value of having it there in the first place; making the PC a "closed box", with none of the benefits of having a traditional "closed box" in your A/V stack.  If I "needed" CableCARD, I seriously consider a TIVO. 

    I wonder how CableCARD users will react when they discover that they cannot archive, burn, place shift, edit, their dvr-ms content.

  • Using ExtendRecording and RelateExtendedRecording

    ExtendRecording was designed to automate the process of dealing with creating a new recording starting at the end time of the show for the configured duration when you expect the scheduled recording to overrun its time slot.  The main application for this functionality is sporting events, which always run over their allotted time slot (in the states anyway, don't have this problem with the EPL;)) and there's no way for MCE to detect that change and automatically extend the recording.

    Here's a picture of a profile that I created for the World Series, creating a 90 minute recording request when the originally scheduled show starts processing.  It's important to note the placement of the action in the profile, it should be placed before the throttle action to ensure that the request is made before the end of the show.

    The action itself is simple to configure, it accepts a time in minutes to record and the policy setting should a conflict exist.  Pair this profile with a PC that will match the shows that you want to extend...


    and you're in business.

    So where does RelateExtendedRecording come in?  When the recording request is generated the show's title is set to "ExtendRecording ###-###" where the numbers in the title are the schedule id and request id that MCE uses to track the recording internally.  Using these values, RelateExtendedRecording can look up the path to the original file path in Recordings.xml and using JoinFiles (one of the other new actions) to create a new file that appends the extension to the original show.

    The profile looks like this:

    It contains Throttle, FindCommercials (to find the commercials in the extended recording), RelateExtendedRecording, JoinFiles, and MoveOutputFile (to move the resulting file into the recorded tv folder for viewing)

    The only action that really needs explanation is JoinFiles -

    DeleteOrgFiles - deletes the source files if checked
    AdjustCommercialFile - if checked it sums the commercial xml files from the source files, so the new file doesn't need to be scanned
    ContextFile - this action (as noted in the release notes) can be used in other scenarios with an xml file located in the specified context location
    UseContextFile - check the box to have the action use the value specified in ContextFile, otherwise an internal context value is used.  Leave it unchecked in this scenario.

    And the associated PC:

    The profile and pc to relate extended recordings can be downloaded here.

  • Advanced Actions - Public Release

    Version 1.0.0.0 of the advanced actions dll has been publicly released.  It includes two actions, one that will convert dvr-ms files to xvid (or divx) directly.

    Details and download here.

  • DVRMSToolbox 1.1.0.3 Released

    Version 1.1.0.3

    - Fixed a bug in the Settings tool that didn't fall back to the pluggins dll if Context enum wasn't found in other action's dll
    - Added ExtendRecording action, adds a recording for a specified period of time based on the end time and channel of the currently processing show
    - Added AdvancedRenameFile action, renames specified context file using meta data values specified using %MetaDataName% format
    - Added RunExternalPlus action, performs the same function as RunExternal, but allows the output of the external process to be tested against a configured value to determine success.
    - RenameFileWithRegex Action added, uses a regular expression to rename a file found in the specified context value
    - MceState will write events with initializes indicating success of failure
    - Added avi and dvrms-proj output types and xml input type to GUI tool
    - PluginsConfigure extended to define methods for calling from settings tool
    - Settings tool extended to call methods decorated with PluginConfigure(ConfigType.Method)
    - Added DisplayName property to PluginsConfigure, Settings tool will use this value to label dynamic configuration elements if defined
    - Add JoinFiles action; accepts an xml document in the format <root><file path="c:\file.dvr-ms" order="0"/><file path="c:\file1.dvr-ms" order="1"/></root> and splices the files
    - Add RelateExtendedRecording action; splices an extendedrecording file to the file that triggered the extended recording
    - Created a new project (dll) for actions that require (or don't make sense to not run on) WMC machines; ExtendRecording and RelateExtendedRecording are in this project
    - Fixed a bug in the commercial skip addin where xml files created by a job request were not detected until stop/start cycle
    - Fixed a bug in the commercial skip addin where move back/forward generates an error when a commercial node is not returned
    - Added > < conditions to the PC engine
    - Added new registration detection logic to CommericalAnalzer to determine if SA should be used
    - SA Version 0.8.4 included
    - comskip 0.79.61 included
    - Set default paths for temp and output directories

    Download here.

  • Version 1.1.0.3 is coming

    I've been waiting for a new version of ShowAnalyzer to release 1.1.0.3; Jere released a new rev today, so I just need to find some time to package the new version.  Hopefully tonight, or tomorrow; below is the list of changes.  I'll be doing a write up on how to use the new ExtendRecording and RelateExtendedRecording actions soon after.

     

    - Fixed a bug in the Settings tool that didn't fall back to the pluggins dll if Context enum wasn't found in other action's dll
    - Added ExtendRecording action, adds a recording for a specified period of time based on the end time and channel of the currently processing show
    - Added AdvancedRenameFile action, renames specified context file using meta data values specified using %MetaDataName% format
    - Added RunExternalPlus action, performs the same function as RunExternal, but allows the output of the external process to be tested against a configured value to determine success.
    - RenameFileWithRegex Action added, uses a regular expression to rename a file found in the specified context value
    - MceState will write events with initializes indicating success of failure
    - Added avi and dvrms-proj output types and xml input type to GUI tool
    - PluginsConfigure extended to define methods for calling from settings tool
    - Settings tool extended to call methods decorated with PluginConfigure(ConfigType.Method)
    - Added DisplayName property to PluginsConfigure, Settings tool will use this value to label dynamic configuration elements if defined
    - Add JoinFiles action; accepts an xml document in the format <root><file path="c:\file.dvr-ms" order="0"/><file path="c:\file1.dvr-ms" order="1"/></root> and splices the files
    - Add RelateExtendedRecording action; splices an extendedrecording file to the file that triggered the extended recording
    - Created a new project (dll) for actions that require (or don't make sense to not run on) WMC machines; ExtendRecording and RelateExtendedRecording are in this project
    - Fixed a bug in the commercial skip addin where xml files created by a job request were not detected until stop/start cycle
    - Fixed a bug in the commercial skip addin where move back/forward generates an error when a commercial node is not returned
    - Added > < conditions to the PC engine
    - Added new registration detection logic to CommericalAnalzer to determine if SA should be used

  • Hidden goodness in Vista?

    Nial over at the Big Screen Blog wrote up a "rant" (his words) on the hidden goodness of Vista.  In it he talks about the good stuff that's under the covers that will enable developers to do really cool things with Vista, things that weren't possible with MCE.  He makes a good point, there are lots of things to like about Vista.  MCML is really slick, UAC is a great (while somewhat annoying) feature, Vista and WMC seem to be an excellent next generation platform.  But I think it's overly dismissive when he implies that those who aren't running out and installing Vista are doing so because they've been influenced by fud.

    There are many valid reasons to not move to Vista (at least in the short term). 

    • Cost, Vista isn't cheap, add to it that most people buy their OS license bundled with a OEM pc.  I certainly wouldn't pay $400 for Ultimate.
    • Having a cool platform to play with is great for developers, but not everyone is a developer.  Until the applications come that make it worth while to make the move to Vista, there's lots of eye candy, and the music library being more responsive is nice, but IMO there's not a big enough value-add in WMC over MCE to warrant an immediate shift.  Maybe I'm missing something, but many of the new features in WMC don't apply to those who build their own boxes...
    • Existing applications that don't work, or don't work well in Vista.  I haven't installed RTM yet, so I don't know how much of this is related to pre-RTM code, but quite a few of the free applications that I use are really flaky on Vista.  Most of it is probably related to the application itself (not being designed for Vista's environment), but that doesn't change the outcome...
    • Lack of driver support.  Think about SAF when you have to explain that you can't print.  This will probably sort itself out by Retail; but until then, the fact that there's no LEAP client for my Centrino laptop is keeping Vista off of it.
    • MCE works, this is a big one for me.  MCE 2005 has gotten to the point where I don't have to worry about stability, missed recordings, the channel not changing properly, etc.  I know that when I sit down to watch something, it's there, I don't have to watch the commercials, I can convert it to wmv, copy that wmv to my ppc, etc.  I don't have the same level of confidence with Vista.  I'm sure it will get there, and when everything works the way it should then, and only then will it go on the main box.

    That being said, I want to make clear that I'm not saying that Vista isn't a good product or platform, I believe that MS has done and outstanding job with it.  All new technologies need some time to mature, it's too early to denigrate those who want to take their time.

  • MSAS Bug?

    There's a bug in LCDWriter where the name of the TV show that you're watching doesn't display if you've watched a show in the same series immediately before, and deleted the previous show before watching the show that has the problem.  This bug has been around for as long as there's been a LCDWriter, I've just never taken the time to understand why it occurs.  I finally got sick of seeing "Recorded TV" while watching a series of shows, and took a look into it.

    Starting with a basic explanation of  how MSAS (Media State Aggregation Service) works; if you're familiar with how you can skip this part. 

    MSAS requires that two interfaces are implemented in a sink.

    public interface IMediaStatusSink { void Initialize(); IMediaStatusSession CreateSession(); } public interface IMediaStatusSession { void MediaStatusChange(MEDIASTATUSPROPERTYTAG[] Tags, object[] Properties); void Close(); }

    IMediaStatusSink on the main class, and IMediaStatusSession on the individual sessions (appropriately an IMediaStatusSession is the collection of status values for a media session; show name, current position, etc).  When ehmsas.exe (the exe that does all the MSAS lifting) starts up (usually when a user logs in) it calls Initialize on the the class that implements IMediaStatusSink, so it can start up the VFD (or whatever the output medium is).  When Media Center starts ehmsas calls CreateSession for each new session that starts up; in this method the class creates an instance of the class that implements IMediaStatusSession and passes it back to ehmsas so it can have a reference when it needs to update media status.

    Every time a status property changes ehmsas calls MediaStatusChange with the new property value.  It's important to note that sessions are shared for each media type (i.e. watching a couple shows in a row all use the same session), and only new or changed values are passed, ehmsas does not empty properties that were sent previously.  When a session is complete; i.e. a new media session is started (playing a video after watching a TV show), or the current item is deleted Close is called on the session.

    This is where the problem comes in.  When watching several shows in the same series, they generally share several properties; things like title, duration, etc.  Ehmsas calls Close when the show is deleted, then calls CreateSession when playback starts on the next show, but assumes that the shared properties are still there in the session and never passes them so the new session only has the current playback position.

    Once this behavior is observed it's relatively easy to workaround the issue by storing session data when Close is called and using it to prepopulate new sessions of the same type when they are created, but that stinks of a bug to me.

    The new version of LCDWriter can be downloaded here.

  • ConvertToMp3SmtpSink Source code

    I couldn't find any managed samples for writing SMTP message sinks, so I'm releasing the source under the GPL license.
  • Using DirectShow to solve my voicemail problem

    I have Vonage at home, and overall I love the service.  I especially like that I can get my voicemail emailed to me so I know when I get a voicemail when I'm not at home.  The only problem with the feature is that Vonage sends out wav files that for some reason don't play on my Windows Mobile device (HTC Wizard) so if I'm away from a PC and I get a voicemail, I know about it but I can't listen to it.

    I've been thinking about ways to solve this problem for a while, but I never got around to doing anything about it.  When I was working on the ffdshow conversion action a few days ago I started wondering if I couldn't just do a wav-to-mp3 conversion on my email server using the Lame filter.  Turns out it was pretty easy.

    I ended up writing a SMTP event sink that responds to new messages.  When a new message arrives from a specific email address (Vonage's voicemail emailer) the event sink is activated; it examines the message for wav files and if one is found it converts the wav to mp3 and sends a new email with the mp3 as an attachment.

    By default the sink send the email using the current machine's name, and copies the to, from, subject, and body from the original message.  All of these properties can be overridden using the config tool.  Each value accepts normal text.  Multiple recipients can be specified in "To Override" by separating the email addresses with a semi-colon.  Unchecking "Deliver Original Message" will move the original message into the Bad Mail folder.

    download here.

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