Wouter
Wouter

Reputation: 2262

MediaElement Speedratio not linear

I have a MediaElement which I use to display movies. I would like to have precise control of the speed at which these movies are played. For this purpose I used the SpeedRatio property on MediaElement.

The problem I have is that it does not seem to be linear. At speedratio 2 it plays at almost 4x speed (ie 40 seconds play in 10 seconds) and speedratio 0.5 plays at almost 0.25x speed (ie 10 seconds play in 40 seconds). This is an approximation, can anyone clarify? The documentation does not explain.

Also when playing at a SpeedRatio other than 1x the movie seems to jitter. I have added a label that displays the position in the movie and it is very obvious that it does not run smooth. Are there other solutions to try?

I have experience with XNA and it might give better performance. However, for the sake of keeping the project simple I would like to keep the project entirely WPF based. The menu system is made with WPF.

Upvotes: 2

Views: 2019

Answers (1)

Abe Heidebrecht
Abe Heidebrecht

Reputation: 30498

According to this MSDN Thread, the SpeedRatio is highly dependent on the codec of the video. I would assume that the codec you're using doesn't support smooth fast forward or rewind.

Upvotes: 1

Related Questions