Coder Social home page Coder Social logo

ssbmars / auto-clippi-trimmer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

Automatically trim the clips generated by clippi so they end slightly earlier. Meant for the json files generated by Project Clippi, a tool for processing Slippi replays.

License: MIT License

Python 94.03% Batchfile 5.97%

auto-clippi-trimmer's Introduction

Automatically make Clippi highlights slightly shorter!

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

How to Use

1) This is a Python script, so you must install a Python interpreter before it will work.

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.

About

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.

auto-clippi-trimmer's People

Contributors

ssbmars avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.