none
局域网同步播放视频该怎么做? RRS feed

  • 问题

  • 如果想做两个播放器同步视频画面该怎么做啊?

    能否提供个思路,局域网内两台配置相差不大(或完全一致)的电脑

    wpf用MediaElement,播放视频没问题,但时间轴跳转或者循环多次后误差会越来越大。

    不奢求代码,只希望大家能给指条明路。

    原因:每台电脑能接的显示设备个数有限,在播放尺寸超长视频时一台电脑不够用啊,只能是把视频切分为几块区域,几台电脑同步播放。
    • 已编辑 xx232 2015年1月7日 8:59 问题补充说明
    2015年1月7日 8:53

全部回复

  • @xx232,

    这边有相关的一篇英文文章,你可以参考一下:

    http://stackoverflow.com/questions/914958/is-it-possible-to-synchronize-videos-across-multiple-computers-using-wpf

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

    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.

    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.

    设置一台电脑为服务器,其他的作为客户端,然后客户端连接服务器获取当前的位置并做比较。这里的作者是用的DirectShow,它的代码在这里:http://wpfmediakit.codeplex.com/



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年1月8日 10:19
    版主