Page 1 of 1

Overlaying my own graphics on the SDL window when VLC is playing

Posted: 13 Feb 2019 00:30
by Domarius
I want to display text, and a semitransparent menu etc. over the video while the video plays. What is the easiest way to do this? I'm currently using Python and PySDL2 (SDL2 wrapper), and the vlc.py wrapper.

I'm vaguely aware this may involve locking the surface to make it thread safe, but if it would make things easier, I'm willing to compromise and cut the video so only the audio plays while I draw my own graphics.

I'm also willing to switch to C++ if it would mean I'd have an easier time sticking to the more well-trodden path than dealing with these wrappers.

I'm just developing this fake TV software for the Rasperry Pi and thought it would be a good opportunity to try Python and see how easy it is to develop on my desktop and simply copy the files to the Pi and see it run the same way.

Re: Overlaying my own graphics on the SDL window when VLC is playing

Posted: 13 Feb 2019 19:31
by Rémi Denis-Courmont
The easiest way to overlay over VLC is to create a window with alpha channel on top of the VLC window.

Re: Overlaying my own graphics on the SDL window when VLC is playing

Posted: 13 Feb 2019 23:59
by Domarius
Thank you Rémi. Ok so two separate OS windows. But won't this cause the foreground window to take away input from the video window?