是否可以使用 WPF 在多台计算机上同步视频? [英] Is it possible to synchronize videos across multiple computers using WPF?

查看:49
本文介绍了是否可以使用 WPF 在多台计算机上同步视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在两台或多台计算机上同步 WPF 应用程序中运行的视频?使用 ParallelTimeline 类和 MediaTimelines 为每个视频实例同步在同一台机器上运行的多个视频似乎效果很好,但我还没有想出一种在不同计算机上执行此操作的方法,如果可能的话,这将启用一些令人难以置信的多屏幕装置.

Is it possible to synchronize videos running in a WPF application across two or more computers? Synchronizing several videos running on the same machine seems to work well using the ParallelTimeline class and MediaTimelines for each video instance, but I haven’t figure out a way to do this across different computers, which if possible, would enable some incredible multi-screen installations.

那么对于所有 WPF 专家,您怎么看?这可以与 WPF 一起使用还是我需要退回到 DirectShow?一些关于如何执行此操作的指示也很好.

So to all those WPF gurus out there, what do you think? Could this work with WPF or do I need to fall back to DirectShow? Some pointers about how to do this, would also be nice.

我的问题似乎有些混乱,所以让我澄清一下.我正在考虑构建一个大型多屏幕视频装置的可能性,比如 8 个或更多屏幕.每个屏幕播放全高清(至少 720p)视频,构建统一显示,在这种情况下是分辨率为 10,240 x 5,760 的视频墙.当然,所有视频都必须同步.从一台电脑上播放所有 8 个高清视频(即使电脑有能力)意味着对硬件、硬盘、内存、显卡等的性能压力很大. 另一方面,如果你能够让 8 台电脑上瘾与 TCP 一起,每个都负责使用与主计算机同步的时钟播放他们的视频,你可以构建一些非常酷的东西,具有很大的灵活性.我见过使用 Max/Jitter 完成的类似安装.但是我不喜欢 Max/Jitter 范式,我更喜欢 WPF,并且在犹豫是否可以构建这样的东西.

There seems to be some confusion regarding my question so let my clarify . I am thinking about the possibility of building a large multi-screen video installation, let’s say 8 or more screens. Each screen plays a full HD (at least 720p) Video building a unified display, in this case a video wall with a resolution of 10,240 x 5,760. All the videos have to be synchronized of course. Playing all 8 HD videos from a single computer (even if the computer was capable) implies a lot of performance stress on the hardware, hard disks, memory, graphic cards etc. On the other hand, if you were able to get 8 computers hooked together with TCP, each responsible from playing their video with a clock synchronized to a master computer, you could build some really cool stuff with a lot of flexibility. I have seen similar installations done with Max/Jitter. But I don’t like the Max/Jitter paradigm, I like WPF better and was wandering if it would be possible to build something like this.

[/编辑]

非常感谢,

胡里奥

推荐答案

你可以尝试使用我的项目,WPF Mediakit.如果需要访问低级 DirectShow 内容,它应该会让您领先一步.

You can try using my project, WPF Mediakit. It should set you way ahead if need access to the low level DirectShow stuff.

要做到这一点,本质上您需要将一台计算机指定为服务器",而将其余计算机指定为客户端".客户端将连接到服务器以获取当前位置,将其与当前位置进行比较..如果存在 n 个差异,则寻求调整.

To do this, essentially you would designate one computer as the "server" and the rest as "clients". The clients would connect to the server to get the current position, compare it to their current position..and if there is n-amount of disparity, seek to adjust.

在 MediaKit 中开箱即用,MediaUriElement 控件有一个名为PreferedPositionFormat"的属性.如果您将其设置为 Frames(并且您使用的编解码器支持它......大多数时候它们不支持并且只支持 MediaTime),您可以设置Position"属性的帧粒度.即使是 MediaTime 格式也可能足够了.

Out of the box in MediaKit, the MediaUriElement control has a property called "PreferedPositionFormat". If you set that to Frames (and the codecs you are using supports it..most of the time they dont and just support MediaTime), you can have frame granularity of where to set the "Position" property. Even the MediaTime format may be enough.

这篇关于是否可以使用 WPF 在多台计算机上同步视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆