{"id":20208372,"url":"https://github.com/hfrost0/danmakuc","last_synced_at":"2025-10-06T16:06:45.757Z","repository":{"id":82355540,"uuid":"543021207","full_name":"HFrost0/danmakuC","owner":"HFrost0","description":"Faster conversion for larger Danmaku to Ass format with C++ and Python interface","archived":false,"fork":false,"pushed_at":"2024-12-18T02:35:24.000Z","size":4506,"stargazers_count":30,"open_issues_count":7,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:44:49.166Z","etag":null,"topics":["cpp","danmaku","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HFrost0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2022-09-29T09:03:56.000Z","updated_at":"2025-02-12T16:53:00.000Z","dependencies_parsed_at":"2024-02-18T11:35:13.104Z","dependency_job_id":null,"html_url":"https://github.com/HFrost0/danmakuC","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HFrost0%2FdanmakuC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HFrost0%2FdanmakuC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HFrost0%2FdanmakuC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HFrost0%2FdanmakuC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HFrost0","download_url":"https://codeload.github.com/HFrost0/danmakuC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248222160,"owners_count":21067725,"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":["cpp","danmaku","python"],"created_at":"2024-11-14T05:35:20.153Z","updated_at":"2025-10-06T16:06:45.704Z","avatar_url":"https://github.com/HFrost0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# danmakuC\n\nFaster conversion for larger Danmaku to Ass format. Core conversion part is written in C++ while with\nuser-friendly Python api and cli.\n\nCurrently, support types:\n\n* [bilibili](htts://wwww.bilibili.com) protobuf\n* [niconico](https://www.nicovideo.jp) protobuf since 0.3.1\n\n## Why danmakuC?\n\n.ass format can be recognized by your local video player,\nwhile [Danmaku2ASS](https://github.com/m13253/danmaku2ass) and [biliass](https://github.com/yutto-dev/biliass) provides\na great tool to convert danmaku to ass format, the conversion of large danmaku is **incredibly slow** since it's a heavy\nCPU bound task for Python🥲. danmakuC refactor those two repos and provide a much faster C++ implementation to speed up\nconversion. Let's see how fast it is:\n\n|                     | test_dm.bin (218 comments) | test_dm_large.bin (59,003 comments) |\n|---------------------|----------------------------|-------------------------------------|\n| Danmaku2ASS/biliass | 0.0105 s                   | 47.0650 s                           |\n| danmakuC            | 0.0009 s                   | 0.2077 s                            |\n\n\u003e Results are obtained in M1 arm64 chip mac with python3.10 danmakuC v0.1a0, danmaku file is downloaded from bilibili by\n\u003e [bilix](https://github.com/HFrost0/bilix).\n\nAs you can see, over 100 times faster in large conversion. For video with more viewer and comments\n(like movie and tv play), a fast tool like danmakuC is just what you need✊.\n\n## Install\n\n```shell\npip install danmakuC\n```\n\n## Usage\n\nIn python, you can use danmakuC like:\n\n```python\nfrom danmakuC.bilibili import proto2ass\n\nwith open(\"test_dm_large.bin\", \"rb\") as f:\n    ass_text = proto2ass(f.read(), 1920, 1080)\n\n```\n\nIf you prefer to use cli, you can use danmakuC like:\n\n```shell\ndanmakuC src.bin -o tgt.ass\n```\n\nfor more feature, you can check `-h`\n\n```shell\ndanmakuC -h\n\nusage: danmakuC [-h] [-o OUTPUT] [-s SIZE] [-rb RESERVE_BLANK] [-fn FONT] [-fs FONTSIZE] [-a ALPHA] [-dm DURATION_MARQUEE] [-ds DURATION_STILL] [-fl FILTER] [-r] [-v] file\n\ndanmakuC cli version 0.2a0\n\npositional arguments:\n  file                  Comment file to be processed\n\noptions:\n  -h, --help            show this help message and exit\n  -o OUTPUT, --output OUTPUT\n                        Output file\n  -s SIZE, --size SIZE  Stage size in pixels [default: 1920x1080]\n  -rb RESERVE_BLANK, --reserve-blank RESERVE_BLANK\n                        Reserve blank on the bottom of the stage [default: 0]\n  -fn FONT, --font FONT\n                        Specify font face [default: sans-serif]\n  -fs FONTSIZE, --fontsize FONTSIZE\n                        Default font size [default: 25.0]\n  -a ALPHA, --alpha ALPHA\n                        Alpha [default: 1.0]\n  -dm DURATION_MARQUEE, --duration-marquee DURATION_MARQUEE\n                        Duration of scrolling comment display [default: 5.0]\n  -ds DURATION_STILL, --duration-still DURATION_STILL\n                        Duration of still comment display [default: 5.0]\n  -fl FILTER, --filter FILTER\n                        Regular expression to filter comments\n  -r, --reduce          Reduce the amount of comments if stage is full\n  -v, --version         show program's version number and exit\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfrost0%2Fdanmakuc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfrost0%2Fdanmakuc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfrost0%2Fdanmakuc/lists"}