Playing video in reverse

Topics: Windows 8 Xaml
Aug 18, 2013 at 2:29 AM
Edited Aug 18, 2013 at 2:30 AM
I am trying to get smooth playback of a video in reverse. It would be most desired if I could have other rates (e.g. slow motion:.5 and double play:2) When I set the PlaybackRate to a negative number, it plays but is very choppy. Is it unreasonable to assume the same playback as forward rates?

mePlayer.PlaybackRate = -1;

Is this the correct way to achieve this?
Coordinator
Aug 22, 2013 at 1:11 AM
Negative as well as fractional playback rates (for slow motion) are supported. You can either rmanually set .PlaybackRate like you are doing or call .IncreasePlaybackRate(), .DecreasePlaybackRate(), or .IsSlowMotion = true/false. You can also enable the controls in the UI by setting. MediaPlayer.IsFastForwardVisible, .IsRewindVisible, & .IsSlowMotionVisible. Lastly, you can configure the default playback rates via: .SlowMotionPlaybackRate and .SupportedPlaybackRates

I do however see that negative playback rates appear very choppy with smooth streaming. I'll try to find out from the smooth streaming team if this is expected.
Aug 22, 2013 at 1:21 AM
timgreenfield wrote:
I do however see that negative playback rates appear very choppy with smooth streaming. I'll try to find out from the smooth streaming team if this is expected.
Thank you, I have tried the above recommendations - the video is extremely choppy and any advice would be appreciated.
Aug 26, 2013 at 6:43 PM
Hello,

We are noticing that negative playback is extremely choppy, even with progressive video loaded from local storage (non-streaming). Has there been any update on this?

Thanks,
Coordinator
Aug 30, 2013 at 10:32 PM
Yes, I see the same results. Unfortunately, this is not something that is controlled within the player framework but is rather handled by the Windows media pipeline. Therefore, I'd suggest either opening a support ticket with Microsoft and/or posting this on the MSDN forum to ensure you get help from the right team.

Just guessing but...
At worst: this is something that is simply not supported by Windows.
At best: there may be a different way to encode your video that would improve this.

Assuming you pursue this and if you're willing to report back, I'd love to know what you find out.

Regards, Tim
Sep 1, 2013 at 8:47 PM
Edited Sep 1, 2013 at 8:51 PM
Yeah it's impossible to do it natively (this appears to be an issue in Silverlight as well).

Anyways, we solved negative playback rates by setting the playback rate to 0, and using a Dispatcher timer to tick every 66 milliseconds. At each tick we would then change the position via Player.Position = Player.Position.Subtract(66 * rewindPlaybackRate);

This essentially simulates negative playback. I'ts smooth, all of the player controls (time remaining, time elapsed, etc..) all update correctly. The only thing that may be an issue is the play/pause builtin button (I can't confirm because we ended up getting rid of all built-in buttons and made our own due to unique requirement issues we had).
Coordinator
Sep 3, 2013 at 5:32 PM
Thanks for the update; glad to hear you found a workable solution. This sounds like a reasonable approach.