andy vt's tools & blog

automating lazy

This Blog


andy vt's blog

December 2006 - Posts

  • Can a key be copyrighted?

    I got to thinking about the legality of an online database for title keys, my first thought was that the sites would get shut down pretty quickly, but the more I think about it the more I wonder if there's any legal issue with it.

    A key doesn't seem to be the kind of thing that could be copyrighted, it's generated by a computer after all.  It could even be a fact, like the score of a sporting event, which can't be copyrighted even if it's owned by an entity.

    The Grokster decision might come into play, but I'm not sure if it would apply.  While the keys would be used to decrypt copyrighted content, sharing the keys doesn't encourage the sharing of the content.  That would require another service and some action by whomever removed the encryption.

  • DECSS for AACS?

    I don't know what rock I was under when this came out.  But it would appear that someone has cooked up an end-run around AACS.  Now some would disagree about the usefulness of this utility, but as it appears to be title based it's just a matter of time before someone hosts an online database with the goods.

    Source code is promised sometime in January, should be interesting when that is public. Looks like the utility and source are public, but not terribly useful yet as the mechanism for actually getting the keys for the title has not been disclosed.

  • Motherboard problems

    A few weeks ago I outlined my MCE system and recommended the K9N Platinum.  I recently upgraded my DVD burner to a more modern device, and suddenly experienced a known issue (unknown to me at the time).  The workaround is simple, force the drive to connect at UDMA 3 or less, but the underlying issue is such that you'd want to RMA the board to get long term peace of mind.

  • Cingular 8525

    I have a Cigular 8125 (a HTC Wizard based PPC Phone) which I love, we got some of the 8525 (it's big brother) in at work and I got to try one out for a few days. 

    Overall the 8525 is a much more refined device than the 8125. It not only has a better feel in the hand, and with the scroll wheel and start/ok buttons located on the face and below the scroll wheel make for a much better one hand use experience; but it is also more visually attractive. The only gripe I have with the feel of the device is with the tactile feel of the keyboard compared to the 8125, the buttons feel more solid on the 8125 and the keyboard seems a bit larger. This is a very minor concern, and is more than made up for by the more intuitive layout of the number keys (like a phone pad); I noticed it initially but didn’t care after a few hours of use. The camera and camera application are much nicer, I didn’t take a very through look at it because I don’t use it that much, but I could tell it was a major refinement just by using it for a few minutes.

    I don’t know if this is anecdotal but the radio seems less “noisy”. I have to be conscious of where I place my 8125, when activated the radio in the device has a very negative effect on pretty much any electronic device it’s pointed at. Anything with a speaker within five feet of the 8125 plays a nasty buzzing sound when it syncs. The 8525 didn’t seem to do that as much. After noticing it, I did some very non-scientific research and was able to confirm that at least that device has a smaller impact on electronic devices in the immediate area.

    I have two complaints with the 8125, the processor is weak, and the internet connection speed is only adequate. Both of these concerns are addressed in the 8525. The device is noticeably more responsive both while using the device and while doing something more processor intensive, like watching a wmv file. The internet speed is excellent both as a tethered (connecting to a PC) and as a standalone device. Getting tethering to work however, was a challenge. I couldn’t get Bluetooth to work at all (although I found some guidance on the web); I was eventually able to get USB tethering to work by disabling Direct Push manually from the Comm Manager (found this suggestion the same place that BT tethering was discussed). Even if it had worked by following the instructions on Cingular’s website, the process is too complex. I don’t understand why the device can’t take emulate a USB/BT/IR NIC and just work without messing around with configuring modems and dial-up connections.

    That being said, battery life is unacceptable. Under moderate use of phone and data the device was dead after 12 hours. Light use got it to 16, still not great but livable. Anyone who traveled with the device would need to carry an extra battery or be highly conscious of this limitation. It does charge quickly when plugged in to the wall, and while connected via USB (though not as quickly); so this issue is somewhat mitigated. Personally, I think I could live with it to get the advancements.

    The USB head phones are nice, but I don’t like that they use a proprietary connector. Overtime these things will get lost or break, having a standard connector makes replacing them easier and cheaper. On the 8125 holding the Comm Manager button switches the device into and out of vibrate only mode, I couldn’t get that to work on the 8525. Not a huge deal, but with all the refinements in one handed use, this is a major step backwards.

    I also had a lot of UTMS drop back to GPRS in my house. If I had to guess I’d say that it’s more my house than the device, as I have had issues with cell coverage before, but I thought it was worth noting. I didn’t have any issues with it outside, or in most buildings.

  • EA12152006 Available

    For those with Early Access, EA12152006 is available for download. 

    In addition to the changes for EA12032006:

    - changed Toub.MediaCenter.Dvrms.dll from to
    - 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

    The following changes have been made:

    - 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

  • Why do UI guys get all the love?

    Much of the development platform in WMC seems, at least to me, to be geared towards enabling developers to build cool/pretty, but functionally limited, applications.  I haven't looked at the RTM WMC SDK, but the RC2 version didn't document any enhancements enabling developers who want to add functionality to the WMC experience (v. adding new experiences to WMC).  I'd love to be wrong here, and if I am, somebody please let me know.

    I'd love for WMC to be a platform in the same way that IIS (Internet Information Service) is a platform, MS does an excellent job of providing the plumbing that enables developers to do amazingly cool things both with their UI, but they also enable developers to interact at the lowest levels, encouraging them to extend the plumbing if they want to.  It's an amazingly powerful tool; and IMO one of the reasons it had done so well with the development community.  Imagine how great WMC would be if MS enabled the same kind of platformization.  It would be empowering for the UI guys and those who want to mess with the guts.

  • EA12032006 Available

    For those with Early Access, EA12032006 is available for download. 

    - changed Toub.MediaCenter.Dvrms.dll from to
    - 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

  • Barenaked Ladies get DRM

    I was listening to Scott Simon interview BNL this morning on NPR, when I heard them talking about releasing their latest album on a USB stick.  Intrigued, I started listening closer when one of the "ladies" said (this is a rough quote, take a listen for yourself to get the exact wording it's about 5 minutes into the interview)

    Part of the revolutionary part of this stick is there is no copy protections. Our industry is so fixated on protecting and controlling their intellectual properties and making sure that people listen to them or use them the way the industry sees fit. We trust our fans to listen to it, spread the word, and you know come to the shows... And that's because that's what we want, if we buy a collection of songs from an artist that we admire, I want to be able to put it on my Ipod, put it on a mix tape, put it in my car, make a mix tape for a friend, pass it on to them, hoping that it will turn them on to go buy the music I like.

    First, it's sad that it's considered revolutionary when an artist releases copyrighted content with out DRM.  Second, it's refreshing to hear someone say on national radio that DRM is about controlling content, not strictly about protecting it, then to go on to say that trusting your fans, giving them the ability to place/device shift your content and share it with their friends is a viable business strategy.  Hopefully I wasn't the only one listening this morning, and someone was convinced to stop seeing DRM as a necessary evil.

    For those who are interested, the album can be purchased directly from the BNL website in mp3 or flac formats.

  • Programmatically Indexing WMV files

    Every once in a while DVR2WMV doesn't index a wmv when it is converted, so it's not possible to move around in the file (fast forward, reverse, etc).  Microsoft includes a GUI tool on the Windows Media Encoder that I was using, but it's not an automated solution, so I took a couple hours to see if it was possible to do it programmatically.

    This functionality was incorporated in the MigrateMetadata action in DVRMSToolbox  I've also written a simple command line utilty, wmvindex.exe, that will just index the file.

    For those who are interested in how it works...

    The heavy lifting in indexing the file is done by the object implementing IWMIndexer that is returned by calling WMCreateIndexer.  The pinvoke declaration look like this -

    [DllImport("WMVCore.dll", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)] private static extern IWMIndexer WMCreateIndexer();

    [ComImport] [Guid("6d7cdc71-9888-11d3-8edc-00c04f6109cf")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal interface IWMIndexer { void StartIndexing([In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL, [In] IWMStatusCallback pCallback, [In] IntPtr pvContext); void Cancel(); }

    To use IWMIndexer call StartIndexing, which takes three arguments; the path to the file to index, a class that implements IWMStatusCallback, and null pointer.  The OnStatus method of the IWMStatusCallback is called periodically to update progress.  The definitions for IWMStatusCallback and the enums it needs are defined below.

    [ComImport] [Guid("6d7cdc70-9888-11d3-8edc-00c04f6109cf")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal interface IWMStatusCallback { void OnStatus([In] WMT_STATUS Status, [In] int hr, [In] WMT_ATTR_DATATYPE dwType, [In, MarshalAs(UnmanagedType.LPArray)] byte[] pValue, [In] IntPtr pvContext); }

    StartIndexing is an ansynchronous method so it's necessary to pause code execution while the file is indexed using a ManualResetEvent.  I chose to implement it as part of the class that implements IWMStatusCallback.

    public class StatusCallback : MarshalByRefObject, IWMStatusCallback { ManualResetEvent _mr; public StatusCallback(ManualResetEvent mr) { _mr = mr; } public void OnStatus(WMT_STATUS Status, int hr, WMT_ATTR_DATATYPE dwType, byte[] pValue, IntPtr pvContext) { int progress = 0; if (pValue.Length > 0) progress = pValue[0]; if (progress == 100) { Console.WriteLine("Done Indexing"); } switch (Status) { case WMT_STATUS.WMT_ERROR: Console.WriteLine("Error Indexing File"); _mr.Set(); break; case WMT_STATUS.WMT_STOPPED: _mr.Set(); break; } } }

    I'm only interested in the completion status codes so nothing important happens in the OnStatus method it only looks at the Status variable to see if we're done or an error has occured.

    Below is some sample code to idex the file.

    ManualResetEvent mr = new ManualResetEvent(false); IWMIndexer wi = WMCreateIndexer(); StatusCallback sc = new StatusCallback(mr); IntPtr pv = IntPtr.Zero; wi.StartIndexing(targetFile, (IWMStatusCallback)sc, pv); mr.WaitOne(); if (mr != null) mr.Close(); if (wi != null) Marshal.ReleaseComObject(wi);

    The full source code for the utility can be downloaded here.

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