.netvb.netvideodirectxaudiovideoplayback

Microsoft.DirectX.AudioVideoPlayback play the same video on 2 panels


I'm using Microsoft.DirectX.AudioVideoPlayback to successfully play a video in a panel which will be shown on a form to an external monitor / TV.

We wish to be able to see the same video on the computer screen at the same time on another form but wanted to avoid loading the same video twice and possibly having them out off sync.

Is it possible to have the video play to one panel and somehow duplicate the view in another panel without loading the video file twice? Something like panel2.content = panel1.content

This is what is setting the video to panel1

video.Owner = Panel1

Solution

  • Microsoft.DirectX.AudioVideoPlayback is a wrapper around DirectShow API. I don't think it offers teeing video feed to output it to two monitors (panels), and it also does not offer synchronization between two played files either. However, DirectShow allows both and you can use it with VB.NET through DirectShow.NET library. Use of Infinite Tee Filter there allows duplication of video feed and it is possible to render copies of the original feed to different UI elements (panels, or borderless forms imitating full screen output etc.).