displaying one video in multible windows

This forum is about all development around libVLC.
Mossi
New Cone
New Cone
Posts: 4
Joined: 14 Feb 2017 13:37

displaying one video in multible windows

Postby Mossi » 14 Feb 2017 15:08

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)

Mossi
New Cone
New Cone
Posts: 4
Joined: 14 Feb 2017 13:37

Re: displaying one video in multible windows

Postby Mossi » 15 Feb 2017 10:41

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: displaying one video in multible windows

Postby Jean-Baptiste Kempf » 19 Feb 2017 20:33

Did you try the clone filter?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Mossi
New Cone
New Cone
Posts: 4
Joined: 14 Feb 2017 13:37

Re: displaying one video in multible windows

Postby Mossi » 19 Feb 2017 22:14

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: displaying one video in multible windows

Postby Jean-Baptiste Kempf » 20 Feb 2017 09:45

--video-filter clone ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Mossi
New Cone
New Cone
Posts: 4
Joined: 14 Feb 2017 13:37

Re: displaying one video in multible windows

Postby Mossi » 20 Feb 2017 13:46

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: displaying one video in multible windows

Postby Jean-Baptiste Kempf » 15 Mar 2017 01:08

So far, no. You should need to do the HWND manipulation yourself, I'm afraid.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests