locked
Take snapshot from a url based video file RRS feed

  • Question

  • Hi,

    I've a few video files urls that my application plays, using the html video tag.

    I would like to shows tiles of those videos with an snapshot/thumbnail of it.
    I've been looking at the Windows.Media.Capture.MediaCapture class and it seems it doesn't support urls.

    Is there a built in way of doing this or do I need to build a custom control for it?.

    Thanks.
    Diego.

    Tuesday, July 24, 2012 6:15 PM

Answers

  • Hi,

    MediaCapture is used to access camera, not on screen/remote videos. Currently there’s no simple solution to take snapshots of videos from JavaScript directly. From my experience, there’re two options: First, you can create a custom WinRT component in C++, use Media Foundation to generate snapshots, and invoke the component in the JavaScript code. The advantage is everything can be done locally. The disadvantage is, it is not easy to write Media Foundation code, especially if you’re not familiar with C++/COM. Second, please do it on a cloud server using whatever technologies/tools you want. The advantage is you can find tools such as Expression Encoder that can help you to generate snapshots without any knowledge of C++. The disadvantage is, it is needed to use a remote server.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    • Marked as answer by Diego Ledesma Monday, July 30, 2012 8:56 PM
    Wednesday, July 25, 2012 11:50 AM
    Moderator

All replies

  • Hi,

    MediaCapture is used to access camera, not on screen/remote videos. Currently there’s no simple solution to take snapshots of videos from JavaScript directly. From my experience, there’re two options: First, you can create a custom WinRT component in C++, use Media Foundation to generate snapshots, and invoke the component in the JavaScript code. The advantage is everything can be done locally. The disadvantage is, it is not easy to write Media Foundation code, especially if you’re not familiar with C++/COM. Second, please do it on a cloud server using whatever technologies/tools you want. The advantage is you can find tools such as Expression Encoder that can help you to generate snapshots without any knowledge of C++. The disadvantage is, it is needed to use a remote server.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    • Marked as answer by Diego Ledesma Monday, July 30, 2012 8:56 PM
    Wednesday, July 25, 2012 11:50 AM
    Moderator
  • Hi Ming - can you point to any good c++ samples for said component?

    best, Ragnasaur

    Thursday, September 6, 2012 1:57 AM