Hi Manbearpig.
Attached to this message I posted the script of your table that I modified to get the MMSBW.mp4 loaded automatically at the table startup and placed on the backglass monitor, the DMD monitor or into the background of the table screen when the desktop version of the table is running.
I’m not an expert in scripting and I know little about Virtual Pinball X and the DirectB2s backglass server.
So the patch actually works great for my cabinet by resizing the movie and placing it in the right areas of the screens depending upon the mode selected. I tested it on a Windows 7 OS configured to have the extended desktop having monitor 1 assigned to the table playfield (the base desktop screen), monitor 2 assigned to the backglass (the screen placed at the right of the base desktop screen) and monitor 3 assigned to the DMD (the screen placed at the right of the backglass screen). I’m honestly not able to understand how to retrieve the monitors top/left coordinates of the extended desktop monitors, so the algorithms that I implemented using the ScreenRes.txt are absolutely empiric. I can’t warrant that they work right with OS other than Windows 7 and/or configured for a different setup of the extended desktop monitors described just above.
I searched the web for a clear description about the meanings of the lines into the ScreenRes.txt file, but I found different description inconsistent each other and maybe that I also misunderstood something about them. If someone out of here has a reliable explanation of that lines I’ll be glad to adjust the algorithms according to what suggested.
The whole patch is at the end of the file attached to this post, except for the two subs calls needed to make it run.
One sub is placed as the last line of the Table_Init sub and is named SetMovieScreen (it launches the movie), while the other is placed into the Table1_Exit sub and is named RemoveMovieScreen (it just removes away the movie from the screen).
SetMovieScreen has some options.
Two options are specified as arguments of the sub itself, the syntax is:
SetMovieScreen(ScreenNum, Is_4x3Ratio).
The ScreenNum is the number of the monitor where you want the movie to play. It allows to get the movie on the backglass even in case of a three monitors system (it‘s the configuration that I prefer in my cabinet because it is more like the real table even if leaves the DMD display unused).
Setting ScreenNum=2, the movie plays on the backglass monitor in place of the smiley Mickey Mouse face inside the old fashioning picture frame,
Selecting ScreenNum=3 instead, the movie plays on the DMD monitor. In this case, setting Is_4x3Ratio=False the movie plays occupying the whole DMD monitor screen area, while setting Is_4x3Ratio to True the movie plays in the middle of the DMD monitor screen area with a 4/3 format as the old TV sets did.
If the above caveats are respected, both monitor modes have auto adjustment for the size according to the ScreenRes.txt file. If you create in the very same folder of the table a file named as the VPX file but with the extension set to “txt” (that is “Mickey Mouse in Steamboat Willie (Original 2022).txt”, for example), that file will be used instead of the ScreenRes.txt, allowing some customization of the table.
For example: setting line 12 of that file to 1 with monitor 3 selected, the movie plays upside-down for those pincabs whose have the DMD reflected on table glass (AFAIK they should be called “P2k style cabinets”).
If you run the table in desktop mode, the movie plays on the left of the background image, but you can adjust its position and/or resize it just editing the constants named DTmodeWidth, DTmodeHeight, DTmodeLeft and DTmodeTop (the suffixes self explain their meanings). Note that I used Table1.ShowDT property to establish that modality, in case that the flag is not automatically set in desktop mode, just add Table1.ShowDT = True as the first line inside Table1_Init.
Patch files requirements.
The patch needs the MMSBW.mp4 file placed inside a folder named MMSBW that you must create into the very same table folder. In case you want to change that path, you can edit the MoviePath variable according to your preference.
In the very same directory of the movie file you must place the FFplay.exe file. FFplay is a well working simple and portable media player that uses the FFmpeg libraries and the SDL library. It is the player built around the very same FFmpeg used by GTXjoe for his gorgeous PBXrecorder. FFmpeg is a more complete multimedia framework not useful in this context.
You can download FFplay.exe as a part of the FFmpeg framework from here: https://github.com/G...-full_build.zip
You find FFplay.exe into the unzipped folder: “.\ffmpeg-2022-04-18-git-d5687236ab-full_build\bin”.
Only that file is needed. Note that there are other FFplay.exe files somewhere around the WEB, but for an incomprehensible reason to me, they look more recent but they are smaller in size and don’t support the switch option “-alwaysontop” that make the movie always on top, so that they make the desktop modality not available (the movie hides behind the background of the table). I must also highlight that in FFplay.exe option “-alwaysontop” doesn’t work at all if the Windows SDL has version older than 2.0.6 (this statement is as per FFplay documentation site: https://ffmpeg.org/ffplay.html). In case your system has older dll, , you can download the latest version of the SDL (Simple DirectMedia Layer) here: http://www.libsdl.or...0-win32-x86.zip ***Edit.*** You don't need to register the SDL2.dll downloaded from this zip file, just copy it into the very same folder where the FFplay.exe it is.
I hope that you could appreciate this patch, at least until someone (who knows better than me how to get the movie embedded into the backglass server or into the DMD) will publish something better.
I very like this table, because it gives acknowledgment and honor to BAHBEVANS who built the real pinball. Despite it is a very essential table, he did a great job making it. My great esteem to him.
Have a great day.
Massimo
Edited by Pmax65, 23 April 2022 - 08:52 AM.