The recording part in Popper is hardly documented and not that easy to understand what happens during recording session.
Before using PopperAutoRecord, PopperAutoQA should be used first to check if the tables are working/loading fine. This prog. creates screenshots of Playfield, backglass within a jpeg-file in the subdir "\..PinUpSystem\testqa".
Generally there are two options for table recording in Popper, which I would explain further on.
- using PopperAutorecord for autorecording of tables
- the recording feature in PUP-menu for recording a single screen of a single table
The programs, scripts and batch files for video recording are located in the directory: “C:\vPinball\PinUPSystem\Recordings”.
The programs/batch files involved are :
- recordstart.bat to start the recording, initiated by the popper prog.
- RecordStop.bat to stop and do further process of the recording
- Ffmpeg.exe, creates the actual video, conversion and, if necessary, can edit the video
- PupCloseRecord.exe, ends the recording
- PUPCloserOBS.exe, terminates OBS (if OBS used and the batchfile recordstop/-start was adjusted)
- Playsound.exe, plays a sound file according to the individual steps. The sound files are located in the subdirectory “Sounds”.
- PopperKeepfocus.exe ensures that the playfield has focus after starting the recording software, otherwise the table will stop running.
First way: table recording with PopperAutoRecord:
To record a video, PopperAutoRecord runs each table one after the other, as if you were starting them from the PUP menu. The PUP-launch script is also executed.
In order to distinguish this from a “normal” start, PopperAutoRecord sets the variable “RECMODE”==“1”. The emulator's launch script then runs through the commands that belong to the part if "[RECMODE]"=="1" (…)
batch file RecordStart.bat is executed. RecordStart is called with 9 parameters:
1=xpos, 2=ypos, 3=width, 4=height, 5=Pix, 6=filename, 7=screennum, 8='display#', 9=rotation, where parameter #7 is the number of which screen should be recorded (“3”=Playfield, “2”=Backglass, etc.)
- PopperAutoRecord calls the batch file “recordstart.bat”
The screen no. corresponds to the one defined in the pup pack for the PUP menu.
- Any remaining files from earlier recordings will be deleted first.
- Then the variables that affect the configuration of the vPin are read (Nvidia card present, audio device, etc.)
- In the part if %7%==3 goto ffmpeg , the playfield should be recorded with ffmpeg.
- The script then starts ffmpeg with the appropriate parameters
- The script then creates a marker file to indicate which recording method was used. (recffmpeg.var).
This is then queried in the Recordstop.bat script.
To make it easier to find errors in processing, this batch file creates a log file “recordstart.log”, which contains the individual commands that were run.
Hint: When recording, PopperAutorecord creates a marker file “recording.txt” to indicate that it is in recording mode.
To avoid problems if the program has crashed, or the program is forced to close, the "recording.txt" is deleted with every start of the rec. program.
batch file RecordStop.bat is executed
recordStop.bat is called with 4 parameters:
1=output full name with path, 2=#display # , 3= string "DISPLAY"<#>, 4=Rotation
- PopperAutoRecord calls RecordStop.bat
- Then variables are read again. There are “vtrim” for ffmpeg, in order to be able to cut off the beginning of recordings if necessary.
- It is checked whether the marker for an ffmpeg recording is present and
- During further processing, if the video has to be cut and to be recoded.
- Then the video file with its appropriate table name is copied into the correct Popmedia directory
- Finally, a cleanup takes place, deleting the recording.txt, closing PopperKeepFocus.
2nd way: Record table videos via the PUP menu:
The advantage of this recording option is that you can, for example, record the playfield when playing the game, which is not easy possible with the PopperAutoRecord.
Existing recordings will be overwritten.
To start and stop the recording, the hotkey which is defined in the controller setup of PopperSetup must be pressed.
The internal process of recording is almost the same as when recording with PopperAutorecord.
- PUP sets the corresponding Display# depending on the screen to be recorded and calls RecordStart.bat
- The same processing steps take place here as described in the previous point.
The only difference:
In contrast to recording with PopperAutoRecord, the duration of the recording time is not determined by the program, but only by the time specified in the “Record Length” variable.
If this time (here 30 seconds) is exceeded during this manual recording, ffmpeg ends the recording after that time. Means that the max. recording time is defined by that variable "Record Length".
After pressing the hotkey again, the script continues processing.
Now to your problem:
it seems that the assignment of the Display# in the PUP-pack configuration of the PinUpMenu isn't correct.
the PUP-player (PUP-menu) has its own PUP-pack named "PinUpMenu".
As shown above the script expects that the Playfield has ScreenNum=3, Backglass=2.
If that doesn't fit, for example the numbers are swapped, then playfield is recorded instead of BG and vice versa.
- run PUPpackeditor and load the PinUpMenu-PUPpack.
- Check that PF has ScreenNum #3, BackGlass #2, DMD #1
- for test choose in PopperAutoRecord that only one screen and one table is recorded.
During recording log files "recordstart.log" and "recordstop.log" are created. Check these files to see if the content is correct.
For Playfield there must be a line in recordstart.log with if 3 = 3..
This means that the program has passed the correct parameter for the playfield (#3) and the playfield will be recorded.
Edit: corrected the part of handling the recording.txt
Edited by fhjui, 22 March 2024 - 06:17 PM.