同步播放两个或多个视频
如何在不同窗口中以帧级同步方式播放两个或多个视频文件/流?
我可以使用哪些工具、库或 API 来做到这一点?
通过帧级同步,我的意思是我的解决方案必须保证每个视频文件的每一帧必须在显示其相应帧(来自其他文件)的同时显示。
例如:
in sync out of sync
Time -+-+-+-+-+-+ ... +-+-+-+-+-+-+
video 1 fr1 fr2 fr3 fr1 fr2 fr3
video 2 fr1 fr2 fr3 ... fr2 fr3 fr4
video N fr1 fr2 fr3 fr1 fr2 fr3
How can I play two or more video files/streams in different windows with frame-level synchronism?
What tools, libraries or APIs could I use to do that?
By frame-level synchronism I mean that my solution must guarantee that each frame of each video file must be shown at the same time its corresponding frames (from the other files) are shown.
Eg:
in sync out of sync
Time -+-+-+-+-+-+ ... +-+-+-+-+-+-+
video 1 fr1 fr2 fr3 fr1 fr2 fr3
video 2 fr1 fr2 fr3 ... fr2 fr3 fr4
video N fr1 fr2 fr3 fr1 fr2 fr3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Windows 上,应该可以创建自定义 directshow 过滤器/组件来执行此操作。
我们使用 c# 和 directshow.net 来实现类似的功能,但是我们还没有“真正的”帧同步,事实上我也在寻找解决方案。
这里需要注意的是,您不能只使用默认/提供的 directshow 过滤器,我担心人们必须编写一些新的过滤器,或者可能稍微修改一下基类。
On windows it should be possible to create custom directshow filters/components to do this.
We use c# and directshow.net to achieve something similar, however we do not yet have "true" frame synchronization and I am in fact searching for a solution as well.
The caveat here is that you can not just use the default/provided directshow filters, I fear one would have to write some new filters or perhaps modify the base classes a bit.
在 OS X 上,Core Video 框架即可工作。 Core Video 的明确目的是在 QuickTime 媒体(例如音频和视频)和 Quartz 合成系统之间提供帧级同步的链接。
On OS X, the Core Video framework will do the job. Core Video's express purpose is to provide a link between QuickTime media (such as audio and video) and the Quartz compositing system with frame-level synchronization.
您能否详细解释一下“帧级同步”的含义?
当多个视频正在播放并且您旋转桌面时,compiz 会执行此操作
opengl 可以在立方体的侧面同时渲染多个视频等
Could you expand a little on what you mean by "frame-level synchronism"?
compiz does this when multiple videos are playing and you spin the desktop
opengl can render multiple videos simultaneously on the sides of a cube, etc