unosquare / ffmediaelement

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

Video stuck with SEEK TP warnings #557

Closed pieriv closed 3 years ago

pieriv commented 3 years ago

Video stuck with SEEK TP warnings

We have an application that plays some .m4v videos of 7 seconds in looping mode (LoadedBehavior="Play" and LoopingBehavior="Play"). Most of the times the videos are played without any issues, but sometimes the played video freezes during its first second and the following warning is output several times (see log in attachment).

SEEK TP: Target Pos      0.000 not between 0.040 and 0.320

We never call the seek() function explicitly, only

mediaElement.Stop();
mediaElement.Close();
mediaElement.ChangeMedia();
mediaElement.Open(uri);
mediaElement.Play();

I tried to reproduce the issue playing our videos within the Reference Player, but without success.

Any idea what could be the problem here? Or any suggestion for a workaround that could avoid the freeze?

Issue Categories

Version Information

Attachment

FrozenVideoWithSeekWarnings.txt

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mariodivece commented 3 years ago

yes... all those operations are asynchronous. Use the await mediaElement.Stop();, mediaElement.Close();, etc. Hope it helps!