in

andy vt's tools & blog

automating lazy

This Blog

Syndication

andy vt's blog

February 2007 - Posts

  • Recording Broker - Automated Recording Conflict Resolution

     

    I have two Media Centers, each having one tuner.  Most of the recording requests are submitted on the main one (in the living room) and I often wished there was an automated way to detect the recording conflicts and submit them to my other Media Center to better take advantage of it's tuner.  Recording Broker is just that...

    Recording Broker is an application that detects recording conflicts and submits recording requests to other brokers configured in the application.  It is only available to Early Access members right now; don't worry it will be release publicly at a later date (publicly released 3/27/07) .

    The solution is contains two applications, RecordingBroker.exe and RecordingBrokerService.exe.  After installation Run RecordingBroker.exe and click Save to write the settings to the registry, then start the service from the Service MMC.

    RecordingBroker.exe is the settings tool, use it to add brokers and configure how the service behaves. 

    Port - the the port the server binds to
    Poll Time - how often, in seconds, WMC is polled for conflicts
    Secret - because this application could theoretically be used across firewalls (if you wanted to create a relationship with a friend's WMC); this secret is used to hash a portion of the request to verify that the other broker is trusted.  This must be set to the same value on all brokers.
    Connection Timeout - how long the broker will wait for a server to respond before failing
    Other Brokers - is a list of all the brokers that this machine has a relationship with; to add a broker enter the hostname (or dns name) of the other machine in "New Broker" and click Add.

    Settings must be "Save"d before exiting.  After saving settings, restart the service to have them take effect.

    RecordingBrokerService.exe is a windows service that acts as a tcp server so other brokers can communicate with that machine, and also polls WMC for recording conflicts so it can send requests to other brokers. 

    MCE (XP) Download

    WMC (Vista) Download

    Source 

  • DVRMSToolbox 1.2.0.5

    Forgot to mention that I put up a new rev for the Early Access Vista users.  Hopefully this fixes the stability issues with commercial skipping.

    Version 1.2.0.5
    - Replaced CommercialSkipService (COM+ Service) with DVRMSToolboxService (Standard Service); COM+ proved to be difficult to install and unstable, hopefully the approach used in 1.2.0.2 (IPC Remoting to a Windows Service) will prove more stable.
    - SA Version 0.8.7 included

  • DVRMSToolbox 1.1.0.4 - XP MCE Version

    Version 1.1.0.4 is now available (install | source)

     - changed Toub.MediaCenter.Dvrms.dll from 1.0.0.0 to 1.1.10.0
    - ConvertToWmvIC copies Closed Captions to WMV files for NTSC files
    - changed how dvr2wmv.dll is referenced, created an interop class that wraps the interface instead of using the generated interop dll
    - potentially fixed a bug where converting with dvr2wmv would hang on disposal
    - DVRMSToolbox.exe no longer tracks processed files
    - Added WMVIndex action, indexes wmv files
    - Added AdvancedActions to DTb, will not function without ffdshow and lame installed
    - Added ConvertWithDvr2Wmv which allows preferred decoders to be specified
    - Actions can now specify methods to call to build a list of allowed values
    - MigrateMetaData action uses WMVIndex action instead of implementing indexing functionality internally
    - FileIO action will discover and release file handles if unable to delete
    - DeleteFile action will discover and release file handles if unable to delete
    - DvrmsCutOutCommercials action will discover and release file handles if unable to delete file
    - Added ConvertToMp3 action to AdvancedActions, requires lame.
    - Added DumpContext action to AdvancedActions
    - Added ConvertWithExplicitGraph action to AdvancedActions
    - SA Version 0.8.7 included
    - Fixed a bug with DVR-MS splicing when the file begins processing while recording
    - Fixed a bug with AdjustingMetaData where all metadata is re-written, not just the changed values

    For a complete history look at the change log.

  • Treo 750

    Palm did a great job with the tactile feel of the device, it fits naturally in my hand and it is easy to talk into and place the speaker to my ear (I often have to move the 8125 around to find the best location while on the phone).    I love the full size stylus, it has a solid feel that is really lacking in every other PPC that I’ve messed with.  I don’t use the stylus much but it’s nice to know that when I do I’m not going to be worried about it falling out or breaking.  The button layout is optimized for one-handed use, and they did a great job with that (although not having a scroll wheel was a big mistake); using the device with two was awkward though.  Where I didn’t notice the small key size with one hand, it was cramped and uncomfortable to type a lengthy email using both thumbs.  The speaker location, recessed on the back of the device, was the only thing that I found unacceptable in the design.  When it’s not in my pocket, I usually place my phone on its back, the placement of the speaker coupled with the design of the back of the device made it impossible to hear the ringer from more than a few feet away.  I often heard it vibrating on whatever surface I’d put it on more loudly than it was ringing. 

    The best part of the Treo was all of the software enhancements made by Palm, they added a level of polish to the OS that really completes the experience; simple things like making the number pad active when it should be (in calculator, or when entering a zip code for e.g.) will make going back to the 8125 painful.  There were several excellent additions like:

    - Pressing the phone button from the today screen brought up the most recently used numbers

    - A dialing widget on the today screen obsoletes the dial-pad (although I couldn’t figure out how to speed-dial, and the dial-pad has less functionality than the HTC version, but you don’t miss it)

    - Holding the OK button brings up the Running Applications dialog

    Unfortunately, all of the enhancements also seemed to make the device less stable than the post-MSFP-8125.  I often had to do a soft-reset to get IE to render pages after using the device for a day or so.  There were other oddities like that, where it would just start behaving strangely and popping the reset button fixed it. 

    The device included a voice command utility in the ROM, and it was nice; but I had a hard time getting it to do what I wanted sometimes.  The biggest issue I had with it was that it didn’t report it’s state if it didn’t understand the command, the only cue that it wasn’t working was visual (i.e. nothing happened) which defeats the purpose.

    I don’t really care for the Treo’s form factor (240x240 screen with keypad on the front); in many applications the screen felt cramped and in some, important information was displayed off-screen.  It’s not really the device’s fault that the software doesn’t play nice with its screen, but one of the major reasons I like the PPC platform is all of the software that’s available to extend the experience; and the form factor in this case limits the value of the platform. 

    There were two things that killed the device for me.  The biggest one was the way it connected to the PC, through a proprietary connector.  Palm must have spent all their design money on the device, and left pocket change for the connector.  It had a flimsy feel and required an uncomfortable amount of force to remove, often taking two or three attempts to get it to connect with the PC.  As bad as it was, I would have been able to deal with it if the device could charge through the connection, but it required a separate AC power connection to do any serious charging (Palm claimed that the device will trickle charge over USB, although not fast enough to prevent a net loss while connected).  When coupled with my other killer, abysmal battery life, this “feature” makes the device difficult to get along with.

    On their website Palm claims 250 hours of standby time on the Treo, this number measured against the actual standby time is litigious.  With UTMS enabled, I was lucky to get 16 hours between charges (15-20% battery), and that was when I purposely did nothing with it; make a few phone calls, browse the internet, and 14 was more the norm.  The first day that I had it, I was using it a lot, it lasted 10.  The culprit was easy to identify; setting the radio to GSM only (disabling UTMS), of course this tarnishes some of the appeal of the device, but with UTMS disabled the battery life was really good for a PPC device.  I don’t have detailed  measures of how long I when between charges, mainly because I didn’t need to worry about it.  This was made easier by an application that someone wrote to automate the process of switching around the radio, but I can’t see anyone who isn’t aware of this shortcoming going through the trouble, and they shouldn’t have to. 

    I can’t decide if I like the device or not;  as a phone it’s the best I’ve used so far (ignoring battery life), but as a PPC device it falls short. 

  • Another rev of 1.2.0.4

    Just put another rev of 1.2.0.4 (the Vista version of DTb).  If you have an older version, you should get this one.

  • ConvertWithExplicitGraph

    The name is somewhat misleading, but there is a new action in 1.2.0.4 that allows "power" users to create custom conversion graphs with explicit connections.  In previous versions it was possible to use the ConvertWithGraph action to do something similar, but it only worked with filters that would consistently connect with Intelligent Connect.  The new action requires more effort, but pretty much any graph can be created now.

    Using ConvertWithExplicitGraph:

    1) Create a graph in GraphEdit, make sure it works by "playing" it.

    2) Save As Xml, this step can be skipped, but it's much easier if you have GraphEdit generate the xml for you.

    3) Remove the filesource and decrypt filters (the filters in the red box below), and save the file as a .grf file

    4) Open the grf file created in step 3, and note the filters that maintain their connections. 

    5) Open the xml file created in step 2 and remove the <FILTER> tags (in red), and the <connect> tags that define the connection b/w the filesource and decrypt filters (in blue).

    6) Order the connect tags in according to the order that the connections should be made (look at the original graph if you need help).  In the example below the decrypt connects to the video decoder, which connects to the video encoder, which connects to the multiplexer.  The same sequence is followed for the audio stream.

    <GRAPH version="1.0"> <connect direct="yes" src="Decrypt/Tag_0002" srcpin="Out" dest="ATI_MPEG_Video_Decoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Decoder" srcpin="Video Out" dest="ATI_MPEG_Video_Encoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Encoder" srcpin="Video Out" dest="ATI_MPEG_Multiplexer" destpin="Video In"/> <connect direct="yes" src="Decrypt/Tag" srcpin="Out" dest="ATI_MPEG_Audio_Decoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Decoder" srcpin="Out" dest="ATI_MPEG_Audio_Encoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Encoder" srcpin="Out" dest="ATI_MPEG_Multiplexer" destpin="Audio In"/> <connect direct="yes" src="ATI_MPEG_Multiplexer" srcpin="Output" dest="ATI_MPEG_File_Writer" destpin="Input"/> </GRAPH>

    7) Edit the connect tags that define the connection from the decrypt tags to communicate which stream it is connecting.  Use <audio> for audio and <video> for video.  The srcpin and src attributes can be removed if you like, they will be ignored; the important thing to leave are the dest and destpin.  The action will add the filesource and decrypt tags (if necessary), and connect the a/v streams using these tags as a guide.

    <GRAPH version="1.0"> <video direct="yes" dest="ATI_MPEG_Video_Decoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Decoder" srcpin="Video Out" dest="ATI_MPEG_Video_Encoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Encoder" srcpin="Video Out" dest="ATI_MPEG_Multiplexer" destpin="Video In"/> <audio direct="yes" dest="ATI_MPEG_Audio_Decoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Decoder" srcpin="Out" dest="ATI_MPEG_Audio_Encoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Encoder" srcpin="Out" dest="ATI_MPEG_Multiplexer" destpin="Audio In"/> <connect direct="yes" src="ATI_MPEG_Multiplexer" srcpin="Output" dest="ATI_MPEG_File_Writer" destpin="Input"/> </GRAPH>

    8) Remove any <connect> tags where the connection is maintained (step 4).

    <GRAPH version="1.0"> <video direct="yes" dest="ATI_MPEG_Video_Decoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Decoder" srcpin="Video Out" dest="ATI_MPEG_Video_Encoder" destpin="Video In"/> <connect direct="yes" src="ATI_MPEG_Video_Encoder" srcpin="Video Out" dest="ATI_MPEG_Multiplexer" destpin="Video In"/> <audio direct="yes" dest="ATI_MPEG_Audio_Decoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Decoder" srcpin="Out" dest="ATI_MPEG_Audio_Encoder" destpin="In"/> <connect direct="yes" src="ATI_MPEG_Audio_Encoder" srcpin="Out" dest="ATI_MPEG_Multiplexer" destpin="Audio In"/> </GRAPH>

    9) The xml can now be used as the ConnectionsXml parameter.

    10) Enjoy ;)

  • New Version of 1.2.0.4

    I just uploaded a new version of 1.2.0.4, should fix the issues with the commercial skipping.  If you've downloaded the previous version, you should uninstall it and get this one.

  • Media Center needs a Media Broker

    I have two media centers; a main one in the living room, and another one in the basement that I mostly use for development but occasionally I'll watch a show or a movie down there if the other one is in use.  Both have a single tuner, but I can't really take advantage of this to resolve recording conflicts because it's such a pain to manage each one individually.  When a conflict occurs, and I care, I have to go (either physically or through an RDP session) to the other PC and schedule the recording.  I started thinking about figuring out a way to automate a resolution, and it hit me what Media Center really needs is a centralized broker to manage EPG and recording requests, and could also act as a broker for other media as well (you can fake this somewhat today by "watching" network shares in WMP, but as far as I know you can't do this with pictures).

    I drew this picture in paint (I know it's ugly, but bear with me) to explain what I mean .  The red arrows represent the initial requests for media, all of these requests go through the broker who looks up the item and serves back a response which would include things like the descriptive metadata and a url (or something like a url) where the media is located so the client could consume the content directly by connecting to the source.  In this model the Broker would function as a middle man who facilitates the consumption of media.  I've drawn the Broker as a separate box, but that separation is only logical; there's no reason that the Broker software and database couldn't reside on the same hardware as one of the PC's.

    Hopefully I've explained the concept, but let me give a tangible example:

    A user requests that a show is recorded - all of the EPG data for all the tuners would reside (and it should be able to resolve multiple EPG, if for example you have one STB TV Tuner and one basic cable tuner) on the broker, it would consult the database to determine which tuner had availability for the time slot and send a message back to the requesting machine with all the information it needed to contact the PC that would record the show (some level of transactional support would have to be built in here).  The same process would be followed for Live TV requests as they are essentially the same thing.  The Broker could even have some intelligence built in to move recording requests from one PC to another if a request for a channel that was only available on the STB tuner was made, during a time slot already assigned to that PC.

    This would be a great Ultimate Extra.

  • Dtb 1.2.0.4

    For those with Early Access and Vista, there's a new version of Dtb available (source too). 

    Please note that I rebranched from the MCE version so much of how the previous version worked is no longer true.  Because of this if you've installed a previous Vista version, you must uninstall and delete HKLM\Software\DvrmsToolbox before installing this version.

    Version 1.2.0.2

    - Manifests added to executable files to work with UAC
    - Changed numbering convention to separate XP and Vista versions
    - Added LaunchCondition to installer to test for Vista
    - Fixed a bug in the CommercialSkipAddin, where MaxSkipLength doesn't do anything
    - Added a checkbox to the installer to register the addin
    - Added a LaunchCondition to ensure that the application only installs on Windows XP
    - Added MigrateMetaData action, action will migrated the metadata from a dvr-ms file to a wmv file, and optionally index the file
    - ConvertToWmv action will detect hung conversion and MigrateMetaData if progress is > 99%
    - ConvertToWmvIC action will detect hung conversion and MigrateMetaData if progress is > 99%
    - Added ChangeContextValue action, allows the manipulation of Context values using Find/Replace regular expressions
    - Fixed a bug in the settings tool that was not detecting Context settings properly
    - Removed dependency on external application to detect locked file information
    - Changed dvr2wmv.dll registration to detect if it is already registered (i.e. dvr2wmv is installed), and only install if it is not.
    - Process Prompt now has Yes and No buttons

    Version 1.2.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

    Version 1.2.0.4
    - changed Toub.MediaCenter.Dvrms.dll from 1.0.0.0 to 1.1.10.0
    - ConvertToWmvIC copies Closed Captions to WMV files for NTSC files
    - changed how dvr2wmv.dll is referenced, created an interop class that wraps the interface instead of using the generated interop dll
    - potentially fixed a bug where converting with dvr2wmv would hang on disposal
    - DVRMSToolbox.exe no longer tracks processed files
    - Added WMVIndex action, indexs wmv files
    - Added AdvancedActions to DTb, will not function without ffdshow and lame installed
    - Added ConvertWithDvr2Wmv which allows preferred decoders to be specified
    - Actions can now specify methods to call to build a list of allowed values
    - MigrateMetaData action uses WMVIndex action instead of implementing indexing functionality internally
    - FileIO action will discover and release file handles if unable to delete
    - DeleteFile action will discover and release file handles if unable to delete
    - DvrmsCutOutCommercials action will discover and release file handles if unable to delete file
    - Added ConvertToMp3 action to AdvancedActions, requires lame.
    - Added DumpContext action to AdvancedActions
    - CommercialXml, Output, FWLogs, and Temp paths have default values
    - CommercialSkipService (COM+ Service) added to handle job requests and detect file usage
    - SA Version 0.8.5 included

  • Fun with AVIVO [Mpeg/Divx/H.264 conversion]

    1) Download the Avivo Video Converter, it's labeled as an ATI only product but since we're only going to use the direct show filters and not the application it doesn't matter what video card you have.  If you don't have an ATI card (or just want to install the directshow filters) extract the setup files first, then go to C:\ATI\SUPPORT\7-1_xcode_40211\AVIVO and run the setup in that directory.

    2) Download this zip file, and extract it to the Dtb install directory. Profiles and grf files are included to convert to mpg, divx, and H.264 formats.

    3) Give it a try in the gui, use the "convert to mpg with avivo" profile for e.g.

    This has converted every file I've thrown at it (even HD files); let me know if your experience is different.  The great thing about these filters is that they all seem to work really well with Intelligent Connect so it's easy to create your own grf files (using GraphEdit) for formats like the PSP.

  • MEncoder with DVR-MS support

    For those who prefer divx/xvid, jelwood's posted some information on a new rev of MEncoder that has native dvr-ms support.  If you like divx/xvid give it a try and help in the effort to make it more stable.

  • Best Media Center Utility

    Ian announced the winners of the Media Center Show awards last Thursday, and Dtb won in the Best Media Center Utility category.  Thanks to everyone who voted (especially those who voted for Dtb ;)), and thanks to Ian.

    Hopefully I can keep up the pace for next year.

  • Starting over

    I've been thinking about changing the way that I implemented most of the changes required to get DTb working on Vista lately.  After coupling that with the progress that the MCE version of DTb underwent (and the Vista one did not because of bad branching decisions); I started over with the latest rev of the MCE bits.  For those who actually read the release notes, you will have to forget much of what changed in the Vista specific builds.

    Vista users should have a new rev within the next couple weeks.

  • .net 2.0 version of lcdwriter

    did a 2.0 port of lcdwriter for those who want don't want to install 1.1

    http://babgvant.com/files/folders/lcdwriter/entry1840.aspx

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