Page 1 of 1

displaying one video in multible windows

Posted: 14 Feb 2017 15:08
by Mossi
Hello,

I need to display a video in two (or more) windows synchronized.
Currently (without using VLC) I'm using a simple directshow implementation with a PinTee Filter to add the secondary output. But how could this realized with VLC?
I already found some stuff with libvlc_video_set_callbacks to render the frames at any output needed, but this is not recommened in VLC documentation because of performance. So I did not try further this way.
Also I read from a clone module, but I have no idea, how this could be implemented by code and I found no samples for this system.

Can anyone help me, where to start/search for a solution.
I'm developing with Delphi 7 but I don't think, that this matters. But if someone has a code example... would be nice :-)

For explanation waht should be realized:
I'm developing a presentation software. On the primary screen, there is the control center for the presentation which contains images, interactive animations und also videos. The second screen should be shown to the students by a TV or beamer or something like this. While the students screen shows all stuff in full screen, on the command screen there is only a small preview window, so the teacher can see, what's currently shown at the beamer (which is most times behind him)

Re: displaying one video in multible windows

Posted: 15 Feb 2017 10:41
by Mossi
Hello,

I've found a solution by myself using the netsync feature.
I'm starting the slave first with arguments --control netsync --netsync-master-ip xxx.xxx.xxx.xxx
and the the master with arguments --control netsync --netsync-master

To synchronize play, stop pause etc. I call the methods for both instances.

This seems to work. But if someone has a better solution, please tell me.

best regards

Re: displaying one video in multible windows

Posted: 19 Feb 2017 20:33
by Jean-Baptiste Kempf
Did you try the clone filter?

Re: displaying one video in multible windows

Posted: 19 Feb 2017 22:14
by Mossi
I read about the clone filter, and think that this would be the best solution. But I have no idea how this could work. I tried with adding start arguments like used by command line, but then it opens additional windows. I need both "players" to be rendered on a window handle.
Is there anywhere a code sample? Programming language is irrelevant, I think.

Re: displaying one video in multible windows

Posted: 20 Feb 2017 09:45
by Jean-Baptiste Kempf
--video-filter clone ?

Re: displaying one video in multible windows

Posted: 20 Feb 2017 13:46
by Mossi
As I wrote, I tried already with filter in argument. But then it opens a new window on which the video is rendered. I need the cloned video to be rendered on a canvas (window handle) as it's done with the main video with the method libvlc_media_player_set_hwnd.
Is there any possiblity to add an additional HWND for the clone window?

Re: displaying one video in multible windows

Posted: 15 Mar 2017 01:08
by Jean-Baptiste Kempf
So far, no. You should need to do the HWND manipulation yourself, I'm afraid.