Skip to content
RaRainOrgPublic

About

一个简单生成舞萌铺面确认的 Python 库

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

PyMaiView

用 Python 和 Playwright 导出 maimai 谱面确认视频。运行时 Web 代码、皮肤和音效都位于 src/pymaiview/web,它们是应用源码,不需要额外构建脚本或 Git submodule。转场直接使用 Assets/transition.mp4 的原始动画和 WebGL 五色映射,并与 “转场 → 谱面介绍 → 转场 → 正式播放”共用同一条渲染时间轴。

安装

uv sync
uv run playwright install chromium

Python API

from pymaiview import PyMaiView

with PyMaiView.from_zip("TECHNOPOLIS 1042.5.zip") as view:
    view.playback.update({"speed": 6.5, "touchSpeed": 7, "visualZoom": 200})
    view.render("output.mp4", width=1280, height=720, fps=30)

也可以直接传入资源。文件路径推荐使用 Path,普通字符串也可以作为 maidata 原文。

from pathlib import Path
from pymaiview import PyMaiView

PyMaiView(
    skin=Path("my-skin"),
    playback={"speed": 7, "touchSpeed": 8, "moviebrightness": -2},
    maidata=Path("maidata.txt"),
    pv=Path("bg.jpg"),
    music=Path("track.mp3"),
    difficulty=5,
).render("output.mp4")

CLI

uv run pymaiview "TECHNOPOLIS 1042.5.zip" -o output.mp4 --fps 60

开发

uv run python -m unittest discover -v
uv build

版权与致谢

本项目使用或参考了以下开源项目与视觉素材:

本项目依照 GPL-3.0 发布,完整条款见 LICENSE。上游项目及素材的版权归各自作者所有。

About

一个简单生成舞萌铺面确认的 Python 库

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages