python libvlc question(s)
Posted: 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.
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.