Search code examples
c#mediaelementframe-rate

Can I set the frames per second of a MediaElement in C#?


I have a media element that normally plays videos fine, but some videos with high framerates(120) play at the wrong speed. I assume it is something to do with the video not having the right information in the header, and am looking into setting it manually.

Is there a good way to set the Frames Per Second of a MediaElement?


Solution

  • Because there are no methods or variables in the Media Element to get or set the frame rate, the only viable solution I found was to have a text area that set a frame rate multiplier. This multiplier can then be applied to the SpeedRatio of the Media Element, as well as anywhere else where events dependent on the video time are determined.