openbbq 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openbbq-0.0.1/LICENSE +201 -0
- openbbq-0.0.1/PKG-INFO +119 -0
- openbbq-0.0.1/README.md +85 -0
- openbbq-0.0.1/README.zh-CN.md +84 -0
- openbbq-0.0.1/docs/install-agent.md +99 -0
- openbbq-0.0.1/docs/install-agent.zh-CN.md +99 -0
- openbbq-0.0.1/docs/release.md +33 -0
- openbbq-0.0.1/docs/usage.md +155 -0
- openbbq-0.0.1/docs/usage.zh-CN.md +151 -0
- openbbq-0.0.1/pyproject.toml +74 -0
- openbbq-0.0.1/skills/openbbq-subtitles/SKILL.md +106 -0
- openbbq-0.0.1/src/openbbq/__init__.py +1 -0
- openbbq-0.0.1/src/openbbq/cli/__init__.py +48 -0
- openbbq-0.0.1/src/openbbq/cli/app.py +47 -0
- openbbq-0.0.1/src/openbbq/cli/commands/__init__.py +0 -0
- openbbq-0.0.1/src/openbbq/cli/commands/auth.py +97 -0
- openbbq-0.0.1/src/openbbq/cli/commands/burn.py +250 -0
- openbbq-0.0.1/src/openbbq/cli/commands/doctor.py +54 -0
- openbbq-0.0.1/src/openbbq/cli/commands/export.py +154 -0
- openbbq-0.0.1/src/openbbq/cli/commands/extract_audio.py +71 -0
- openbbq-0.0.1/src/openbbq/cli/commands/fetch.py +327 -0
- openbbq-0.0.1/src/openbbq/cli/commands/glossary.py +213 -0
- openbbq-0.0.1/src/openbbq/cli/commands/init.py +57 -0
- openbbq-0.0.1/src/openbbq/cli/commands/models.py +129 -0
- openbbq-0.0.1/src/openbbq/cli/commands/segment.py +136 -0
- openbbq-0.0.1/src/openbbq/cli/commands/status.py +90 -0
- openbbq-0.0.1/src/openbbq/cli/commands/transcribe.py +224 -0
- openbbq-0.0.1/src/openbbq/cli/commands/translate.py +169 -0
- openbbq-0.0.1/src/openbbq/cli/output.py +63 -0
- openbbq-0.0.1/src/openbbq/cli/results.py +26 -0
- openbbq-0.0.1/src/openbbq/core/__init__.py +0 -0
- openbbq-0.0.1/src/openbbq/core/asr/__init__.py +28 -0
- openbbq-0.0.1/src/openbbq/core/asr/base.py +68 -0
- openbbq-0.0.1/src/openbbq/core/asr/whispercpp.py +338 -0
- openbbq-0.0.1/src/openbbq/core/auth/__init__.py +5 -0
- openbbq-0.0.1/src/openbbq/core/auth/browser.py +244 -0
- openbbq-0.0.1/src/openbbq/core/auth/cookies.py +55 -0
- openbbq-0.0.1/src/openbbq/core/auth/sites.py +175 -0
- openbbq-0.0.1/src/openbbq/core/auth/store.py +160 -0
- openbbq-0.0.1/src/openbbq/core/doctor.py +153 -0
- openbbq-0.0.1/src/openbbq/core/export.py +441 -0
- openbbq-0.0.1/src/openbbq/core/fetch.py +334 -0
- openbbq-0.0.1/src/openbbq/core/glossary.py +245 -0
- openbbq-0.0.1/src/openbbq/core/media.py +310 -0
- openbbq-0.0.1/src/openbbq/core/models.py +43 -0
- openbbq-0.0.1/src/openbbq/core/segment.py +375 -0
- openbbq-0.0.1/src/openbbq/core/translate.py +169 -0
- openbbq-0.0.1/src/openbbq/core/workspace.py +299 -0
- openbbq-0.0.1/src/openbbq/errors.py +25 -0
- openbbq-0.0.1/src/openbbq/schemas/__init__.py +37 -0
- openbbq-0.0.1/src/openbbq/schemas/common.py +44 -0
- openbbq-0.0.1/src/openbbq/schemas/cues.py +53 -0
- openbbq-0.0.1/src/openbbq/schemas/glossary.py +34 -0
- openbbq-0.0.1/src/openbbq/schemas/manifest.py +42 -0
- openbbq-0.0.1/src/openbbq/schemas/transcript.py +40 -0
- openbbq-0.0.1/src/openbbq/schemas/translation.py +43 -0
openbbq-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
https://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 ACAne0320
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
openbbq-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openbbq
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Agent-friendly CLI for video translation and subtitle production.
|
|
5
|
+
Author: ACAne0320
|
|
6
|
+
Author-email: ACAne0320 <nyaashino@gmail.com>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Multimedia :: Video
|
|
15
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
16
|
+
Requires-Dist: pydantic>=2.13.4
|
|
17
|
+
Requires-Dist: rich>=15.0.0
|
|
18
|
+
Requires-Dist: typer>=0.26.7
|
|
19
|
+
Requires-Dist: yt-dlp>=2026.6.9
|
|
20
|
+
Requires-Dist: faster-whisper>=1.2.1 ; extra == 'faster-whisper'
|
|
21
|
+
Requires-Dist: mlx-whisper>=0.4.3 ; extra == 'mlx-whisper'
|
|
22
|
+
Requires-Dist: pywhispercpp>=1.5.0 ; extra == 'whispercpp'
|
|
23
|
+
Requires-Dist: whisperx>=3.8.6 ; extra == 'whisperx'
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Project-URL: Homepage, https://github.com/ACAne0320/OpenBBQ
|
|
26
|
+
Project-URL: Repository, https://github.com/ACAne0320/OpenBBQ
|
|
27
|
+
Project-URL: Issues, https://github.com/ACAne0320/OpenBBQ/issues
|
|
28
|
+
Project-URL: Documentation, https://github.com/ACAne0320/OpenBBQ/tree/main/docs
|
|
29
|
+
Provides-Extra: faster-whisper
|
|
30
|
+
Provides-Extra: mlx-whisper
|
|
31
|
+
Provides-Extra: whispercpp
|
|
32
|
+
Provides-Extra: whisperx
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# OpenBBQ
|
|
36
|
+
|
|
37
|
+
[中文说明](README.zh-CN.md) · [Usage Guide](docs/usage.md)
|
|
38
|
+
|
|
39
|
+
**OpenBBQ** is a command-line tool for agent-driven video translation and subtitle production.
|
|
40
|
+
|
|
41
|
+
OpenBBQ provides composable tools for video download, audio extraction, ASR transcription, segmentation, translation, review, subtitle export, and subtitle burning.
|
|
42
|
+
It does not force one fixed pipeline. The goal is to let an agent choose the right workflow for each task.
|
|
43
|
+
|
|
44
|
+
## Why OpenBBQ?
|
|
45
|
+
|
|
46
|
+
In Chinese fansub and creator communities, the process of translating and subtitling foreign-language videos is often called "barbecue".
|
|
47
|
+
Raw untranslated material is "raw meat"; the translated, subtitled result is "cooked meat".
|
|
48
|
+
|
|
49
|
+
OpenBBQ is meant to be an open-source, open subtitle translation platform.
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
## Requirements
|
|
54
|
+
|
|
55
|
+
- Python 3.12 or newer
|
|
56
|
+
- [uv](https://docs.astral.sh/uv/), used to install the `openbbq` command and manage Python dependencies
|
|
57
|
+
- [ffmpeg](https://www.ffmpeg.org/), used for video download, audio/video merging, audio extraction, and video burning; subtitle burning also needs FFmpeg with `libass` support
|
|
58
|
+
- An ASR backend. OpenBBQ currently supports [whisper.cpp](https://github.com/absadiki/pywhispercpp) through its Python binding
|
|
59
|
+
- An ASR model. Models are not downloaded with the package. After installation, run `openbbq models list`, then explicitly run `openbbq models pull ...`
|
|
60
|
+
- A local desktop browser if the video platform requires login, human verification, or a browser challenge
|
|
61
|
+
|
|
62
|
+
## For Agent
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
Read the [install guide](https://raw.githubusercontent.com/ACAne0320/OpenBBQ/main/docs/install-agent.md) and help me install [OpenBBQ](https://github.com/ACAne0320/OpenBBQ).
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Manual Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv tool install 'openbbq[whispercpp]'
|
|
72
|
+
openbbq doctor
|
|
73
|
+
openbbq models list
|
|
74
|
+
openbbq models pull large-v3-turbo
|
|
75
|
+
openbbq doctor
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Use
|
|
79
|
+
|
|
80
|
+
Human workflow:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
openbbq init --workspace workspaces/demo 'https://www.youtube.com/watch?v=...'
|
|
84
|
+
cd workspace/demo
|
|
85
|
+
openbbq fetch
|
|
86
|
+
openbbq extract-audio
|
|
87
|
+
openbbq transcribe --model large-v3-turbo --language en --gpu
|
|
88
|
+
openbbq segment
|
|
89
|
+
openbbq translate init zh
|
|
90
|
+
# fill in translations in workspaces/demo/translation.zh.json
|
|
91
|
+
openbbq translate check zh
|
|
92
|
+
openbbq export --to zh --mode bilingual --format ass --output out/zh.ass
|
|
93
|
+
openbbq burn
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Agent workflow:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
openbbq --json status --workspace workspaces/demo
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Agents should use `--json` and pass the workspace explicitly with `-w`.
|
|
103
|
+
For long-running tasks, poll the workspace state with `openbbq status`.
|
|
104
|
+
For subtitle tasks, follow `skills/openbbq-subtitles/SKILL.md`.
|
|
105
|
+
|
|
106
|
+
For local files, YouTube login, ASS presets, outputs, and command details, see
|
|
107
|
+
[docs/usage.md](docs/usage.md).
|
|
108
|
+
|
|
109
|
+
## Roadmap
|
|
110
|
+
|
|
111
|
+
[ ] Windows/Linux support
|
|
112
|
+
[ ] More ASR backends
|
|
113
|
+
[ ] More video platform authentication support
|
|
114
|
+
[ ] A visual translation step for people who want to translate manually
|
|
115
|
+
[ ] ...
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
openbbq-0.0.1/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# OpenBBQ
|
|
2
|
+
|
|
3
|
+
[中文说明](README.zh-CN.md) · [Usage Guide](docs/usage.md)
|
|
4
|
+
|
|
5
|
+
**OpenBBQ** is a command-line tool for agent-driven video translation and subtitle production.
|
|
6
|
+
|
|
7
|
+
OpenBBQ provides composable tools for video download, audio extraction, ASR transcription, segmentation, translation, review, subtitle export, and subtitle burning.
|
|
8
|
+
It does not force one fixed pipeline. The goal is to let an agent choose the right workflow for each task.
|
|
9
|
+
|
|
10
|
+
## Why OpenBBQ?
|
|
11
|
+
|
|
12
|
+
In Chinese fansub and creator communities, the process of translating and subtitling foreign-language videos is often called "barbecue".
|
|
13
|
+
Raw untranslated material is "raw meat"; the translated, subtitled result is "cooked meat".
|
|
14
|
+
|
|
15
|
+
OpenBBQ is meant to be an open-source, open subtitle translation platform.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Python 3.12 or newer
|
|
22
|
+
- [uv](https://docs.astral.sh/uv/), used to install the `openbbq` command and manage Python dependencies
|
|
23
|
+
- [ffmpeg](https://www.ffmpeg.org/), used for video download, audio/video merging, audio extraction, and video burning; subtitle burning also needs FFmpeg with `libass` support
|
|
24
|
+
- An ASR backend. OpenBBQ currently supports [whisper.cpp](https://github.com/absadiki/pywhispercpp) through its Python binding
|
|
25
|
+
- An ASR model. Models are not downloaded with the package. After installation, run `openbbq models list`, then explicitly run `openbbq models pull ...`
|
|
26
|
+
- A local desktop browser if the video platform requires login, human verification, or a browser challenge
|
|
27
|
+
|
|
28
|
+
## For Agent
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
Read the [install guide](https://raw.githubusercontent.com/ACAne0320/OpenBBQ/main/docs/install-agent.md) and help me install [OpenBBQ](https://github.com/ACAne0320/OpenBBQ).
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Manual Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv tool install 'openbbq[whispercpp]'
|
|
38
|
+
openbbq doctor
|
|
39
|
+
openbbq models list
|
|
40
|
+
openbbq models pull large-v3-turbo
|
|
41
|
+
openbbq doctor
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Use
|
|
45
|
+
|
|
46
|
+
Human workflow:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
openbbq init --workspace workspaces/demo 'https://www.youtube.com/watch?v=...'
|
|
50
|
+
cd workspace/demo
|
|
51
|
+
openbbq fetch
|
|
52
|
+
openbbq extract-audio
|
|
53
|
+
openbbq transcribe --model large-v3-turbo --language en --gpu
|
|
54
|
+
openbbq segment
|
|
55
|
+
openbbq translate init zh
|
|
56
|
+
# fill in translations in workspaces/demo/translation.zh.json
|
|
57
|
+
openbbq translate check zh
|
|
58
|
+
openbbq export --to zh --mode bilingual --format ass --output out/zh.ass
|
|
59
|
+
openbbq burn
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Agent workflow:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
openbbq --json status --workspace workspaces/demo
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Agents should use `--json` and pass the workspace explicitly with `-w`.
|
|
69
|
+
For long-running tasks, poll the workspace state with `openbbq status`.
|
|
70
|
+
For subtitle tasks, follow `skills/openbbq-subtitles/SKILL.md`.
|
|
71
|
+
|
|
72
|
+
For local files, YouTube login, ASS presets, outputs, and command details, see
|
|
73
|
+
[docs/usage.md](docs/usage.md).
|
|
74
|
+
|
|
75
|
+
## Roadmap
|
|
76
|
+
|
|
77
|
+
[ ] Windows/Linux support
|
|
78
|
+
[ ] More ASR backends
|
|
79
|
+
[ ] More video platform authentication support
|
|
80
|
+
[ ] A visual translation step for people who want to translate manually
|
|
81
|
+
[ ] ...
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# OpenBBQ
|
|
2
|
+
|
|
3
|
+
[English README](README.md) · [使用指南](docs/usage.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
**OpenBBQ** 是一个专为智能体(Agent)设计的用于视频翻译和字幕制作的命令行工具。
|
|
6
|
+
|
|
7
|
+
OpenBBQ 提供了一系列可组合的工具,涵盖视频下载、音频提取、ASR 转录、分段、翻译、校对、字幕导出以及烧录字幕等环节。
|
|
8
|
+
不强制采用固定的处理流程,而是更希望 Agent 根据用户的不同目标,灵活制定最合适的工作流程。
|
|
9
|
+
|
|
10
|
+
## Why OpenBBQ?
|
|
11
|
+
|
|
12
|
+
在中国字幕组和创作者社群中,翻译并制作外语视频字幕的过程通常被称为“烤肉”。
|
|
13
|
+
未经翻译的原始素材通常被称作“生肉”,而经过翻译和添加字幕的成品则变成了“熟肉”。
|
|
14
|
+
|
|
15
|
+
所以 OpenBBQ 的愿景是,做一个开源、开放的字幕翻译平台。
|
|
16
|
+
|
|
17
|
+
## 快速开始
|
|
18
|
+
|
|
19
|
+
## 前置条件
|
|
20
|
+
|
|
21
|
+
- Python 3.12 或更新版本
|
|
22
|
+
- [uv](https://docs.astral.sh/uv/),用于安装 `openbbq` 命令和管理 Python 依赖
|
|
23
|
+
- [ffmpeg](https://www.ffmpeg.org/),用于下载视频、合并音视频、抽取音频和视频烧录;如果有烧录字幕的需求,FFmpeg 还需要 `libass` 支持
|
|
24
|
+
- 一个 ASR 后端,目前仅支持 [whisper.cpp](https://github.com/absadiki/pywhispercpp) (Python Binding)
|
|
25
|
+
- 一个 ASR 模型,模型不随安装包一起下载,安装后用 `openbbq models list` 查看可用档位,再显式执行 `openbbq models pull ...`。
|
|
26
|
+
- 如果需要下载的视频平台要求登录、人机验证或浏览器挑战,需要本机桌面浏览器;
|
|
27
|
+
|
|
28
|
+
## For Agent
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
查看[安装指南](https://raw.githubusercontent.com/ACAne0320/OpenBBQ/main/docs/install-agent.zh-CN.md),帮我安装[OpenBBQ](https://github.com/ACAne0320/OpenBBQ)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 手动安装
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv tool install 'openbbq[whispercpp]'
|
|
38
|
+
openbbq doctor
|
|
39
|
+
openbbq models list
|
|
40
|
+
openbbq models pull large-v3-turbo
|
|
41
|
+
openbbq doctor
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 使用
|
|
45
|
+
|
|
46
|
+
Human 工作流:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
openbbq init --workspace workspaces/demo 'https://www.youtube.com/watch?v=...'
|
|
50
|
+
cd workspace/demo
|
|
51
|
+
openbbq fetch
|
|
52
|
+
openbbq extract-audio
|
|
53
|
+
openbbq transcribe --model large-v3-turbo --language en --gpu
|
|
54
|
+
openbbq segment
|
|
55
|
+
openbbq translate init zh
|
|
56
|
+
# 在 workspaces/demo/translation.zh.json 中填写翻译内容
|
|
57
|
+
openbbq translate check zh
|
|
58
|
+
openbbq export --to zh --mode bilingual --format ass --output out/zh.ass
|
|
59
|
+
openbbq burn
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Agent 工作流:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
openbbq --json status --workspace workspaces/demo
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Agent 通常使用 `--json`,并且使用 `-w` 显式指明 workspace
|
|
69
|
+
当进行长任务时,使用 `openbbq status` 轮询工作空间状态
|
|
70
|
+
在具体的字幕任务中参考 `skills/openbbq-subtitles/SKILL.md` 中的使用方法
|
|
71
|
+
|
|
72
|
+
本地文件流程、YouTube 登录、ASS 预设、输出文件和完整命令说明见
|
|
73
|
+
[docs/usage.zh-CN.md](docs/usage.zh-CN.md)。
|
|
74
|
+
|
|
75
|
+
## 路线图
|
|
76
|
+
[ ] Windows/Linux 支持
|
|
77
|
+
[ ] 更多 ASR 后端支持
|
|
78
|
+
[ ] 更多视频平台鉴权支持
|
|
79
|
+
[ ] 可视化翻译步骤(给想自己翻译的人)
|
|
80
|
+
[ ] ...
|
|
81
|
+
|
|
82
|
+
## 许可证
|
|
83
|
+
|
|
84
|
+
Apache-2.0,见 [LICENSE](LICENSE)。
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# OpenBBQ Agent Install Playbook
|
|
2
|
+
|
|
3
|
+
This guide is for AI agents. The goal is to install OpenBBQ on the user's machine and only add the dependencies needed for the user's task.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
- Do not install system dependencies without asking.
|
|
8
|
+
- Do not download models without asking.
|
|
9
|
+
- Ask the questions that affect install size and install path first.
|
|
10
|
+
- Run `openbbq doctor --json`, then add only the missing pieces.
|
|
11
|
+
- Ask before installing system packages, downloading models, writing browser login state, or configuring API keys.
|
|
12
|
+
- Finish with a passing `openbbq doctor`.
|
|
13
|
+
|
|
14
|
+
## Ask First
|
|
15
|
+
|
|
16
|
+
Confirm these details before installing:
|
|
17
|
+
|
|
18
|
+
- Platform: macOS, Linux, or Windows.
|
|
19
|
+
- Input source: local video, local audio, YouTube, or another online video platform.
|
|
20
|
+
- Source language and target language.
|
|
21
|
+
- Model size: `base` for a quick preview, `large-v3` or `large-v3-turbo` for production subtitles.
|
|
22
|
+
- Whether the user needs hard-subtitle burning.
|
|
23
|
+
- Whether the user needs speaker diarization.
|
|
24
|
+
- Whether the user wants API translation.
|
|
25
|
+
- Whether the machine has a GPU, and roughly what kind: Apple Silicon, NVIDIA, AMD / Intel, or CPU only.
|
|
26
|
+
|
|
27
|
+
## Bootstrap
|
|
28
|
+
|
|
29
|
+
Prefer the published package:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv tool install openbbq
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the user has confirmed the default whisper.cpp backend:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install 'openbbq[whispercpp]'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use a local repository install only for development or before a package has been published:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv tool install '.[whispercpp]'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Check The Environment
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
openbbq doctor --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use the output to decide what is missing:
|
|
54
|
+
|
|
55
|
+
- Python must be 3.12 or newer.
|
|
56
|
+
- If FFmpeg is missing, install an FFmpeg build with `libass`. Hard-subtitle burning needs the `ass` and `subtitles` filters.
|
|
57
|
+
- If the ASR backend is missing, install `pywhispercpp` by default. macOS wheels usually include Metal support. NVIDIA / Vulkan routes may need local toolkits and source builds.
|
|
58
|
+
- If the model is missing, ask the user to confirm the model size, then run `openbbq models pull <model>`.
|
|
59
|
+
- If YouTube requires login or human verification, run `openbbq auth browser-login youtube`.
|
|
60
|
+
- If the user needs speaker diarization, install whisperX and confirm the Hugging Face token.
|
|
61
|
+
- If the user wants API translation, configure the provider key.
|
|
62
|
+
|
|
63
|
+
## Models
|
|
64
|
+
|
|
65
|
+
List model sizes and cache state:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
openbbq models list
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Quick preview:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
openbbq models pull base
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Production subtitles:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
openbbq models pull large-v3-turbo
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
If the user has trouble reaching Hugging Face, ask before using a mirror:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
HF_ENDPOINT=https://hf-mirror.com openbbq models pull large-v3-turbo
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Models are stored in OpenBBQ's global cache and reused across workspaces. They are not written into the video project directory.
|
|
90
|
+
|
|
91
|
+
## Finish
|
|
92
|
+
|
|
93
|
+
Run:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
openbbq doctor
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If the user needs subtitle burning, confirm that FFmpeg has both the `ass` and `subtitles` filters. Once the check passes, continue to the subtitle workflow.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# OpenBBQ Agent 安装 Playbook
|
|
2
|
+
|
|
3
|
+
这份说明给 AI Agent 使用。目标是把 OpenBBQ 装到用户本机,并且只补齐用户当前任务真正需要的依赖。
|
|
4
|
+
|
|
5
|
+
## 原则
|
|
6
|
+
|
|
7
|
+
- 不偷偷安装系统依赖,不偷偷下载模型。
|
|
8
|
+
- 先问清楚会影响下载量和安装方式的问题。
|
|
9
|
+
- 先跑 `openbbq doctor --json`,再根据结果只补缺失项。
|
|
10
|
+
- 安装系统包、下载模型、写入浏览器登录态、配置 API key 前,都先让用户确认。
|
|
11
|
+
- 最后以 `openbbq doctor` 通过作为安装完成的门槛。
|
|
12
|
+
|
|
13
|
+
## 先问用户
|
|
14
|
+
|
|
15
|
+
开始前确认这些信息:
|
|
16
|
+
|
|
17
|
+
- 平台:macOS、Linux 还是 Windows。
|
|
18
|
+
- 用户是否有[uv](https://docs.astral.sh/uv/)
|
|
19
|
+
- 主要输入来源:本地视频、本地音频,还是 YouTube / 其他在线视频。
|
|
20
|
+
- 源语言和目标语言。
|
|
21
|
+
- 模型档位:`base` 适合快速预览,`large-v3` 或 `large-v3-turbo` 适合正式字幕。
|
|
22
|
+
- 是否需要烧录硬字幕。
|
|
23
|
+
- 是否需要说话人分离。
|
|
24
|
+
- 是否需要调用 API 翻译。
|
|
25
|
+
- 本机是否有 GPU,以及大致类型:Apple Silicon、NVIDIA、AMD / Intel,或只用 CPU。
|
|
26
|
+
|
|
27
|
+
## Bootstrap
|
|
28
|
+
|
|
29
|
+
优先使用发布包:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv tool install openbbq
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
如果用户已经确认使用默认 whisper.cpp 后端,也可以直接安装 extra:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install 'openbbq[whispercpp]'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
基于本仓库开发时,才在仓库目录下安装本地版本:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv tool install '.[whispercpp]'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 检查环境
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
openbbq doctor --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
按输出补缺失项。常见项如下:
|
|
54
|
+
|
|
55
|
+
- Python 需要 3.12 或更新版本。
|
|
56
|
+
- 缺 FFmpeg 时,安装带 `libass` 的 FFmpeg。烧录硬字幕需要 `ass` 和 `subtitles` filter。
|
|
57
|
+
- 缺 ASR 后端时,默认补 `pywhispercpp`。macOS 通常可直接用 wheel 的 Metal 支持;NVIDIA / Vulkan 路线可能需要本机 toolkit 和源码编译。
|
|
58
|
+
- 缺模型时,先让用户确认模型大小,再执行 `openbbq models pull <model>`。
|
|
59
|
+
- YouTube 需要登录或人机验证时,执行 `openbbq auth browser-login youtube`。
|
|
60
|
+
- 如果用户要说话人分离,再安装 whisperX 并确认 Hugging Face token。
|
|
61
|
+
- 如果用户要 API 翻译,再配置对应 provider 的 key。
|
|
62
|
+
|
|
63
|
+
## 模型
|
|
64
|
+
|
|
65
|
+
先看可用档位和缓存状态:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
openbbq models list
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
快速预览:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
openbbq models pull base
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
正式字幕:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
openbbq models pull large-v3-turbo
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
如果用户网络访问 Hugging Face 不稳定,可以让用户确认后设置镜像:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
HF_ENDPOINT=https://hf-mirror.com openbbq models pull large-v3-turbo
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
模型放在 OpenBBQ 的全局缓存里,跨 workspace 复用,不写进视频项目目录。
|
|
90
|
+
|
|
91
|
+
## 完成检查
|
|
92
|
+
|
|
93
|
+
安装和模型下载完成后再跑:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
openbbq doctor
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
如果用户要烧录字幕,确认 FFmpeg 的 `ass` 和 `subtitles` filter 都可用。检查通过后,再进入具体字幕工作流。
|