Convert osr replay file to video file
Project description
Getting started
from osr2mp4.osr2mp4 import Osr2mp4
data = {
"osu! path": "/Users/yuitora./osu!/",
"Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
"Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
"Default skin path": "/Users/yuitora./Downloads/Default Skin/",
"Output path": "output.avi",
"Width": 1920,
"Height": 1080,
"FPS": 60,
"Start time": 0,
"End time": -1,
"Video codec": "XVID",
"Process": 2,
"ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
}
settings = {
"Cursor size": 1,
"In-game interface": True,
"Show scoreboard": True,
"Background dim": 90,
"Always show key overlay": True,
"Automatic cursor size": False,
"Rotate sliderball": False,
"Score meter size": 1.25,
"Song volume": 50,
"Effect volume": 100,
"Ignore beatmap hitsounds": True,
"Use skin's sound samples": True,
"Global leaderboard": False,
"Mods leaderboard": "(HD)HR",
"api key": "lol"
}
converter = Osr2mp4(data, settings)
converter.startall()
converter.joinall()
Or you can save data
and settings
in a json file.
config.json:
{
"osu! path": "/Users/yuitora./osu!/",
"Skin path": "/Users/yuitora./osu!/Skins/-#Whitecat#-",
"Beatmap path": "/Users/yuitora./osu!/Songs/123456 Hachigatsu, Bou/",
".osr path": "/Users/yuitora./osu!/Replays/yuitora_12317423.osr",
"Default skin path": "/Users/yuitora./Downloads/Default Skin/",
"Output path": "output.avi",
"Width": 1920,
"Height": 1080,
"FPS": 60,
"Start time": 0,
"End time": -1,
"Video codec": "XVID",
"Process": 2,
"ffmpeg path": "Users/yuitora./ffmpeg/bin/ffmpeg.exe"
}
settings.json:
{
"Cursor size": 1,
"In-game interface": true,
"Show scoreboard": true,
"Background dim": 90,
"Always show key overlay": true,
"Automatic cursor size": true,
"Rotate sliderball": false,
"Score meter size": 1.25,
"Song volume": 50,
"Effect volume": 100,
"Ignore beatmap hitsounds": true,
"Use skin's sound samples": true,
"Global leaderboard": false,
"Mods leaderboard": "(HD)HR",
"api key": "lol"
}
And to load it in code
from osr2mp4.osr2mp4 import Osr2mp4
converter = Osr2mp4(filedata="config.json", filesettings="settings.json")
converter.startall()
converter.joinall()
Documentation
Osr2mp4.startvideo()
Start video without audio.
Osr2mp4.joinvideo()
Wait for video to finish.
Osr2mp4.startaudio()
Start audio.
Osr2mp4.joinaudio()
Wait for audio to finish.
Osr2mp4.startall()
Start video and audio.
Osr2mp4.joinall()
Wait for all to finish.
Osr2mp4.getprogress()
Return a value from 0 to 100 corresponding to the estimated progress of the conversion.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
osr2mp4-0.0.5.dev5.tar.gz
(12.5 MB
view details)
File details
Details for the file osr2mp4-0.0.5.dev5.tar.gz
.
File metadata
- Download URL: osr2mp4-0.0.5.dev5.tar.gz
- Upload date:
- Size: 12.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0af8fde8881ddab990ac88c01005db90056ae808d8dd13acd1f0dd8643a85c2a |
|
MD5 | 2b71e9697dcfef3ee83d90d0146ee2b4 |
|
BLAKE2b-256 | 02f25a78460cf9bfde2539496ea78321e6965c6cc47251b812992b7e11dae873 |