This script will trim the clips generated by clippi so they end slightly earlier. Meant for the json files generated by Project Clippi, a tool that processes Slippi replay files.
Clippi is an amazing tool, but all the clips that it generated would last a few more seconds after the KO, so a lot of screen time was dedicated to the player just waiting for their opponent to respawn. This tool aims to cut out most of the meandering that happens after a stock is taken. The intended usecase is highlights with "Combo Must Kill" enabled, OBS connected via its websocket feature, set to record a highlight reel as a single video.
Slippi: https://slippi.gg/
Clippi: https://github.com/vinceau/project-clippi
If you're unfamiliar with what this means, I recommend watching this video tutorial and visiting blippi.gg for more tips on using Slippi and Clippi
For Windows 10+, you can install it from the Microsoft Store by searching for "Python".
You can confirm whether Python is installed by launching a cmd window and typing the following:
python --version
If the command is recognized and returns a version number, then Python is installed.
If this lazy explanation isn't working for you, then follow this detailed guide: https://realpython.com/run-python-scripts/
2) Download and unzip this repo, copy trim_clippis.py
to the folder where Project Clippi generates its json files.
The Output File
path in Project Clippi's "Replay Processor" tab will determine where the json file is saved. You may prefer to put all these files in the same folder, or you may want to isolate trim_clippis.py
in its own folder and copy over specific json files for it to process.
You can also copy trim_clippis.bat
into the same directory as its .py
namesake if you don't want to run the script manually.
You can make a shortcut of this batch file and put it somewhere convenient for easy access.
3) In the directory where trim_clippis.py
resides, run trim_clippis.bat
or open a cmd window and enter the following command:
python trim_clippis.py
The script will run and end without printing any output in the terminal.
This will NOT replace your original json files. New copies are generated with their names ending in _trimmed.json
.
As long as a json file's name ends in _trimmed.json
, the script will not process it. Files ending in _trimmed.json
can be overwritten by the script.
4) Load your new trimmed json file(s) in Project Clippi and enjoy all the clips ending slightly earlier!
You can modify how many frames get trimmed off the clips by editing trim_clippis.py
and changing the frames
variable. Remember that there are 60 frames in a second and the value you provide must be a whole number.
Thank you to @monorail#0471 on the Slippi Discord for writing and sharing this script.
I don't have any experience with writing Python scripts myself, so please don't make any feature requests.