# Media Capture Options

PinballY lets you create the background media items for each of your tables - images and videos of the playfield, backglass, and so on - by launching the table in its player program and capturing screen shots (still or video) while it runs. The Media Capture options dialog lets you set up the details for these screen shot operations.

Note that this dialog doesn't actually initiate a capture operation; it's just for setting up the options. To perform a media capture for a game:

- Close the options dialog and go back to the main game window
- Navigate to the game you want to capture media for
- Bring up the "System" menu by pressing the Service Enter button
- Select the "Game Setup" command
- Select the "Capture Images & Video" command
- Choose the items you want to capture using the menu
- Select the "Begin Capture" command

## Option details

Wait for game to start: This setting lets you specify a delay time before the first screen shot is captured, to give the game a chance to initialize and enter its "attract mode". This delay time starts after the player program has loaded, so it doesn't need to count the time required to start the player; it only needs to count the time it takes the player to load the table, plus the time the table itself takes to complete its own startup. Most tables have a "self test" that they have to complete when first loaded, so you should take this time into account. The "right" value for this delay is unpredictable, because it depends on so many different factors: your system's performance, the player program's load time, and the individual table's ROM program. If you find that the screen capture is kicking in too soon for some tables, just increase this delay time setting a bit and try again.

Manual start: Check this box for a media type to make this item wait for you to press a button before capture starts for the item. Normally (if the box isn't checked), the capture process proceeds automatically through the list of items to be captured, without requiring any action on your part. If you check the "Manual start" box for an item, the capture process will stop when it reaches that item and wait for you to press a button. The capture status window will display a prompt to tell you when the capture process is paused like this.

Manual start mode is useful if you want to time an item so that it starts at a particular point in the game's attract mode display sequence. For example, you might want a DMD video capture to start at the beginning of the loop of messages that the table's ROM displays on the DMD between games.

Video and audio capture times: These settings let you set the length of the videos captured for the various windows. When PinballY plays back the videos, they'll all be shown in loops, so you effectively get "infinite" video coverage no matter how long you make the individual videos. But it's better to make the loops long enough to cover at least one whole attract mode loop for the game, so that the video isn't too repetitive, and so that you don't see jumps back to the beginning so often that they're distracting.

Manual stop: For video and audio items, you can choose "Manual stop" mode instead of the automatic timed capture that's used by default. In manual stop mode, the screen capture doesn't stop when the time limit is reached; instead, it keeps going indefinitely, until you manually intervene by pressing a button. You can use this in combination with Manual Start mode to set the exact starting and stopping points of a captured video loop. The capture status window shows a prompt when manual stop mode is in effect, letting you know that you have to press a button to finish the capture.

Manual start/stop keys: Select the button or button combination you wish to use to manually stop or stop a capture item. Use these keys for any media items you set to manual start or manual stop mode.

The default setting is to press both flipper buttons (or, to be more precise, as we'll explain below, the buttons assigned to the commands "Next" and "Previous"). This is the default because we expect most people will want to capture videos of tables running in attract mode ("game over" mode), where the flipper buttons typically have no effect on the table and thus make a good trigger. If you prefer to capture videos of your tables with the ball already in play, you might want to change the trigger button so that your capture videos don't all start with the flippers in mid-flip.

This can be one of the following:

- "Both flipper buttons" (the default), which means that you simultaneously press the keys assigned to the Next and Previous commands. We refer to these as the flipper buttons because we expect most pin cab users to map the Next and Previous commands to the flipper buttons, but what we really mean is that you should press whichever buttons you actually have mapped to the Next and Previous commands.
- "Both Magna Save buttons", which means that you simultaneously press the keys assigned to the Next Page and Previous Page buttons.
- "Launch" (the button assigned to the Launch command)
- "Info" (the button assigned to the Information command)
- "Instructions" (the button assigned to the Instructions command)

Use two-pass video encoding: Use this option if your captured videos look too choppy. Normally, PinballY tries to capture and compress video frames at the same time, in a single pass. This requires a fairly fast machine, though; on slower machines, the video encoder might drop frames (omit them from the resulting video) when it can't keep up with the live video rate. Dropped frames are visible as momentary freezes when you play back the video, which can make the video look choppy or jerky. If this happens on your machine, you can try two-pass encoding instead. Two-pass encoding initially captures the video frames without any compression, which can usually be done without any dropped frames even on slower machines. It then goes back and re-encodes the video to a compressed format after the full capture has finished. This takes longer overall because of the separate second pass, but should eliminate (or at least greatly reduce) dropped frames in the resulting video.

Optimization tip: If you've tuned your system to give higher priority to pinball software via a tool like PinAffinity, you should add ffmpeg.exe to the list of programs that receive priority CPU access. Ffmpeg is the program that PinballY uses to carry out screen capture operations. Screen capture is inherently CPU-intensive, so ffmpeg will do a better job of capturing if it's given full CPU resources.

Limit captured videos to HD resolution: Check this box to limit the resolution of captured videos to HD (1920x1080 pixels). By default, videos created using the media capture function have the same pixel size as the screen area being captured, but you can use this option to set an upper limit of HD resolution. This won't affect videos captured from smaller screen areas; it only sets an upper bound for the resolution.

In most cases, it's best to capture at the full original resolution, since that gives you the most faithful reproduction of the original graphics. However, videos captured from 4K monitors and other large formats might be too big to play back smoothly on older or slower systems, or might not even play back at all if memory is limited. If you have a large monitor, and your system can't smoothly play videos captured at full size, you can use this option to limit the videos to HD resolution.

Audio capture device: This lets you select the audio input (recording) device to use for media capture operations that record audio, such as table audio tracks and table videos that include audio.

The drop list shows a list of all of the audio input devices currently in your system. You should choose the one that records from the "Line Out" port of your sound card. This is often called "Stereo Mix" or something similar.

"Default" isn't actually a device in its own right. It's just a way of telling PinballY to select a device automatically, which it does by searching the list you see for an entry with the words "Stereo Mix" in its name. If you don't see any such device in the list, PinballY won't be able to find one either, because it works from the same list you see here. So "Default" won't actually work unless you see a suitable device listed. If you see a device with a similar name, or a version of "Stereo Mix" translated into your system's localization language, you should explicitly select that item, because PinballY won't be able to figure it out on its own based on the different name.

#### Why can't PinballY figure this out on its own?

Because Windows doesn't provide a standard device driver for this function, and Microsoft didn't even bother to specify a standard name for the driver. You'd think that Windows would offer an audio capture function automatically, but it doesn't; Microsoft left it up to the sound card manufacturers to provide drivers, and left it up to them to name the devices. So there's no way for PinballY to know the name of this driver on your system, and in fact no way to even know if there's one installed.

"Stereo Mix" is a common name for this driver only because it's the name that Realtek uses for its loopback driver, and Realtek chips are ubiquitous, especially in the built-in audio in many motherboards these days. If your system has integrated audio on the motherboard, chances are that it uses the Realtek chips, so its driver will probably be called "Stereo Mix". But the name might be the translated equivalent of "Stereo Mix" if your system is localized to a language other than English, or it might be something else entirely.

#### What if the audio device list only shows "Default"?

If "Default" is the only device you see in the audio capture device drop list, you won't be able to capture audio when recording screen shots. As described above, "Default" isn't actually a device, it's just our way of telling PinballY to choose a device by searching for one with "Stereo Mix" in its name. If you don't see a "Stereo Mix" device in the list, PinballY won't be able to find one either.

So what can you do about it if the list is empty, or if there aren't any suitable capture devices? The answer is that you have to install a suitable device driver.

In some cases, it's just a matter of enabling a device that's disabled in the Windows audio control panels. Some sound cards come with Stereo Mix or equivalent devices and disable them by default. To check for disabled devices, open the Windows sound control panel and go to the Recording tab. Look for a device called Stereo Mix or something similar; if you find it, enable it, and try again in PinballY.

If the Windows sound control panel doesn't list any Stereo Mix or equivalent devices, you'll have to find and install a device driver capable of recording from the Line Out port. This usually has to come from your sound card manufacturer, so check the support site for your sound card or your PC vendor to see if they have a Stereo Mix or "audio loopback" device driver you can use.