{"id":26847847,"url":"https://github.com/arkueid/live2d-py","last_synced_at":"2025-04-06T21:14:42.371Z","repository":{"id":242707697,"uuid":"810253511","full_name":"Arkueid/live2d-py","owner":"Arkueid","description":"Live2D Library for Python (C++ Wrapper): Supports model loading, lip-sync and basic face rigging, precise click test.","archived":false,"fork":false,"pushed_at":"2025-04-06T09:51:46.000Z","size":171400,"stargazers_count":242,"open_issues_count":7,"forks_count":23,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T10:30:07.370Z","etag":null,"topics":["cubism-sdk","live2d","opengl","python","python-c-extension"],"latest_commit_sha":null,"homepage":"https://github.com/Arkueid/live2d-py/wiki","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arkueid.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-04T10:44:33.000Z","updated_at":"2025-04-06T06:44:14.000Z","dependencies_parsed_at":"2024-06-07T19:00:52.920Z","dependency_job_id":"e45d4051-f55f-446e-830d-3d45f640ed3e","html_url":"https://github.com/Arkueid/live2d-py","commit_stats":null,"previous_names":["arkueid/live2d-py"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkueid%2Flive2d-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkueid%2Flive2d-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkueid%2Flive2d-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arkueid%2Flive2d-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arkueid","download_url":"https://codeload.github.com/Arkueid/live2d-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550689,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cubism-sdk","live2d","opengl","python","python-c-extension"],"created_at":"2025-03-30T20:32:08.143Z","updated_at":"2025-04-06T21:14:42.365Z","avatar_url":"https://github.com/Arkueid.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"padding-top: 10px\"\u003e\r\n    \u003ch1\u003e\r\n        \u003cimg src=\"./docs/moeroid.ico\" alt=\"koe\" width=\"50px\" height=\"50px\"\u003e\r\n        \u003cspan style=\"color: #ffc000ff\"\u003elive\u003c/span\u003e\u003cspan style=\"color: #ed7d31ff\"\u003e2d\u003c/span\u003e\u003cspan style=\"color: #2e75b6ff\"\u003e-py\u003c/span\u003e\r\n    \u003c/h1\u003e\r\n\u003c/div\u003e\r\n\r\n\u003cp align=\"center\" style=\"font-family: 'Roboto', sans-serif; font-size: 1em; color: #555;\"\u003e\r\n    \u003cimg title=\"Windows Distro\" src=\"https://github.com/Arkueid/live2d-py/actions/workflows/build-windows.yml/badge.svg\"\u003e\r\n    \u003cimg title=\"MacOS Distro\" src=\"https://github.com/Arkueid/live2d-py/actions/workflows/build-macos.yml/badge.svg\"\u003e\r\n    \u003cimg title=\"Linux Distro\" src=\"https://github.com/Arkueid/live2d-py/actions/workflows/build-linux.yml/badge.svg\"\u003e\r\n    \u003cbr\u003e\r\n    \u003cimg title=\"Release Version\" src=\"https://img.shields.io/github/v/release/Arkueid/live2d-py\" alt=\"Docker Build Version\" style=\"margin: 0 10px;\"\u003e\r\n    \u003cimg title=\"Python Version\" src=\"https://img.shields.io/badge/python-3.8+-blue\" alt=\"Python Version\" style=\"margin: 0 10px;\"\u003e\r\n    \u003cimg title=\"CMake\" src=\"https://img.shields.io/badge/CMake-3.26+-orange\" alt=\"CMake\" style=\"margin: 0 10px;\"\u003e\r\n    \u003cimg title=\"C++\" src=\"https://img.shields.io/badge/C%2B%2B-17-yellow\" alt=\"C++17\" style=\"margin: 0 10px;\"\u003e\r\n    \u003cimg title=\"CsmSDK\" src=\"https://img.shields.io/badge/CsmSDK-5_r3-orange\" alt=\"CsmSDK\" style=\"margin: 0 10px;\"\u003e\r\n\u003c/p\u003e\r\n\r\n[中文](./README.md)\r\n\r\nLoad and manipulate Live2D models using pure Python instead of web engine (JavaScript). \r\n\r\nThe functionalities of Live2D Native SDK are wrapped into Python via Python C API. \r\n\r\nTheoretically, Live2D models can be rendered on any OpenGL-based windows in Python as long as the OpenGL context is properly configured.   \r\n\r\nCode example: [package](./package/)\r\n\r\nDocumentation：[Wiki](https://github.com/Arkueid/live2d-py/wiki)\r\n\r\nGuide for dev：[CONTRIBUTING](./CONTRIBUTING.md)\r\n\r\n## Compatible UI Libraries  \r\nTheoretically compatible with all UI libraries that can use OpenGL for rendering: Pygame / PyQt5 / PySide2 / PySide6 / GLFW / pyopengltk / FreeGlut / Qfluentwidgets...   \r\n\r\n# Supported Features  \r\n* **Model Loading**: **Cubism 2.1** and **Cubism 3.0** or later  \r\n* Eye tracking  \r\n* Click interaction  \r\n* Motion playback callback  \r\n* Lip-sync synchronization  \r\n* Parameter control for model parts  \r\n* Opacity control for parts  \r\n* Precise part-level click detection  \r\n\r\n## Compatibility  \r\n### Python Versions  \r\nStarting from live2d-py 0.3.2, the Python C Limited API is used, theoretically supporting all Python versions **3.2 and above**.  \r\n\r\n### Cubism Live2D Versions  \r\n| `live2d-py` | Supported Live2D Models       | Implementation                |\r\n|-------------|-------------------------------|-------------------------------| \r\n| `live2d.v2` | Cubism 2.1 and earlier        | Pure Python implementation    |\r\n| `live2d.v3` | Cubism 3.0 and later          | Python C Extension wrapper    |\r\n\r\n### Python Versions and Platform\r\n\r\n:white_check_mark:: available, supported, or passing \r\n\r\n:question:: tests needed\r\n\r\n:construction:, :x:: errors or compatibility issues need to be solved when building distributions \r\n\r\n|Platform|Python Version| `live2d.v2` | `live2d.v3` |Build Status|PyPI|\r\n|--------|--------------|-------------|-------------|------|----------|\r\n|MacOS  arm64| `\u003e3.0, \u003c=3.10`|:white_check_mark:|:question:|:construction:|:x:|\r\n|MacOS  arm64| `\u003e=3.11`      |:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|\r\n|Windows x86/x64|`\u003e3.0, \u003c3.8`|:white_check_mark:|:question:|:construction:|:x:|\r\n|Windows x86/x64|`\u003e=3.8`|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|\r\n|Ubuntu 20.04/Arch, x64|`\u003e3.0, \u003c3.8`|:white_check_mark:|:question:|:construction:|:x:|\r\n|Ubuntu 20.04/Arch, x64|`\u003e=3.8`|:white_check_mark:|:white_check_mark:|:white_check_mark:|:x:|\r\n\r\n**Notes**:  \r\n* `live2d.v2` is rewritten from the Cubism Web SDK into pure Python and has not yet been optimized with libraries like numpy, resulting in lower performance [[4, 15]].  \r\n* **Cubism 2.X models**: File formats typically include `XXX.moc`, `XXX.model.json`, `XXX.mtn`.  \r\n* **Cubism 3.0+ models**: File formats typically include `XXX.moc3`, `XXX.model3.json`, `XXX.motion3.json`.  \r\n\r\n# Installation\r\n\r\n1. Download the corresponding `.whl` file from [Releases](https://github.com/Arkueid/live2d-py/releases/latest) and install it (recommended):  \r\n```shell\r\npip install live2d_py-0.X.X-cpXXX-cpXXX-win32.whl  \r\n```\r\n\r\n2. Install via [PyPI](https://pypi.org/project/live2d-py/)\r\n```\r\npip install live2d-py  \r\n```\r\n\r\n3. Build from source. Refer to [安装#源码构建](https://github.com/Arkueid/live2d-py/wiki/%E5%AE%89%E8%A3%85#%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA). \r\n\r\n## Demos\r\n\r\n### Simple Facerig\r\n\r\nSource code: [main_facial_bind_mediapipe.py](./package/main_facial_bind.py)\r\n\r\n![面捕-期末周破防](./docs/video_test.gif)\r\n\r\n### Multi-live2d model rendering\r\n\r\nSource code: [main_pygame_three_model.py](./package/main_pygame_three_model.py)\r\n\r\n![three_model](./docs/three_model.png)\r\n\r\n### Rendering with background image\r\n\r\nSource code: [main_pygame_background.py](./package/main_pygame_background.py)\r\n\r\n![background](./docs/background.png)\r\n\r\n### Model transforming \u0026 lipsync with `wav` file \u0026 Click test\r\n\r\nSource code: [main_pygame.py](./package/main_pygame.py)\r\n\r\n![完整用例](./docs/full%20demo.gif)\r\n\r\n### Model Opacity\r\n\r\n源码见 [main_pyqt5_canvas_opacity.py](./package/main_pyqt5_canvas_opacity.py)\r\n\r\n![opacity](./docs/opacity.gif)\r\n\r\n## Contributions\r\nSpecial thanks to [96bearli]，[Ovizro], [AnyaCoder], [jahtim], [Honghe], [RobertMeow], [LUORANCHENG], [TinyKiecoo] for their support and contributions to this project.\r\n\r\n[96bearli]: https://github.com/96bearli\r\n\r\n[Ovizro]: https://github.com/Ovizro\r\n\r\n[AnyaCoder]: https://github.com/AnyaCoder\r\n\r\n[jahtim]: https://github.com/jahtim\r\n\r\n[Honghe]: https://github.com/Honghe\r\n\r\n[RobertMeow]: https://github.com/RobertMeow\r\n\r\n[LUORANCHENG]: https://github.com/LUORANCHENG\r\n\r\n[TinyKiecoo]: https://github.com/TinyKiecoo\r\n\r\nSpecial thanks to the following repos and their contributors:\r\n\r\n[CubismNativeSamples](https://github.com/Live2D/CubismNativeSamples) (`live2d.v3`)\r\n\r\n[Cubism2 Web SDK](https://github.com/dylanNew/live2d) (`live2d.v2`)\r\n\r\n[de4js](https://github.com/lelinhtinh/de4js)（`JavaScript` deobfuscation）\r\n\r\n[JsConvert](https://github.com/JonBoynton/JSConvert) (Tool for converting `Javascript` to `Python`)\r\n\r\n[D2Evil](https://github.com/UlyssesWu/D2Evil) (`moc` file exploration)\r\n\r\n[facial-landmarks-for-cubism](https://github.com/adrianiainlam/facial-landmarks-for-cubism) （facerig）\r\n\r\nLive2D sources:\r\n\r\n* [Cubism Official Sample Data](https://www.live2d.com/en/learn/sample/)\r\n* [雅萌工作室](https://yameng.remoon.cn/studio/live2d-f/1)\r\n* [live2d-models](https://github.com/Eikanya/Live2d-model)\r\n* [【虚拟主播模型】 宁宁vup化！](https://www.bilibili.com/video/BV1s7411d7y9)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkueid%2Flive2d-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkueid%2Flive2d-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkueid%2Flive2d-py/lists"}