Jump to content

NEW PupPack Resizer Program. Helps fix Stuttering, especially on low end systems


Recommended Posts

Posted (edited)

So I started down the road of trying to find out why I had stuttering and other issues with some PupPacks, but not others, and seems the big issue has been mainly resolution mismatches and the requirements and overhead of scaling in real-time.  Realizing that a blanket resizer would not cut it, I made a reasonably full featured program to handle all of this, plus bitrate handling and custom resolutions for Topper and DMD files. 

 

This is a lot like Nailbusters pupStandardAllMedia batch files, but more robust (complicated?) I also did not want "ALL" files converted as I needed to process Topper/DMD files separately and to a different resolution.

 

Have a look, give it a try and let me know what you think and what else I can add/change/improve

 


PupPack Resizer
===============

A batch tool for resizing and optimizing PupPack video files for Virtual Pinball systems (DMDs, Toppers, Backglass, etc.). Ensures files match your native display resolution and reduces CPU load.

Features:
---------
- Batch process all .mp4 files recursively
- Resize to 960x540, 1280x720, or 1920x1080
- Optional CRF compression to reduce bitrate
- Allow or prevent upscaling
- Detect and log non-16:9 videos
- Resume interrupted runs using progress.txt
- Progress bar and color-coded console output
- Auto-deletes temp files
- Logs skipped, processed, failed files

 

Why Native Resolution Matters:
------------------------------
- Reduces need for real-time scaling (saves CPU)
- Maintains original aspect ratio
- Faster animation and loading
- Even smaller PupPack windows benefit if the file matches the window’s resolution

 

Note on Topper/DMD Resolutions:
-------------------------------
Example: Many Toppers and DMD Files are created at 1920x600, which is not exactly half of 1080p which would be the recommended setup for a DMD/Topper Center screen. Using This causes scaling overhead even though its almost the same. Even a single pixel's difference would require scaling
Recommended size in this case: 1920x540 (exact half of 1080p) to eliminate CPU scaling cost.

Scale to your actual Hardware DMD and Topper resolution settings

 

How to Use:
-----------
1. Run PupPackScaler.bat
2. Select mode:
   - CRF + Resize
   - Resize Only
3. Choose resolution: 960x540, 1280x720, or 1920x1080
4. Choose whether to allow upscaling
5. Watch progress bar and real-time console output

6. Every 1o files the time estimate is recalculated and displayed

7. After all files are processed, the chance to encode and resize any non-16:9  is given * 

     * It's automatically assumed these are either DMD/Topper or special use videos some of which may not be beneficial to scale, so the option is given on a file-by-file basis to scale these. You can also change the resolution for each of these files individually giving maximum flexibility.

8. Lastly automatic clean-up of any temporary files is completed

 

File Logging:
-------------
- Temp files (_resize_temp.mp4, _crf_temp.mp4) are deleted after use
- A log file (Converted_Log_YYYYMMDD.txt) stores:
  • Processed files
  • Skipped reasons
  • Bitrate comparisons
  • Any errors
- Resume supported via progress.txt

 

Handling Non-16:9 Files:
------------------------
These files are logged and reviewed at the end of the run. You'll be prompted to manually resize them with optional override resolution.

 

Requirements:
-------------
- FFmpeg & FFprobe in same folder or PATH
- Windows 10+
- PowerShell enabled
- Script must run in same directory as videos

 

Best Practices:
---------------
- Use the actual resolution of your PupPack screens
- CRF 23 is a good starting point
- Process folders in batches per table or per media type

Credits:
--------
Created by Randyre  
For the Virtual Pinball & PinUP Popper community

 

Reminder: Always back up your media before processing!
 

 

Updated to V1.1.1

 

 

PupPack Resizer.zip

 

PupPackResizer V1.1.1.bat

Edited by randyre
formatting
Posted (edited)

New Version:   V1.0.3   

Found the section for handling non-16:9 topper and DMD videos was a bit cumbersome, so changed it to have a default of 1920x540 and then three more options of 1920x1080 as some of the files were not 16:9 but also not intended for DMD or topper, just a mismatched resolution, and then theres still an option for custom sizes.  Lastly the fourth option is skipping this file, instead of prompting a y/n for every file, it now assumes yes, and allows skip as an option saving one more keypress and enter for every file.  Also if you want the default of 1920x540 just press enter and you don't have to press 1 first.

 

New file is uploaded.  V1.0.3

PupPackResizer V1.0.3.bat

Edited by randyre
Posted

I had a couple of questions posed about why to resize when some videos run in a smaller windows so not full screen at native resolution.  Heres some quick info on that question.
 

From VLC Faq:

When playing a video in VLC, the CPU impact can vary depending on the resolution and windowed mode. Running a video in VLC at other than native resolution may cause lagging playback and out-of-sync audio/video1. Playing the same video in VLC at native resolution but windowed mode can significantly reduce CPU usage

Posted (edited)

 Made changes to how the non-16:9 files are processed, v1.0.3 is granular and allows you to choose for each file, but with hundreds or even thousands of files that is labor intensive.  V1.0.8 changes that logic to do the following:

 

Pull out one “current” resolution from the log

Prompt once (with four options) for how to handle all files at that resolution

Apply your choice to each matching file without re-prompting

Remove those lines from the log

Loop back finding the next resolution until the log is empty

So in summary, if you want all files of a certain non-16:9 resolution handled the same use v1.0.8, if you want to choose separately for every file use V1.0.3

 

Also, if at any time you need to change something or just feel the need, close the CMD Window and when you restart it will continue where you left off.

 

 

PupPackResizer V1.0.8.bat

Edited by randyre
added 1.0.8 which adds automatic 30fps conversion
Posted (edited)

For those that don't want to mess with resolutions but still want a small optimization

 

Use this file  (30-FPS.bat)   

 

What it does:

It will parse your entire directory structure and identify any files not at 30fps and convert them without resizing or bitrate changes.

 

Why do this?:

30fps is the recommended framerate by Nailbuster, and it will help your system stability and speed so that framerates don't constantly switch, even if its 29.9 fps it still benefits from optimization. 

1. Consistent timing
If one clip is 25 fps and another is 30 fps, their durations (in seconds) won’t line up neatly by frame count. By standardizing on 30 fps, 30 frames always equals exactly one second, making it trivial to calculate offsets, trim points, and transition lengths.

 

2. No frame‐rate conversions at runtime
Many playback engines or concatenation filters will either drop or duplicate frames on the fly to compensate for mismatched rates—resulting in micro-stutters or uneven motion. Pre-converting everything to 30 fps means your final render will play back smoothly, with no surprises.

3. Simpler filter graphs
When you apply effects like cross-fades, titles, overlays or audio-video syncing, you can address everything in “frames” rather than mixing frames and timestamps. A uniform frame grid means your keyframes or markers all fall exactly where you expect.

 

Test Case:

I ran a sample of over a Thousand files and found 200+ of them at something other than an even 30fps.

 

30-FPS V1.4.bat

Edited by randyre
Posted (edited)

And finally, for those that only want to Resize Topper and DMD files to 1920x540.

 

It will recurse a directory looking for any Folder‐name or Filename with DMD or Topper in it, excluding any Folder‐name or Filename containing “full”  as those are most likely meant to run at 1920x1080 on a full DMD.
 

If there are other resolutions anyone needs let me know and I can fix it or tell you what to modify.

 

DMD Resize Only.bat

Edited by randyre
Posted (edited)

One more change to the non-16:9 processing.

 

V1.1.1 now gives a suggestion between 1920x1080 or 1920x540 as it was getting hard with really odd resolutions to determine what should be converted to DMD Topper size and what should be converted to full screen.

it also incorporates the DMD/Topper logic that suggests 1920x540 if the filename or folder contains topper or DMD in the name, excluiding DMD or Topper when also contains FULL.

 

 

 

 

 

PupPackResizer V1.1.1.bat

Edited by randyre

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...