After too many hours spent on trying to get well known Win11 media players to reliably output fullscreen to an extended display while leaving play controls and indicators on the main display, even when called from the command line by my simple PureBasic GUI, I was delighted to find PlayMovie and its associated functions, which I think will allow me to create what I need in a simple form. I notice that PlayMovie also handles still images, which is also very useful.
Displaying on the extended screen seems to require adding a constant to the x-axis to move the image into the extended area and resizing the frames, but this constant and the new image size are not as I would expect from simple pixel counting: these values have to be multiplied by what windows calls the "recommended scale" for the home screen (in my case 125% for 1920x1080 and 250% for 3840x 2160, even with the extended screen being fixed at 1920x1080. Any ideas why?
Most importantly I cannot work out whether there might be a way to incorporate subtitles from .srt files: is it possible with, for example, sprites? Or, more elegantly, could an image blend (or similar) function be incorporated into the ResizeMovie() function, which must deal with the stream frame-by-frame. This seems (to me) to be the perfect place for it, and would allow a simple interface where the supplied subtitle image would be simply updated at stipulated times.
Any ideas or suitable functions very welcome.
NB the application is for AV support in my village church, where the volunteer sound and vision operators are committed but are not IT-savvy, so KISS is a firm principle.
Win 11 2nd screen media player with main screen controls
Re: Win 11 2nd screen media player with main screen controls
Welcome to the forum. Like you, I'm new to PB. I'd like to give you some advice, if I may. Paste your code here, it would be enough to explain in one or two sentences what is not working. Russian friends are very good at PB, but their English may be as bad as mine 
Your last sentence, I've learnt a new acronym, thanks to you. KISS principle = Keep it simple and straightforward..
That's what I wanted to say at the beginning of my message
Your last sentence, I've learnt a new acronym, thanks to you. KISS principle = Keep it simple and straightforward..
That's what I wanted to say at the beginning of my message
Re: Win 11 2nd screen media player with main screen controls
Hello Erolcum, thank you for the reply. Let me expand on the points I've raised.
I don't have any issues with code itself: the common media players come with a lot of complicated menu settings, but it turns out (and I have ready seen several posts about exactly this issue on line) that there is no reliable setting for having a fullscreen (i.e. no frame and no controls) playback on screen 2 (my extended display) with media controls on screen 1 (my main laptop screen). Up until now we've used VLC without any media controls, started and stopped from a PB GUI that keeps the screen 2 display tidy and makes things simple for the operator by needing only a drag & dropped file. However we cannot follow the file's progress, or anticipate its end, or pause anywhere. All of these would be useful. I haven't been able to find and VLC API calls that would allow me to create media controls myself. Recently I've tried out Media Player Classic and PotPlayer, which looked promising, but they didn't deliver either. I've read that OBS would work, but frankly that seems over-complicated for the operator and probably also the church laptop (a Windows 11 HP Pavillion i5-1335U, also running PowerPoint).
My comment about Windows 11 display scaling is just what I observed: with both main and extended screens at 1920x1080, as expected, ResizeMovie(0,0,0,1920,1080) was correct for fullscreen display on screen 1, but I found that ResizeMovie(0,2400,0,2400,1350) was necessary to fill screen 2 (using a different screen number eg PlayMovie(0,2) didn't have any effect so I used x-offset instead). Now 2400 and 1350 are 1920 and 1080 x 125%, which is the scale setting. I thought the scale value was to magnify icons on the screen - I don't know how or why it affects window placement.
The query re subtitles is because, for all the excellent functions that PB provides for playing a movie in just the way I want to (for which I can write a PB GUI), there is no reference to subtitle (.srt) files. I don't need them often, but sometimes that's how a video arrives. If I have sufficient notice I can embed the subtitles into the video using VideoPad on my home laptop, but if someone turns up with subtitles "on the day" then we'd be really stuck.
Does that help at all?
Kind regards,
David
I don't have any issues with code itself: the common media players come with a lot of complicated menu settings, but it turns out (and I have ready seen several posts about exactly this issue on line) that there is no reliable setting for having a fullscreen (i.e. no frame and no controls) playback on screen 2 (my extended display) with media controls on screen 1 (my main laptop screen). Up until now we've used VLC without any media controls, started and stopped from a PB GUI that keeps the screen 2 display tidy and makes things simple for the operator by needing only a drag & dropped file. However we cannot follow the file's progress, or anticipate its end, or pause anywhere. All of these would be useful. I haven't been able to find and VLC API calls that would allow me to create media controls myself. Recently I've tried out Media Player Classic and PotPlayer, which looked promising, but they didn't deliver either. I've read that OBS would work, but frankly that seems over-complicated for the operator and probably also the church laptop (a Windows 11 HP Pavillion i5-1335U, also running PowerPoint).
My comment about Windows 11 display scaling is just what I observed: with both main and extended screens at 1920x1080, as expected, ResizeMovie(0,0,0,1920,1080) was correct for fullscreen display on screen 1, but I found that ResizeMovie(0,2400,0,2400,1350) was necessary to fill screen 2 (using a different screen number eg PlayMovie(0,2) didn't have any effect so I used x-offset instead). Now 2400 and 1350 are 1920 and 1080 x 125%, which is the scale setting. I thought the scale value was to magnify icons on the screen - I don't know how or why it affects window placement.
The query re subtitles is because, for all the excellent functions that PB provides for playing a movie in just the way I want to (for which I can write a PB GUI), there is no reference to subtitle (.srt) files. I don't need them often, but sometimes that's how a video arrives. If I have sufficient notice I can embed the subtitles into the video using VideoPad on my home laptop, but if someone turns up with subtitles "on the day" then we'd be really stuck.
Does that help at all?
Kind regards,
David

