unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.18k stars 244 forks source link

Rewind feature #455

Closed Navanethapperumal closed 5 years ago

Navanethapperumal commented 5 years ago

Hi,

I want to implement the rewind features (i.e. reverse playback) using this project. Could you please help me on that.

Thanks, Navaneeth

mariodivece commented 5 years ago

Reverse playback is difficult because of how ffmpeg implements streams (an the very nature of media streams). You can use the seek functionality (Seek, StepForward and StepBackward methods) and increase the MediaOptions video block cache. See https://github.com/unosquare/ffmediaelement/blob/bf8623e1021cf3db09d260addc4af3696ffdd07e/Unosquare.FFME/Common/MediaOptions.cs#L123

That's as far as this is going to go. You could also write a custom IMediaInputStream that caches everything in RAM and could potentially produce smooth(er) reverse playblack.