Time Travel with Media Center


One of the features I’ve wanted for a while now in Media Center is the ability to easily jump around within media.  I have a bunch of family home videos on my machine, and it can be frustrating to navigate to particular moments that I want to show to family and friends.  To compensate for this, I wrote a plug-in, PositionChangerAddIn, that allows me to use the remote control for Media Center to navigate to different positions within the currently playing media (recorded TV, video, audio, etc.), using the number buttons on the remote control to enter time codes that Media Center then jumps to, as well as using the arrow keys to set and jump to bookmarks in the media.  Some folks asked me how I implemented it and if I could share the add-in with them, so I decided to write an MSDN article about it.  The article went live today at http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnxpmce/html/positionchangeraddin.asp (new article at http://msdn2.microsoft.com/en-us/library/bb643809.aspx). In addition to learning all about how the add-in was implemented (and how add-ins are implemented in general for Media Center), from that page you can download both the source code for the add-in and a complete installer to get up and running with it.  Directions for using the add-in are included in the article.


Hope you like it.  If you do, please let me know by giving the article a good rating… if it does well enough, I might be inclined to write some more about MCE development 😉


Enjoy,
Steve


ps Note that the add-in is only for use with Media Center 2005.  It will not work with previous versions, and it might not work with future versions, at least not without some modifications here and there.

Comments (25)

  1. andyBlog says:

    Media Centre add in

  2. John says:

    Great article. I was just wondering if the method you used to expose the graph MCE uses for playback could be used the edit the graph to allow the ffdshow filter to be added to the graph?

  3. Stephen Toub says:

    Theoretically, yes. Should you, well, probably not 😉

    It’s one thing to look at the graph, but changing it might put it into a state that MCE doesn’t expect, which could very well cause ehshell to crash.

    That said, try it out and see what happens. My only warning would be that anything you do here would obviously be unsupported.

  4. vern says:

    Is there a place to download the actual add-in, without going through compiling the source?

  5. toub says:

    An installer is included along with the source in the download for the article. Just run that installer… if you don’t want to tweak the source at all, you don’t need to compile anything.

  6. vern says:

    Thanks!

    P.S. Do you know if there is a quick way to add or move a shortcut for an app to the main menu in MCE?

    I previously used MCE Workshop or MCE Customizer (can’t remember), but don’t want to install other software for one purpose.

    THANKS AGAIN!

  7. Yves Bélanger says:

    It seams that the french version of MCE 2005 is

    not supported… 🙁

    When I try to install it says something like

    "Can be installed only on MCE 2005 or newer".

    That’s what I have…

  8. toub says:

    The actual add-in should work fine with any localized version of MCE 2005… the problem you’re having seems to be with the installer. The installer uses the RegisterAddIn.dll from the MCE SDK, and the code in that DLL is what’s checking to make sure that the version of MCE is 2005. Either there’s something screwy with your system or there’s something wrong with that DLL. The good news is that you should be able to install the add-in manually without using the installer. You’ll need to copy the add-in DLL (PositionChangerAddIn.dll) to a folder on your computer, along with PositionChangerAddInReg.xml file. Use gacutil to install the DLL into the GAC, and then use the MCE RegisterMCEApp.exe tool with the XML file to let MCE know about the add-in. I’d suggest reading the MCE SDK for more information about manually installing add-ins.

    Good luck,

    Steve

  9. Michael says:

    Thanks for a very good article!

    What if I would like to trap a remote button wherever the user is in the MCE?

    The KeyboardHook as well as the Intercept Window implementation won’t trap pressed remote buttons when the user is within a launched HTML application.

    Is it possible to trap remote buttons for this situation aswell (from the same background add-in)? If no, could I do it in another way?

  10. Reinhard Brongers says:

    Really great article (and the ‘fun with DVR-MS’ article as well)! And maybe you also know the answer to a burning question: Why is the playrate property not working as advertised in the SDK (and in your article)? I cannot get MCE to pause and continue through my background plugin, and I am not the only one (http://www.ureader.com/message/1437901.aspx) … I know you’re not the helpdesk or anything, but since you are MS related, and you are clearly knowledgable about the subject, maybe you or someone in your network have the answer?

    Thanks a lot and keep up the good work!

    Regards,

    Reinhard

  11. Oliver says:

    I am using your program as a template to develop my add-in which will communicate with my custom USB control. My question is how to navigate the mce menu through WM_KEYDOWN/UP window messages with VK_UP key code embedded.

    These key messages were delievered to the MCE window ( checked via spy program ) but has no impact at all. Could you give me any help?

  12. Ken P says:

    Your time travel add-in is a great idea! It works great, with one problem (I have MCE 2005 with rollup 2, in case it matters)

    When watching a recorded show, I often need to change the Zoom, which is done by hitting Info on the remote, which brings up the menu, then down clicking to the Zoom choice. The add-in intercepts the down click and thinks it is a bookmark click. Any thoughts on how that could be fixed?

  13. Ken P says:

    SORRY!!! With further reading, I realized that I can disable the bookmarking. I may even try to configure another button for the bookmarking feature if I get ambitious!! Thanks

  14. It’s a common problem that MCE doesn’t reflect the meta data of the currently playing show in the API. …

  15. Brad says:

    Stephen, any chance you will be updating this for Vista MCE?  Thanks.

  16. toub says:

    Hi Brad,

    Yes, I do plan to, or to at least investigate what will be necessary to upgrade it appropriately.  Hopefully by the new year.

    -Stephen

  17. Stephen Toub says:

    Back in early 2005, I wrote an article for MSDN on implementing add-ins for Windows XP Media Center Edition

  18. Matt says:

    I have installed the rollup2 version of this addin and I love the idea, I really do. I so need this functionality as I’m coming from a ReplayTV network to the MCE world and not being able to jump through shows more reliably is a serious problem

    That being said, I have installed this add-in on the media center pc. When I connect with my extender (this case is the 360) I can see mention of the add-in in the "manage more programs" area of settings. That sounds good. Seems like it installed and is available to my extender. Great.

    I then go play a "video" (mpg). While it’s playing I press the right arrow key (nothing pops up) and then 500 and wait. Nothing happens. Okay, right arrow/500/left arrow… nothing.

    I’ve never seen the plugin work, so I’m not certain of what interface I should be experiencing, but totally nothing seems to be happening. What am I missing?

    I can’t test is on the PC as I remote desktop to manage that server and I can’t play videos over RD.

    Any help would be greatly appreciated.!

  19. Zeev says:

    Seems like the .msi installer has disappeared, only the source code is in the zip. Where can I get the msi for Visa??

  20. Sash says:

    I am trying to figure that out as well. Earlier I managed to get the contents of the zip file but did not know how to initiate the function. I am using a non microsoft remote. Imon remote from http://www.soundgraph.com is what I use. the imon remote has two fast forward controls.

    http://www.soundgraph.com/Eng_/Products/imon21.aspx?topMenu=2&subMenu=1&leftMenu=21

    The RR FF on one top does nothing with avi files

    The bottom one skip the microsoft default 29sec and rw 7 secs which I would like to keep. the buttons on top is what I would like to assign the function for your addin. So if I need to jump within a file to a certain location use top RR FF buttons. If I need quick skips use the bottom RR FF buttons.

    thanks

  21. Gis says:

    Sorry, but the code nor the installer are to be found somewhere. Such a basic function in MCE is really a big need and there’s not even a decent installer.

    I’m loosing my time here around to find just where it is !

    Really, do I have to write  the code with copy and paste from the article ???

    A "gone out of patience" mce user

  22. mirage hotel says:

    alanya merkezin de en uygun tatil için bizi arayınız size yarımcı olalım acenta ve ferdi olarak ta hava alanından servisimiz vardır

  23. cherry says:

    British reporters are known for doing almost anything to get a Mulberry Bags. But reports that a newspaper secretly listened to telephone messages of murdered schoolgirls and other private citizens have produced Mulberry Handbags and anger.

    On Friday, British police arrested Andy Coulson, former editor of Mulberry Bag Britain's best-selling newspaper, News of Mulberry Outlet the World. The investigation led him to Mulberry UK Sale resign in January as communications director to Prime Minister David Cameron.

    The arrest came in a widening investigation of Mulberry UK telephone hacking. Other accusations include paying police for mulberry shoulder bags information on stories. The Reuters news agency reported that Mr. Coulson was released on Mulberry Bag UK until a date in October.

    Prime Minister Cameron promised Men's Mulberry Bags Friday that a judge will lead a full public inquiry into Women's Mulberry Bags the case after police complete their investigation.

    DAVID CAMERON: "Murder victims, terrorist victims, families who have lost loved ones, sometimes defending our country, that these people could have had their phones hacked into, in order to generate stories for Mulberry Bags  Mulberry Handbags  Mulberry Bag   Mulberry Outlet  Mulberry UK  mulberry bayswater bag  Mulberry Alexa Bag, is simply disgusting."