in

andy vt's tools & blog

automating lazy

This Blog

Syndication

andy vt's blog

August 2008 - Posts

  • Progress

    One more to go :)


  • Configuring Sage for audio pass through

    I was having some trouble figuring out how to get Sage to pass through AC-3, DTS, and WMA Pro to my receiver.  This might be obvious to those with more experience with Sage, but it wasn't to me so hopefully this is useful.

    First configure Vista to pass through the audio formats and sample rates that your receiver supports; you need to do this part for Media Center too so it should look familiar.  Click "Test" if you're unsure.

    Then open up Sage and go to the DVD settings in the detailed setup section and configure the DVD Audio Renderer and DVD Audio Decoder settings.

    Set the Renderer to the SPDIF output:

    and the Audio Decoder to the MS MPEG-1/DD Audio Decoder.  If you don't see the MS decoder in the list, close down Sage and open the properties file and change the line videoframe/additional_audio_filters= to videoframe/additional_audio_filters=Microsoft MPEG-1/DD Audio Decoder.

    I couldn't get it to work properly with any of the other audio decoders on my system (Cyberlink, ArcSoft) even though they worked in their respective applications.

    Posted Aug 18 2008, 07:21 PM by babgvant with 2 comment(s)
    Filed under:
  • What is SAV1?

    You might have notices that one of the new features in DTB 1.2.1.4 is SAV1 integration.  SAV1 is the next version of ShowAnalyzer, and it is smoking fast. 

    It has some really slick features, the big three are listed below:

    • h.264 support
    • Out of process COM server implementation - this should make SA natively available to the x64 crowd 
    • SMP capable decoders

    It's still a little rough around the edges; I don't think profiles work yet and live hold off requires some trial and error to get working properly.  If you want to get in on the beta, and you are commited to providing Jere with solid feedback go to his site, register in the forum (if you aren't already), then send him a PM asking to be included in the beta.

  • DVRMSToolbox 1.2.1.4 - Early Access Release

    This is an Early Access release.

    Version 1.2.1.4
    - Fixed some bugs in condition testing routine
    - Changed delete file handling to use video types instead of watched types
    - Added file ext substitution for meta data retrieval
    - GetVideoInfo will ignore non-SBE files
    - FW can watch multiple directories
    - Added FileSize minimum (most effective when used with Queue Updates) to limit files that get queued by the FW
    - SAV1 integration
    - Changed PC Editor to display PC name
    - Added continuation functionality to PC

    Binary | Source

  • Sagetray Update

    I just uploaded a new rev of sagetray.  It's been modified to work more like ehtray.  If sagetv is minimized the window will be restored the first press of TGB, on the second press it will tell sage to go to full screen if it's not.

    Enjoy.

  • On TGB

    I was very skeptical that Microsoft acquiring The Green Button was going to be a good thing (not counting them throwing servers at it).  Happily I was wrong (at least so far); it's been great seeing the level of involvement, transparency, and support from all the folks from eHome (especially Jeff Tucker and the SEs).  When the TV Pack got posted I was expecting a crackdown, but the response was very open and is a really good sign for the future of TGB.  

     

    Posted Aug 14 2008, 07:13 PM by babgvant with 3 comment(s)
    Filed under:
  • One week with the HD PVR

    • I had some issues initially with the HD PVR locking up after a few recordings, after some settings changes (which are included OOTB with 6.4.7) everything got sorted
    • Everything looks great.  HD is really good, I think there is a slight degradation in quality b/w what I see on the TV using the passthrough and watching the ts file, but I only noticed when I was looking for it (and standing very close to the screen).  What I wasn't expecting is how much better SD looks.  
    • I wish that Sage could control the power on the device.  There's no need for it to be on when my PC is sleeping, it saves power and I won't have to tape the light (although as far as LED power lights go, it's not too bad).
    Posted Aug 11 2008, 06:53 PM by babgvant with 3 comment(s)
    Filed under: ,
  • Need help moving to Sage?

    Ghostlobster has written up an excellent guide to migrating from Media Center to SageTV.  He posted it in the Sage forums a few days ago and is looking for feedback from anyone who's made the switch, or is thinking about it.  Give it a read an help make it easier for everyone who's interested in replatforming.

    Also, I'm curious if there are any tools that would make migrating easier or that are currently missing from the SageTV ecosystem.  Let me know.

  • I have a mpeg, now what?

    Yesterday we discussed how to use DTB to make a file into a mpeg, today let's answer Galt's question.  This is a much easier process because we've already done the real work, and now it's really just extending the process with a few actions to turn it into a file that MC will see as a TV file.

    DTB can't convert files to DVR-MS natively, but todvrms can.  DTB includes two actions for shelling command line applications, RunExternal and RunExternalPlus.  Either one will work for our purpose, but to make it easier lets use RunExternal.  Also, for completeness let's assume that the source file contains metadata (or in the case of Sage files, we can fake it), and we want to copy the metadata from the source file into our newly created DVR-MS file.

    Select the profile we created yesterday in the settings tool and click "New Profile From".  Give it a good name and description, then add RunExternal, ChangeContextValue, and MigrateMetadata by clicking "Add". 

    Configure ChangeContextValue to use the InputFile to create an new context value called DVRMSFile using FindRegex = "([^\\]+)\.(\w|-)+\z" (notice this is a little different than yesterday, I changed it a bit to work with extension that have a - in them.  If the file you want to work with has a - in it, for completness you'll want to change the first ChangeContextValue too) and ReplaceRegex = "$1.dvr-ms" (without the quotes).


    MigrateMetadata to copy the metadata from InputFile to DVRMSFile (you will need to type this in).


    And RunExternal to execute todvrms.exe (if it's in the install dir you don't need the complete path) passing %OutputFile% and %DVRMSFile% as arguments.

    Then change the order of the actions at the end of the profile to be ChangeContextValue -> RunExternal -> MigrateMetadata.


    No download this time, that would be too easy :)

  • And when you don't

    I updated my Logitech Harmony remote when I picked up the new STB from the cable company.  After the update I immediately noticed that the "Media" button, which should be TGB on a MCE remote, didn't work.  Since you can't map this button using their tool I sent an email to support.  After a few days of waiting, this is the response I got back:

    We are sorry to hear that you are having a problem with the media button. Unfortunately, the media button option has been removed from the software, in the last update. We have requested that the option be put back into the software, but we do not have any AETA for when that will be happening. We apologize for the inconvenience.
    How can they just remove a button?  Espessialy the biggest, greenest button on the remote?  I had been thinking about replacing my 680 with the newer slicker Harmony, not so likely anymore.
  • When you get what you pay for

    The more time I spend with SageTV the more I like it, and not just as a product.  There are technical issues, it is a beta afterall (I'm using 6.4.6); but when I report an issue, I get a response.  Today I got a welcome email from the CTO, everyone probably gets the same email but it was still a very nice touch.  To top it all off, I got an unsolicited email from support letting me know that something I'd wished for in a previous post was being worked on.

    The level of responsiveness and transparency makes the entire experience much more rewarding, and makes a huge difference when things don't work the way you expect them to.

    Posted Aug 08 2008, 05:02 PM by babgvant with no comments
    Filed under:
  • Scanning unsupported files for commercials

    Say you have a file that isn’t supported by Comskip or ShowAnalyzer that you’d like to automatically scan for commercials.  There are a couple of reasons for this; either the codec isn’t supported or the container isn't (or both).  Fortunately the approach to solving both issues is the same.  In this post I’m going to discuss the simplest way to get this working using DVRMSToolbox (DTB). At the end we will use DTB to automatically create a full fidelity version of the file that can be used for commercial detection and also as a source for transcoding using other tools if the codec or container is not natively supported in that tool.

    Prerequisites:
    -    DTB  1.2.1.3+
    -    AVIVO (optional if creating a custom stub graph, required if using the one included)
    -    GraphEdit (optional, officially part of the platform SDK but can be obtained from various sources)
    -    Proppage.dll (optional, must regsvr32 to be useful. officially part of the platform SDK but can be obtained from various sources)

    The MPEG conversion graph:

    There are two actions in DTB that allow a completely arbitrary stub graph to be used for file conversion, ConvertWithGraph and ConvertWithExplicitGraph.  Because ConvertWithGraph relies on Intelligent Connect (IC) to build the graph it is generally much easier to work with, since the goal here is to create a full scale .mpg I’m going to use it instead of ConvertWithExplictGraph.  ConvertWithExplictGraph will use IC, but only to connect source pins with the initial video and audio pins on the filter specified in the XML definition that must be provided.  The XML document defines the connections from that point on, so filters that would not normally wire up via IC can be used to do things like scale, rotate, or whatever the filter does.  An example profile (“Convert a file for commercial scanning”) that uses ConvertWithExplictGraph is included in DTB 1.2.1.3+ if anyone is interested in using the action and needs a starting point.

    In the included stub graph (makemempg.grf) I’ve added all of the filters necessary to convert a file from whatever format it is in to a mpg.


    Note that if it’s a container issue (i.e. the streams are mpeg video and mpeg audio or AC-3) two of the filters are unnecessary in the stub (ATI MPEG Video Encoder and ATI MPEG Audio Encoder), but will be bypassed when the source file is rendered in most cases.  It’s easy to see if they will for the source file by opening the stub in GraphEdit and selecting “Render Media File” to add the source to the graph.  The image below is an example of what happens when a DVR-MS file is rendered.

    If it’s an unsupported codec, and the demuxer/decoder filters that have higher merit (merit is a number that DirectShow uses to prioritize what filter gets added when using IC to connect filters) are the ones that produce the best results on your machine the stub can be used as-is.  If however, an undesirable filter has higher merit some modification is necessary to convert the file.  Again, we can find out by opening the stub in GraphEdit and using “Render Media File” to find out what filters will join automatically, and if the file will convert properly.

    This image shows the results on one of my PCs when I render a HD PVR TS recording.  


    And this shows the results when rendering a WMV file.


    In both cases some additional configuration is necessary to make the conversion work.  Using the WMV graph as an example; we want the A/V output pins on the WMV source filter (which is also a splitter) to connect to the MPEG A/V encode filters and not directly to the muxer.  So some additional filters need to be added to the stub to make it work.  Fortunately we can use IC to help us determine which decoder we should add by deleting the connection between the A/V output pins and the muxer and connecting them to the respective input pin on the MPEG encoder filters.


    Now we know that we should start with the WMAudio Decoder DMO and WMVideo Decoder DMO.  Close GraphEdit and reopen the stub, select Graph -> Insert Filters from the menu bar.


    Browse the dialog that opens to find and add the filters (either double click on the filter or select it and click “Insert Filter”).


    Make sure to save the stub before continuing, then “Render Media File” to test that everything wires up correctly.  It should look something like the image below.


    Test conversion by clicking the “Play” button.  If everything works, you’re ready for the next step.

    So what do you do when it doesn’t work?  Here’s where it gets more complicated.  In simple cases like the one with the TS file, the wrong filters get added when merit is used, you just need to find the right filters and add them to the stub like we did with the WM Decoder DMO filters.  Usually, professional filters from companies like Cyberlink or ArcSoft work the best.  For HD PVR TS files, I’ve had the best luck with the ArcSoft ones that come with TMT (that’s what “Convert a file for commercial scanning” uses) but your mileage will vary.  For more complex cases where even though the correct filter is part of the stub, but it still won’t wire up you’ll have to use ConvertWithExplictGraph.

    Creating a profile:

    Now that the stub is working it’s time to create a DTB profile that will run the graph and scan the mpeg it creates for commercials.

    Open up the DTB Settings tool, select (but don’t double click) “Find Commercials in DVR-MS”, and click “New Profile From” to create a new profile.  Give your profile a name and a description.  If the file that you want to use this for was not created by Media Center remove “Get Video Information” from the profile.

     

    Click Add, and select the ConvertWithGraph, ChangeContextValue, and optionally FileOperation if you want to delete the mpeg when you’re done (the included profile does not have FileOperation).


    As the actions are added, the configuration dialog will display.  Configure ConvertWithGraph to use the stub created earlier, note that if the grf file is in the DTB install dir you do not have to enter the entire path (if it’s not, just double click the text box and browse to where it is).  You can check "Run as fast as possible" but keep in mind that some source filters don't like this option (the graph will crash), so if you have a problem make sure you uncheck this first.  To enhance compatibility I'm going to leave it unchecked, but feel free to play with it.  


    Configure ChangeContextValue to use "InputFile" to change the value of "OutputFile" using “([^\\]+)\.\w+\z” as the FindRegex and “$1.mpg” as the ReplaceRegex (without quotes).  This will change the file extension of the input file from whatever it was to mpg, ensuring that if you want to use the edl or xml file that will be created for the source file it will be named correctly.

     

    The actions will not be in the correct order when they are added, so you will need to move them to the correct location using the “Up” and “Down” buttons.  Place ChangeContextValue directly under “Get Video Information” (if it is there; "Throttle DVRMStoMPEG" if it is not) and ConvertWithGraph directly below ChangeContextValue.


    Double click on “Find Commercials” and change the ContextFIle to “OutputFile”.


    Save the profile, you should see it in the list of profiles now.  

    Watching for files:

    Before clicking “Save” in the settings tool, go to the File Watcher tab and add the file extension that you want to watch for to the “Watched Ext” field using “,.ext” syntax (don’t enter the quotes).  Then click "Save" to save the settings and exit the tool.

    Create a Processing Condition:

    Almost done, but now you have a decision to make.  If this process should run on every file that the File Watcher is looking for you can modify the “Every File” Processing Condition (PC) to use the new profile.  If it’s more selective than that, a custom PC will be required to handle the process.

    For completeness lets create a custom PC.  Open the PC Editor and select “New Condition”, add a description, select the profile that was just created from the drop down, and click “Add” to create the metadata condition that will match the target file extension.  Make sure to substitute the real extension that you want to match for in the place of ".ext".


    The end result should look like something like this.


    Save the condition, and change the priority to the correct location (somewhere above “Every File”).  Then click “Save” to exit the editor.

    Make sure it works:

    No one likes to test, but we should probably check our work.  Open up the DTB GUI tool and select an example of the target file type as the input, put anything that you want to into the output field (it’s going to change anyway), deselect “Use Selected Profile” (this tests PC evaluation), and click “Run”.

    Assuming that it all goes smoothly you’re all set.

    If you'd like to use the files I created for this, they are available for download.  Extracting them to the DTB install directory should put them in the right place, but please be aware that if  "C:\Users\Public\DvrmsToolbox\DTBTemp" does not exist on your computer the graph will fail to load.

  • One more time - Update SageScan

     Download sagescan again.

  • Serious Bug in 1.2.1.3 for Sage HD PVR users

    There's a bug in the version of sagescan that was included with 1.2.1.3 that ends up deleting the input file if it's not an MPG.  I've updated the msi with an updated version, and for those who have already installed it just replace sagescan.dpc with this one.

    Sorry about that...

  • Initial HD PVR Thoughts

    - I wasn't expecting it to be so big, not an issue, just surprised.

    - Took a lot more effort to get it working with Sage than I was expecting (I should have read the Sage forums first :)).  I had to uninstall Sage (which to be fair was a 6.3.10 -> 6.4.5 -> 6.4.6 migration) then install again to get it to work.  More testing is required to ensure reliability, fortunately there isn't much "high value" TV on right now so if something doesn't record the SAF won't suffer much.

    - Sage doesn't use the EVR renderer on Vista so the ArcSoft decoders aren't HW accelerated.  Hopefully this changes soon, I'd like to use that CPU for commercial detection during playback, in the current config I'm not sure it is possible to do detection and watch at the same time with my 4200 X2.  Long term if Sage doesn't support EVR, an extender or the client could be used to split the CPU.  Another option is using DTB's delegation functionality to have on of my other PCs handle the convert and scan functionality.

    - I ditched HD cable when Comcast enabled 5C on all the non-locals a couple years ago; it's really nice to have it back, even better to be able to record it again.  Can't wait for the Champions League to start in a few months :)

    Posted Aug 04 2008, 07:20 PM by babgvant with 4 comment(s)
    Filed under: ,
More Posts Next page »
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems