mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

Usage of VPinballX.starter makes PinballY ffmpeg screen capture fail #227

Open JockeJarre opened 10 months ago

JockeJarre commented 10 months ago

I have written a small tool VPinballX.starter which sits between the cabinet software and different versions of VPinballX.exe. It does this by loading the table file and extract the version it was saved with, then uses different "rules" in an ini file to call the right version of VPinballX.exe

A User of my tool came back and said that the capture fails when they switch to VPinballX.starter.exe

This is a log coming from PinballY while performing the ffmpeg call, This might help to find where the problem is?

Media capture: Capturing Playfield Image: launching FFMPEG
> "C:\PinballY\ffmpeg\ffmpeg.exe" -y -loglevel warning -probesize 30M -thread_queue_size 32  -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop   -vf "transpose=1,transpose=1" -vframes 1 -rtbufsize 2000M "C:\PinballY\Media\Visual Pinball X\Table Images\Space Patrol (VPX 1978).png"
[image2 @ 000002e1a0b67b00] The specified filename 'C:\PinballY\Media\Visual Pinball X\Table Images\Space Patrol (VPX 1978).png' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 000002e1a0b67b00] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.

+ FFMPEG completed: process exit code 0

Media capture: Capturing Backglass Image: launching FFMPEG
> "C:\PinballY\ffmpeg\ffmpeg.exe" -y -loglevel warning -probesize 30M -thread_queue_size 32  -f gdigrab -framerate 30 -offset_x 1920 -offset_y 0 -video_size 1920x1080 -i desktop    -vframes 1 -rtbufsize 2000M "C:\PinballY\Media\Visual Pinball X\Backglass Images\Space Patrol (VPX 1978).png"
[image2 @ 00000263c6456b00] The specified filename 'C:\PinballY\Media\Visual Pinball X\Backglass Images\Space Patrol (VPX 1978).png' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 00000263c6456b00] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.

there is also something which can be seen in this log (the line in bold only happens when VPinballX.starter is active):

launch: full table path C:\vPinball\VisualPinball\Tables\Snake Machine (Taito 1983) table launch: table file C:\vPinball\VisualPinball\Tables\Snake Machine (Taito 1983) doesn't exist; try adding extension -> C:\vPinball\VisualPinball\Tables\Snake Machine (Taito 1983).vpx table launch: file + extension (C:\vPinball\VisualPinball\Tables\Snake Machine (Taito 1983).vpx) exists, using it table launch: executable: C:\vPinball\VisualPinball\VPinballX.exe table launch: applying command line variable substitutions: Original> -minimized -play "[TABLEPATH][TABLEFILE]" Final > -minimized -play "C:\vPinball\VisualPinball\Tables\Snake Machine (Taito 1983).vpx" table launch: error waiting for the new process to start up (WaitForInputIdle failed) table launch: process launch succeeded table launch: Close Game command received

So the difference is that the real VPinballX.exe called something like VPinballX.8.exe or similar by adding version number or x64/GL for example. This executable is running as a subprocess to VPinballX.starter.exe (which is named as VPinballX.exe) By naming it VPinballX.exe, a double click in explorer or PinballX/PinballX/Popper should be fed the same executable no matter which tool is used, without much configuring in different places.

I do not know yet if the error is on "VPinballX.starter.exe" side and if it at all can be fixed here. I want to get insight in how it could be solved either here or in VPinballX.starter.exe