PinballY icon indicating copy to clipboard operation
PinballY copied to clipboard

Table exits before image capture is taken

Open mase76 opened this issue 10 months ago • 7 comments

Hi, I have the problem, mostly with the backglass and DMD, that the table exits before the image captures are taken. This ends with an empty image showing only the capture success message. This happens with automatic and manual capture. I tried this with the OpenGL and DX versions of VPX, also windowed and exclusive fullscreen. It seems, that the image capture takes too long. Maybe an option to leave the table open for x milliseconds could help.

mase76 avatar Mar 08 '25 11:03 mase76

I'm afraid that the concept of "an option to leave the table open for x milliseconds" isn't really something I could add, because the way it already works is that PinballY leaves the game running until the capture completes. There isn't a "timer" involved; there's a sequence of operations, launching the game, running the ffmpeg capture, and then ending the game after ffmpeg finishes.

I suspect that what's actually going on is that ffmpeg is always capturing blank video/images on your system. If it were a timing problem, ffmpeg would capture video of PinballY instead of video of the game, and it sounds like you're not seeing video of PinballY but of blank screens. So what you might want to look at is whether the ffmpeg command that's running (which you can get from the PinballY log) actually captures anything when you run it manually.

mjrgh avatar Mar 08 '25 20:03 mjrgh

I don't get captures of blank screens. I get captures of the "capture successful" message.

mase76 avatar Mar 09 '25 01:03 mase76

Oh, curious. In that case I'm not sure what to suggest. Do the same games run normally when you launch them for normal play? No unexpected early exits in that case?

You could try experimenting with long startup delay times and see what happens. Set the startup time to something insanely long, like 120 seconds. See if the game sits there for two minutes, then exits prematurely as soon as the capture starts, or if it exits before the two minutes is even up.

mjrgh avatar Mar 09 '25 01:03 mjrgh

The games run normally. I did it with manual captures. Even waiting several minutes still ends in the same. The game exits and then the capture is taken.

mase76 avatar Mar 09 '25 12:03 mase76

I did it with manual captures.

Did you try the extremely long startup delay, but WITHOUT manual capture? Just in case it's the manual capture keys that are prematurely ending the game.

You might try turning on Table Launch and Media Capture logging, and carefully inspecting the log. That will show you the sequence of events for table launch, ffmpeg run, and table shutdown. That should help determine if the premature table shutdown is coming from PinballY or from an external source - if the log shows that PinballY is terminating the table session after ffmpeg exits, the shutdown is presumably coming from an external source.

If none of that helps, maybe try asking in the forums to see if anyone else has run into anything similar. If so maybe they'll have ideas about the cause and/or solution.

mjrgh avatar Mar 09 '25 18:03 mjrgh

You're right. It is not a timing problem. I am running the tables in GL exclusive fullscreen mode. Also in windowed mode, no playfield image is captured. No errors in the log. Switching to the DX version I can only capture when in windowed mode, which costs a lot of performance when playing. My workaround is to switch to DX windowed mode when capturing. However in DX mode I often get no backglass. I have to reset with F3 multiple times to see a backglass. This problem does not occur in GL mode and not when launching the table in VPX without PBY.

mase76 avatar Mar 12 '25 21:03 mase76

You should take a look at the help section on ddagrab - Option Settings > Media Capture - FFMPEG, scroll down to How to use ddagrab. That's a newer ffmpeg feature that lets you capture directly from exclusive full-screen mode. That should at least let you do the capture without changing the VP settings. I'm not sure that has anything to do with the premature program exit problem, so it might not fix that part, but it's probably worth checking. And in any case, it should make things better for you by letting you avoid the VP settings changes.

mjrgh avatar Mar 12 '25 21:03 mjrgh

I went to Win10 on my cab and now I can use ddagrab. That works now.

mase76 avatar Sep 11 '25 16:09 mase76