locked
How can I get the thumbnail from non-native support media file? RRS feed

  • Question

  • Hi,

    I have a private mkv spliter that can let me play mkv + H264 & AAC file in Metro style apps.

    But I can't using

    getThumbnailAsync

    to get the file's thumbnail?

    What should I do if I want to get the thumbnail?

    Thank you~~~

    

    Eric

    Monday, October 24, 2011 9:05 AM

Answers

  • Hi Eric,

    I talked to some developers about this.  You will not be able to do this from a Metro Style app.  For getThumbnail to work the file type in question needs an IThumbnailProvder implementation on the system.  So a Metro Style app can define a private codec for its app container but not the system wide IThumbnailProvider (due to security restrictions).

    -Jeff


    Jeff Sanders (MSFT)
    Tuesday, October 25, 2011 2:03 PM
    Moderator
  • Hi Eric,

    As Jeff mentions below, the getThumbnailAsync API will only work for files that have native support. If you would like your app to support thumbnails for more formats, you can write a WinRT component that uses the Source Reader to extract frames from the file. Your component would own the logic of what frame is selected as the thumbnail. Inbox property handlers use the Source Reader for thumbnails as well.

    Marc

    Tuesday, October 25, 2011 8:19 PM

All replies

  • Hi Eric,

    I talked to some developers about this.  You will not be able to do this from a Metro Style app.  For getThumbnail to work the file type in question needs an IThumbnailProvder implementation on the system.  So a Metro Style app can define a private codec for its app container but not the system wide IThumbnailProvider (due to security restrictions).

    -Jeff


    Jeff Sanders (MSFT)
    Tuesday, October 25, 2011 2:03 PM
    Moderator
  • Hi Eric,

    As Jeff mentions below, the getThumbnailAsync API will only work for files that have native support. If you would like your app to support thumbnails for more formats, you can write a WinRT component that uses the Source Reader to extract frames from the file. Your component would own the logic of what frame is selected as the thumbnail. Inbox property handlers use the Source Reader for thumbnails as well.

    Marc

    Tuesday, October 25, 2011 8:19 PM
  • Hi Jeff, Marc,

     

    I implement the source reader to get the thumbnail and can get thumbnail from native supported format already.

    But I still fail to get the thumbnail from non-native supported format. I am using our byte stream reader & video decoder.

    The file can play by video tag.

    The error I got from create source is unsupported format. Seems source reader need to read the system registry to find the decoder/byte stream reader's information.

    How can I do this? Should I register these component in my WinRT component again? (But I don't have manifest file to register it??)

    Thank you~~

    Eric

     

     


    Tuesday, November 15, 2011 5:03 AM
  • Hi,

    Finally I found media engine seems a solution for me, I played with non-native format successfully. I will try it to get the thumbnail.


    Wednesday, November 16, 2011 6:23 AM