Howto create a thumbnail from a wmv file ?

I would like to create a thumbnail (any image format) from a Window Media Video file (wmv). Explorer does it when miniatures view is used so maybe there's a API that does this

Thanks.



Answer this question

Howto create a thumbnail from a wmv file ?

  • Viral Thakkar

    Thanks !
  • fizbin

    Here i found a post on a newsgroup dump on our server. After this post the starter replies that everything was working after some days work.

    I hope it helps and sorry for the double... euh, tripple post! My browser won't let me edit my previous posts.

    DirectShow is what you want (part of DirectX, so you'd better get the =
    DirectX SDK).

    With DirectShow, you can play/pause more or less any file type =
    WindowsMediaPlayer supports in a few lines of code:

    http://msdn.microsoft.com/library/en-us/directshow/htm/howtoplayafile.asp=


    Of course you can embed the video window in your own window:

    http://msdn.microsoft.com/library/en-us/directshow/htm/ivideowindowinterf=
    ace.asp

    If you need to grab a snapshot and display that elsewhere, you can use =
    the MediaDet object instead of a playback graph:

    http://msdn.microsoft.com/library/en-us/directshow/htm/mediadetector.asp

    DirectShow is mostly meant to be used from C/C++ but you can find some =
    free .NET wrappers for it or write your own (not as easy as it sounds).

    For example, DirectShow provides an automation-compatible wrapper for =
    the basic playback functionality you need so that you can generate a =
    wrapper for it using tlbimp.exe against quartz.dll:

    http://msdn.microsoft.com/library/en-us/directshow/htm/usingdirectshowwit=
    hvisualbasic.asp

    There is an automation wrapper for the MediaDet object as well:

    http://msdn.microsoft.com/library/en-us/directshow/htm/mediadetobject.asp=


    Last, there is a very limited managed wrapper provided with the DirectX =
    SDK, which may be enough to just display the first frame:

    http://msdn.microsoft.com/library/en-us/directx9_m/directx/ref/microsoft.=
    directx.audiovideoplayback.asp



  • Shirashe

    And other frames


  • Chris Wilkinson

    There is a cheap ActiveX Control called MI Thumbnail that can handle WMV as they say. Check it here.


  • strombringer

    Use the AxMediaPlayer to open the wmv file and navigate to position 0, here is a little example. You can find a releted newsgroup post here.


  • Cantabrian

    After some test, as told in the newsgroup post, when using a avi file it works, but not with a wmv file. I try different position (axMediaPlayer1.CurrentPosition = 0) and the frame is always black.


  • Howto create a thumbnail from a wmv file ?