A python script that generates a video (by default .mp4) of a key overlay given an osu!std replay (.osr file)
You can change the output file by modifing these variables:
- WIDHT and HEIGHT - the dimensions of the video measured in pixels
- FPS - framerate of the video
- KEYWIDTH - width of the blocks (keep in mind that KEYWIDTH*2 should be <= WIDTH)
- SEGMENTS - the amount of segments the height is divided into. The blocks travel a segment each frame so think of this as controlling the speed.
- COLOR - the color of the blocks in hex code
- GRADIENT_PERCENTAGE - make the blocks fade away, starting at some percentage of the HEIGHT (0 = No gradient)
The required python dependencies are:
$ python -m pip install osrparse ffmpeg-python pillow
Also you need to have ffmpeg installed on your system, download it here.
If you're on Linux you can also use your package manager. For example on arch-based distros:
$ yay -S ffmpeg
$ python parse.py <replay_path> <output_path>
millarca.mp4
And then if you edit it and add to a video you can create cpol-like replays like this