python libvlc question(s)

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
alisonken1
New Cone
New Cone
Posts: 1
Joined: 07 Jul 2019 03:02

python libvlc question(s)

Postby alisonken1 » 07 Jul 2019 03:34

Couldn't find a libvlc (specifically python3-libvlc) forum so thought I would post here to start.

I'm working with a python program that uses libvlc for the multimedia part. It has multiscreen support (primary screen + 1 external screen). At the moment, the program utilizes the default_instance of libvlc and will only show 1 video on external monitor.

What I'm trying to do:
1 - Add second external monitor for stage view
2 - Add option to show 2 videos at same time (one for live view, one for stage view)
3 - Add monitor widget in main program so what is sent to live/stage views is duplicated in monitor widget(s) in main program.

Specifically:
Any scenario:
- Preview option in program - video in preview widget in main program only

Scenario 1: Single video (total of 3 video outputs)
- Fullscreen on screen 1
- Fullscreen on screen 2
- Monitor widget in program

Scenario 2: 2 videos (total of 4 video outputs)
- Live view fullscreen on screen 1
- Live view monitor in widget in main program
- Live view is master for positioning and audio
- Stage view fullscreen on screen 2
- Stage view monitor in widget in main program

The 2-video option is mainly used for training videos (think choreography) - live view will show video of movements that audience will do - stage view is video of mirrored movements so stage instructors will be showing correct direction of movements based on audience moves.

Question:
1 - Should I use separate vlc.Instance() classes for each of preview, live view, stage view?

If I understand the clone filter, it would be able to handle multiple windows using hwind to specify widget(s) to send to, using separate player for each widget (fullscreen widget on external monitor, monitor widget in main program), but it sounds like I would want to have separate libvlc instances to handle the different videos with cloning.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: python libvlc question(s)

Postby unidan » 08 Jul 2019 17:01

Hi
Couldn't find a libvlc (specifically python3-libvlc) forum so thought I would post here to start.
Best place would have been the libvlc subforum.
Question:
1 - Should I use separate vlc.Instance() classes for each of preview, live view, stage view?
No, use the same. vlc.Instance is a holder of the internal, like plugin system. You can think of it like the "vlc" program. VLC can output to multiple screen but you don't need to open multiple VLC for doing this.
If I understand the clone filter, it would be able to handle multiple windows using hwind to specify widget(s) to send to, using separate player for each widget (fullscreen widget on external monitor, monitor widget in main program), but it sounds like I would want to have separate libvlc instances to handle the different videos with cloning.
This is not supported, but it would be a very valid use case. I'm working on this to provide this kind of flexibility in VLC core, but will try to find a way to add it for libVLC 4. There's probably a way to add a small patch for this though.

For the clone filter, it creates window (like all splitter modules) and their associated display, and then send the same picture to both display each time.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests