MediaElement 速度比非线性

发布于 2024-11-28 15:08:43 字数 428 浏览 0 评论 0原文

我有一个用于显示电影的 MediaElement。我想精确控制这些电影的播放速度。为此,我使用了 MediaElement 上的 SpeedRatio 属性。

我遇到的问题是它似乎不是线性的。在速度比 2 下,它以几乎 4 倍的速度播放(即 10 秒内播放 40 秒),而速度比 0.5 则以几乎 0.25 倍的速度播放(即 40 秒内播放 10 秒)。这是一个近似值,有人可以澄清吗?文档没有解释。

此外,当以 1x 以外的 SpeedRatio 播放时,电影似乎会抖动。我添加了一个显示电影中位置的标签,很明显它运行不流畅。还有其他解决方案可以尝试吗?

我有使用 XNA 的经验,它可能会提供更好的性能。但是,为了使项目保持简单,我希望该项目完全基于 WPF。菜单系统是用WPF制作的。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南风起 2024-12-05 15:08:43

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文