We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
可否像b站视频一样,当拖拽进度条到某一秒时,使用小窗显示这一秒的画面
The text was updated successfully, but these errors were encountered:
media-kit 支持不了这种实现
Sorry, something went wrong.
可否多设置一个player,不用于显示动画,就只用于预览
await player.seek(Duration(seconds: targetSecond)); await player.pause();
然后截取画面呢
这样开销太高了,没有什么必要
而且 media-kit 每次 seek 都挺耗时的,大概需要 100ms ,使用 fastseek 会稍微好一点
我也尝试了了一下解决这个问题,但没有成功,在这里为后来者提供一些说明。
libmpv (media-kit 的底层) 原生不支持这种应用场景 (thumbnail),如果要在 libmpv 的基础上解决这一问题只能依靠批量 seek 并创建截图。
这一行为的效率非常低,我们需要从像素缓冲区读取数据并生成图片,实时生成会导致无法接受的卡顿,批量生成会导致过长的加载时间。
我们应该需要通过 ffmpeg 解决这一问题,ffmpeg可以以指定分辨率输出关键帧,高效地创建缩略图。
libmpv 内部有静态链接的 ffmpeg ,也许我们需要更改 libmpv 的编译过程,动态链接 ffmpeg 而不是静态链接,而后通过 dart ffi 调用 ffmpeg
No branches or pull requests
issue 内容
可否像b站视频一样,当拖拽进度条到某一秒时,使用小窗显示这一秒的画面
提交前确认
The text was updated successfully, but these errors were encountered: