Name | video_danmaku JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | A simple video danmaku processing tool that supports overlaying danmaku files onto videos. |
upload_time | 2024-12-03 02:33:44 |
maintainer | None |
docs_url | None |
author | 'fkl' |
requires_python | >=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Video Danmaku
一个简单的视频弹幕处理工具,支持将弹幕文件叠加到视频上。
## 功能特点
- 支持多种弹幕文件格式(JSON、ASS、SSA)
- 支持弹幕颜色和透明度设置
- 平滑的弹幕滚动效果
- 命令行界面,使用简单
## 安装
### 环境要求
- Python 3.10 或更高版本
### 安装步骤
使用 pip 安装:
```bash
pip install video_danmaku
```
## 使用方法
### 命令行使用
```bash
video-danmaku 输入视频路径 输出视频路径 弹幕文件路径
```
### 参数说明
- `输入视频路径`: 要处理的视频文件路径
- `输出视频路径`: 处理后的视频保存路径
- `弹幕文件路径`: 弹幕文件路径(支持 .json、.ass、.ssa 格式)
### 示例
```bash
# 使用 JSON 格式弹幕
video-danmaku input.mp4 output.mp4 danmaku.json
# 使用 ASS 格式弹幕
video-danmaku input.mp4 output.mp4 danmaku.ass
```
## 弹幕文件格式
### JSON 格式
```json
[
{
"text": "弹幕文本",
"time_stamp": 1.0,
"color": [255, 255, 255],
"alpha": 255
}
]
```
- `text`: 弹幕文本
- `time_stamp`: 出现时间(秒)
- `color`: RGB颜色值
- `alpha`: 透明度(0-255)
### ASS/SSA 格式
```plaintext
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:05.00,Default,,0,0,0,,弹幕文本
```
## 许可证
本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件
## 致谢
- OpenCV - 视频处理
- Pillow - 图像处理
- Typer - 命令行界面
```
Raw data
{
"_id": null,
"home_page": null,
"name": "video_danmaku",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "'fkl'",
"author_email": "18654198191@163.com",
"download_url": "https://files.pythonhosted.org/packages/a0/89/97bb9f429ca4a2218a43d99f70fe4066cff15856da81704388a53a5a905d/video_danmaku-0.1.1.tar.gz",
"platform": null,
"description": "# Video Danmaku\n\n\u4e00\u4e2a\u7b80\u5355\u7684\u89c6\u9891\u5f39\u5e55\u5904\u7406\u5de5\u5177\uff0c\u652f\u6301\u5c06\u5f39\u5e55\u6587\u4ef6\u53e0\u52a0\u5230\u89c6\u9891\u4e0a\u3002\n\n## \u529f\u80fd\u7279\u70b9\n\n- \u652f\u6301\u591a\u79cd\u5f39\u5e55\u6587\u4ef6\u683c\u5f0f\uff08JSON\u3001ASS\u3001SSA\uff09\n- \u652f\u6301\u5f39\u5e55\u989c\u8272\u548c\u900f\u660e\u5ea6\u8bbe\u7f6e\n- \u5e73\u6ed1\u7684\u5f39\u5e55\u6eda\u52a8\u6548\u679c\n- \u547d\u4ee4\u884c\u754c\u9762\uff0c\u4f7f\u7528\u7b80\u5355\n\n## \u5b89\u88c5\n\n### \u73af\u5883\u8981\u6c42\n\n- Python 3.10 \u6216\u66f4\u9ad8\u7248\u672c\n\n### \u5b89\u88c5\u6b65\u9aa4\n\n\u4f7f\u7528 pip \u5b89\u88c5\uff1a\n\n```bash\npip install video_danmaku\n```\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n### \u547d\u4ee4\u884c\u4f7f\u7528\n\n```bash\nvideo-danmaku \u8f93\u5165\u89c6\u9891\u8def\u5f84 \u8f93\u51fa\u89c6\u9891\u8def\u5f84 \u5f39\u5e55\u6587\u4ef6\u8def\u5f84\n```\n\n### \u53c2\u6570\u8bf4\u660e\n\n- `\u8f93\u5165\u89c6\u9891\u8def\u5f84`: \u8981\u5904\u7406\u7684\u89c6\u9891\u6587\u4ef6\u8def\u5f84\n- `\u8f93\u51fa\u89c6\u9891\u8def\u5f84`: \u5904\u7406\u540e\u7684\u89c6\u9891\u4fdd\u5b58\u8def\u5f84\n- `\u5f39\u5e55\u6587\u4ef6\u8def\u5f84`: \u5f39\u5e55\u6587\u4ef6\u8def\u5f84\uff08\u652f\u6301 .json\u3001.ass\u3001.ssa \u683c\u5f0f\uff09\n\n### \u793a\u4f8b\n\n```bash\n# \u4f7f\u7528 JSON \u683c\u5f0f\u5f39\u5e55\nvideo-danmaku input.mp4 output.mp4 danmaku.json\n\n# \u4f7f\u7528 ASS \u683c\u5f0f\u5f39\u5e55\nvideo-danmaku input.mp4 output.mp4 danmaku.ass\n```\n\n## \u5f39\u5e55\u6587\u4ef6\u683c\u5f0f\n\n### JSON \u683c\u5f0f\n\n```json\n[\n {\n \"text\": \"\u5f39\u5e55\u6587\u672c\",\n \"time_stamp\": 1.0,\n \"color\": [255, 255, 255],\n \"alpha\": 255\n }\n]\n```\n\n- `text`: \u5f39\u5e55\u6587\u672c\n- `time_stamp`: \u51fa\u73b0\u65f6\u95f4\uff08\u79d2\uff09\n- `color`: RGB\u989c\u8272\u503c\n- `alpha`: \u900f\u660e\u5ea6\uff080-255\uff09\n\n### ASS/SSA \u683c\u5f0f\n\n```plaintext\n[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\nDialogue: 0,0:00:01.00,0:00:05.00,Default,,0,0,0,,\u5f39\u5e55\u6587\u672c\n```\n\n\n## \u8bb8\u53ef\u8bc1\n\n\u672c\u9879\u76ee\u91c7\u7528 MIT \u8bb8\u53ef\u8bc1 - \u8be6\u89c1 [LICENSE](LICENSE) \u6587\u4ef6\n\n## \u81f4\u8c22\n\n- OpenCV - \u89c6\u9891\u5904\u7406\n- Pillow - \u56fe\u50cf\u5904\u7406\n- Typer - \u547d\u4ee4\u884c\u754c\u9762\n```\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple video danmaku processing tool that supports overlaying danmaku files onto videos.",
"version": "0.1.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97a13f23e5c4d776b52146739618da2336fbe611488772a32a30b50ab3ae8d0c",
"md5": "9d108490c13c47ba22949358ee3ecadc",
"sha256": "aa1d21f403e79cedfe1afa2c16724683f403ef395628ef6cd600d662f416b690"
},
"downloads": -1,
"filename": "video_danmaku-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9d108490c13c47ba22949358ee3ecadc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6772,
"upload_time": "2024-12-03T02:33:43",
"upload_time_iso_8601": "2024-12-03T02:33:43.023120Z",
"url": "https://files.pythonhosted.org/packages/97/a1/3f23e5c4d776b52146739618da2336fbe611488772a32a30b50ab3ae8d0c/video_danmaku-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a08997bb9f429ca4a2218a43d99f70fe4066cff15856da81704388a53a5a905d",
"md5": "19676c92bf6b3eca82029fd4ff44770c",
"sha256": "7310fca63eb77b101f80ee1a6bc641d646fc967739666d4732beec051de083b8"
},
"downloads": -1,
"filename": "video_danmaku-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "19676c92bf6b3eca82029fd4ff44770c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5844,
"upload_time": "2024-12-03T02:33:44",
"upload_time_iso_8601": "2024-12-03T02:33:44.687013Z",
"url": "https://files.pythonhosted.org/packages/a0/89/97bb9f429ca4a2218a43d99f70fe4066cff15856da81704388a53a5a905d/video_danmaku-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 02:33:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "video_danmaku"
}