[UWP]how to snapshot a frame from a video of mediaelement RRS feed

  • Question

  • The Idea is pause a video and capture a snapshop of the current frame

    unfortunately the rendertargetbitmap doesnt work with the video content of the media element

    what work arounds, strategies to solve this problem? this is for windows 10

    Saturday, October 31, 2015 5:19 AM

All replies

  • The basic Idea is this. I am writing a text in top of a paused video and I want to take a snapshot of it but the RenderTargetBitmap api doesnt work with video content and only renders the text with black backround. and the Screencapture api only works with the mobile device family and only renders the video and not the text.

    Are there any other way to do this using pure c#? It is very simple. Draw a text on top of a paused media element and take a screenshot of it and save it to a file, why is it so hard to do this?

    Saturday, October 31, 2015 5:41 PM
  • What type of app are you writing? That will change the answer. Please title your post
    Saturday, October 31, 2015 11:18 PM
  • Hi LazyCodingGuy,

    Yes, RenderTargetBitmap cannot take snapshot of the current frame, which is wrote in the RenderTargetBitmap class

    Video content in a MediaElement or CaptureElement can't be captured using RenderTargetBitmap. That includes capturing frames from within video content.

    To capture the video content, you need to write a Media Foundation Transform(bacially C++), I don't think there is any existing C# API that can do such things.

    If you need some sample, try this:, even its a Windows 8 sample, but it should also work under UWP.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 11, 2015 3:12 AM