video2agent 0.1.0__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.
- video2agent-0.1.0/.gitignore +89 -0
- video2agent-0.1.0/LICENSE +202 -0
- video2agent-0.1.0/PKG-INFO +208 -0
- video2agent-0.1.0/README.md +183 -0
- video2agent-0.1.0/THIRD_PARTY_LICENSES.md +34 -0
- video2agent-0.1.0/pyproject.toml +67 -0
- video2agent-0.1.0/skills/video2agent/SKILL.md +166 -0
- video2agent-0.1.0/skills/video2agent/references/commands.md +27 -0
- video2agent-0.1.0/skills/video2agent/references/dsh.md +39 -0
- video2agent-0.1.0/skills/video2agent/references/evidence.md +12 -0
- video2agent-0.1.0/skills/video2agent/references/visual-types.md +16 -0
- video2agent-0.1.0/src/video2agent/__init__.py +3 -0
- video2agent-0.1.0/src/video2agent/__main__.py +4 -0
- video2agent-0.1.0/src/video2agent/bench.py +53 -0
- video2agent-0.1.0/src/video2agent/bili_account.py +996 -0
- video2agent-0.1.0/src/video2agent/bili_auth.py +206 -0
- video2agent-0.1.0/src/video2agent/caption_verify.py +340 -0
- video2agent-0.1.0/src/video2agent/captions.py +437 -0
- video2agent-0.1.0/src/video2agent/cli.py +2031 -0
- video2agent-0.1.0/src/video2agent/cloud.py +554 -0
- video2agent-0.1.0/src/video2agent/compare.py +139 -0
- video2agent-0.1.0/src/video2agent/config.py +285 -0
- video2agent-0.1.0/src/video2agent/db.py +760 -0
- video2agent-0.1.0/src/video2agent/digest.py +266 -0
- video2agent-0.1.0/src/video2agent/discover.py +266 -0
- video2agent-0.1.0/src/video2agent/errors.py +8 -0
- video2agent-0.1.0/src/video2agent/export.py +307 -0
- video2agent-0.1.0/src/video2agent/lazy.py +37 -0
- video2agent-0.1.0/src/video2agent/links.py +228 -0
- video2agent-0.1.0/src/video2agent/local_models.py +254 -0
- video2agent-0.1.0/src/video2agent/media.py +543 -0
- video2agent-0.1.0/src/video2agent/net.py +60 -0
- video2agent-0.1.0/src/video2agent/perception.py +657 -0
- video2agent-0.1.0/src/video2agent/pipeline.py +4310 -0
- video2agent-0.1.0/src/video2agent/setup.py +44 -0
- video2agent-0.1.0/src/video2agent/sources.py +335 -0
- video2agent-0.1.0/src/video2agent/storage.py +293 -0
- video2agent-0.1.0/src/video2agent/text.py +667 -0
- video2agent-0.1.0/src/video2agent/util.py +324 -0
- video2agent-0.1.0/src/video2agent/visual.py +613 -0
- video2agent-0.1.0/src/video2agent/worker.py +75 -0
- video2agent-0.1.0/tests/fixtures/make_ci_fixture.py +45 -0
- video2agent-0.1.0/tests/fixtures/make_slides.py +48 -0
- video2agent-0.1.0/tests/test_analyze_failure_status.py +38 -0
- video2agent-0.1.0/tests/test_anchors_chapters.py +273 -0
- video2agent-0.1.0/tests/test_asr.py +23 -0
- video2agent-0.1.0/tests/test_audio_profile.py +94 -0
- video2agent-0.1.0/tests/test_b23_safety.py +45 -0
- video2agent-0.1.0/tests/test_bili_account.py +195 -0
- video2agent-0.1.0/tests/test_bili_auth.py +136 -0
- video2agent-0.1.0/tests/test_boundaries.py +266 -0
- video2agent-0.1.0/tests/test_bv_parsing.py +21 -0
- video2agent-0.1.0/tests/test_cache_policy.py +47 -0
- video2agent-0.1.0/tests/test_candidates.py +171 -0
- video2agent-0.1.0/tests/test_caption_choice.py +199 -0
- video2agent-0.1.0/tests/test_caption_verify.py +176 -0
- video2agent-0.1.0/tests/test_captions.py +156 -0
- video2agent-0.1.0/tests/test_cli.py +111 -0
- video2agent-0.1.0/tests/test_cloud.py +131 -0
- video2agent-0.1.0/tests/test_cloud_asr.py +65 -0
- video2agent-0.1.0/tests/test_cloud_corrupt.py +45 -0
- video2agent-0.1.0/tests/test_cloud_endpoint.py +68 -0
- video2agent-0.1.0/tests/test_cloud_guards.py +52 -0
- video2agent-0.1.0/tests/test_cloud_ocr_guided.py +72 -0
- video2agent-0.1.0/tests/test_compare.py +61 -0
- video2agent-0.1.0/tests/test_concurrency.py +89 -0
- video2agent-0.1.0/tests/test_config_persistence.py +26 -0
- video2agent-0.1.0/tests/test_confirm_guard.py +123 -0
- video2agent-0.1.0/tests/test_coverage_scale.py +27 -0
- video2agent-0.1.0/tests/test_crop.py +23 -0
- video2agent-0.1.0/tests/test_db.py +58 -0
- video2agent-0.1.0/tests/test_dense.py +43 -0
- video2agent-0.1.0/tests/test_digest.py +99 -0
- video2agent-0.1.0/tests/test_digest_integration.py +182 -0
- video2agent-0.1.0/tests/test_discover.py +17 -0
- video2agent-0.1.0/tests/test_discover_filters.py +131 -0
- video2agent-0.1.0/tests/test_download_retries.py +62 -0
- video2agent-0.1.0/tests/test_evidence_batch.py +50 -0
- video2agent-0.1.0/tests/test_frames_sheet.py +94 -0
- video2agent-0.1.0/tests/test_gc_safety.py +108 -0
- video2agent-0.1.0/tests/test_ingest_queue.py +155 -0
- video2agent-0.1.0/tests/test_job_sidecar.py +57 -0
- video2agent-0.1.0/tests/test_lazy_imports.py +24 -0
- video2agent-0.1.0/tests/test_links.py +125 -0
- video2agent-0.1.0/tests/test_literal_match.py +13 -0
- video2agent-0.1.0/tests/test_literal_version.py +14 -0
- video2agent-0.1.0/tests/test_local_models.py +102 -0
- video2agent-0.1.0/tests/test_media_batch.py +39 -0
- video2agent-0.1.0/tests/test_media_features.py +130 -0
- video2agent-0.1.0/tests/test_migration.py +55 -0
- video2agent-0.1.0/tests/test_net.py +46 -0
- video2agent-0.1.0/tests/test_netscape_cookie.py +25 -0
- video2agent-0.1.0/tests/test_no_window.py +19 -0
- video2agent-0.1.0/tests/test_ocr_dedupe.py +20 -0
- video2agent-0.1.0/tests/test_ocr_honesty.py +593 -0
- video2agent-0.1.0/tests/test_ocr_reliable.py +20 -0
- video2agent-0.1.0/tests/test_ocr_window.py +141 -0
- video2agent-0.1.0/tests/test_perception.py +268 -0
- video2agent-0.1.0/tests/test_pipeline.py +20 -0
- video2agent-0.1.0/tests/test_plugin_campaign.mjs +157 -0
- video2agent-0.1.0/tests/test_plugin_card.mjs +1242 -0
- video2agent-0.1.0/tests/test_plugin_dock_state.mjs +736 -0
- video2agent-0.1.0/tests/test_plugin_host_settings.mjs +1133 -0
- video2agent-0.1.0/tests/test_plugin_manifest.mjs +139 -0
- video2agent-0.1.0/tests/test_privacy.py +131 -0
- video2agent-0.1.0/tests/test_reconcile_queued.py +44 -0
- video2agent-0.1.0/tests/test_resolve.py +83 -0
- video2agent-0.1.0/tests/test_round_fixes.py +90 -0
- video2agent-0.1.0/tests/test_search_compact.py +34 -0
- video2agent-0.1.0/tests/test_search_exact.py +39 -0
- video2agent-0.1.0/tests/test_search_quality.py +406 -0
- video2agent-0.1.0/tests/test_search_ready_filter.py +218 -0
- video2agent-0.1.0/tests/test_search_variants.py +41 -0
- video2agent-0.1.0/tests/test_ssrf_redirect.py +36 -0
- video2agent-0.1.0/tests/test_storage.py +99 -0
- video2agent-0.1.0/tests/test_text.py +132 -0
- video2agent-0.1.0/tests/test_timestamp_search.py +28 -0
- video2agent-0.1.0/tests/test_token_log.py +30 -0
- video2agent-0.1.0/tests/test_video_ref.py +53 -0
- video2agent-0.1.0/tests/test_video_search.py +55 -0
- video2agent-0.1.0/tests/test_visual.py +152 -0
- video2agent-0.1.0/tests/test_worker.py +60 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.venv/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.coverage
|
|
10
|
+
htmlcov/
|
|
11
|
+
.video2agent/
|
|
12
|
+
.dsh/
|
|
13
|
+
.testhome*/
|
|
14
|
+
.testvenv/
|
|
15
|
+
.models/
|
|
16
|
+
.tmp_plugin_ref/
|
|
17
|
+
research_readmes/
|
|
18
|
+
research_*.json
|
|
19
|
+
scripts/bili_probe*.py
|
|
20
|
+
tests/fixtures/*.mp4
|
|
21
|
+
tests/fixtures/*.wav
|
|
22
|
+
tests/fixtures/*.srt
|
|
23
|
+
tests/fixtures/*.png
|
|
24
|
+
docs/card-shot.json
|
|
25
|
+
docs/report-shot.json
|
|
26
|
+
*.mp4
|
|
27
|
+
*.mkv
|
|
28
|
+
*.mov
|
|
29
|
+
*.webm
|
|
30
|
+
*.wav
|
|
31
|
+
*.mp3
|
|
32
|
+
.DS_Store
|
|
33
|
+
temp/
|
|
34
|
+
_out/
|
|
35
|
+
.tmp_*
|
|
36
|
+
notes/
|
|
37
|
+
pac3_menu/
|
|
38
|
+
素材/
|
|
39
|
+
# Local scratch, promo homes and internal reports
|
|
40
|
+
.promo/
|
|
41
|
+
.tmp-*
|
|
42
|
+
docs/*REPORT*
|
|
43
|
+
docs/report-shot.png
|
|
44
|
+
/PLAN.md
|
|
45
|
+
/AGENTS.md
|
|
46
|
+
/docs/AWESOME-ENTRY.yml
|
|
47
|
+
/docs/COMPETITORS.md
|
|
48
|
+
/docs/DEVLOG.md
|
|
49
|
+
/docs/LAUNCH.md
|
|
50
|
+
/docs/MARKETPLACE.md
|
|
51
|
+
/docs/NAMING.md
|
|
52
|
+
/docs/PUBLISH.md
|
|
53
|
+
/docs/RELEASE.md
|
|
54
|
+
/docs/USER-SIM.md
|
|
55
|
+
/docs/ui-card-spec.md
|
|
56
|
+
.ux/
|
|
57
|
+
|
|
58
|
+
# Internal notes, debug shots, author tooling and benchmark run data stay local:
|
|
59
|
+
# they are development residue, not part of the product a user installs.
|
|
60
|
+
/docs/preview/
|
|
61
|
+
/docs/demo.mp4
|
|
62
|
+
/docs/live-shot.png
|
|
63
|
+
/docs/queue-before-after.png
|
|
64
|
+
/docs/ring-motion.gif
|
|
65
|
+
/docs/settings-local-models.png
|
|
66
|
+
/docs/terminal-receipt-shot.png
|
|
67
|
+
/docs/assets/hero-preview.png
|
|
68
|
+
/docs/assets/banner.svg
|
|
69
|
+
/docs/assets/bench-ab.png
|
|
70
|
+
/docs/assets/demo/poster.png
|
|
71
|
+
/docs/assets/slide1.png
|
|
72
|
+
/docs/assets/slide2.png
|
|
73
|
+
/docs/assets/slide3.png
|
|
74
|
+
/docs/COST.md
|
|
75
|
+
/docs/HEURISTICS.md
|
|
76
|
+
/docs/INDEX-QUALITY.md
|
|
77
|
+
/docs/PERCEPTION.md
|
|
78
|
+
/docs/RELEASE-NOTES-0.1.0.md
|
|
79
|
+
/bench/
|
|
80
|
+
/scripts/build-public-tree.ps1
|
|
81
|
+
/scripts/dsh-isolated.ps1
|
|
82
|
+
/scripts/backup-home.ps1
|
|
83
|
+
/scripts/clean-profile-artifacts.ps1
|
|
84
|
+
/scripts/session-inventory.py
|
|
85
|
+
/scripts/session-headers.py
|
|
86
|
+
/scripts/verify-release.ps1
|
|
87
|
+
/scripts/render-demo.py
|
|
88
|
+
/scripts/demo.ps1
|
|
89
|
+
/scripts/bench-cli.mjs
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: video2agent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Video search and understanding for AI agents: transcript, scenes, on-screen text, frames.
|
|
5
|
+
Project-URL: Repository, https://github.com/Harm0ny-AI/DSH-Video2Agent
|
|
6
|
+
Project-URL: Homepage, https://github.com/Harm0ny-AI/DSH-Video2Agent#readme
|
|
7
|
+
Project-URL: Issues, https://github.com/Harm0ny-AI/DSH-Video2Agent/issues
|
|
8
|
+
Author: DSH-Video2Agent contributors
|
|
9
|
+
License: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent,asr,bilibili,dsh,ocr,retrieval,search,timestamps,video
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Requires-Dist: faster-whisper>=1.0
|
|
14
|
+
Requires-Dist: numpy>=1.26
|
|
15
|
+
Requires-Dist: opencv-python-headless>=4.9
|
|
16
|
+
Requires-Dist: pillow>=10.0
|
|
17
|
+
Requires-Dist: rapidocr-onnxruntime>=1.3
|
|
18
|
+
Requires-Dist: requests>=2.31
|
|
19
|
+
Requires-Dist: yt-dlp>=2026.10.21
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
22
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
<p align="right">
|
|
27
|
+
<a href="https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/README.en.md">English</a> · <b>简体中文</b>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="https://raw.githubusercontent.com/Harm0ny-AI/DSH-Video2Agent/main/docs/assets/hero-brand.svg" alt="Video2Agent — 让 AI Agent 看懂视频,DSH 插件 dsh-video2agent" width="100%">
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<a href="https://github.com/Harm0ny-AI/DSH-Video2Agent/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Harm0ny-AI/DSH-Video2Agent/actions/workflows/ci.yml/badge.svg"></a>
|
|
36
|
+
<a href="https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-6ee7b7"></a>
|
|
37
|
+
<img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-3776ab">
|
|
38
|
+
<a href="https://github.com/topics/dsh-plugin"><img alt="DSH plugin" src="https://img.shields.io/badge/DSH-plugin-60a5fa"></a>
|
|
39
|
+
<img alt="Local-first" src="https://img.shields.io/badge/local--first-8b5cf6">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<h1 align="center">你的 Agent 浏览了无数网页<br>现在该让它看视频了</h1>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<b>Video2Agent 让 AI Agent 看懂视频、直接回答。</b><br>
|
|
46
|
+
B 站和本地视频都能问:讲了什么、哪条更好、值不值得看。
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<a href="#更快更全面更省">实测</a> ·
|
|
51
|
+
<a href="#快速开始">快速开始</a> ·
|
|
52
|
+
<a href="#它能做什么">它能做什么</a> ·
|
|
53
|
+
<a href="#工作原理">工作原理</a> ·
|
|
54
|
+
<a href="#文档">文档</a> ·
|
|
55
|
+
<a href="#插件市场">插件市场</a>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://raw.githubusercontent.com/Harm0ny-AI/DSH-Video2Agent/main/docs/assets/demo/video2agent-demo.gif" alt="真实 DSH 录制:视频输入、处理、回答" width="860">
|
|
60
|
+
<br>
|
|
61
|
+
<sub>实录;等待部分已压缩。</sub>
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
<p align="center"><sub><b>1 找视频</b> → <b>2 处理</b> → <b>3 回答</b></sub></p>
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 更快、更全面、更省
|
|
69
|
+
|
|
70
|
+
一条视频:**2m09s** 做出 8 行速查表 + 6 张原片截图;走网页要 **2m26s**。信息源 **4 类**,纯文字只有 **1 类**;比视频大模型少 **~99%** tokens。
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
## Video-MME 排行
|
|
75
|
+
|
|
76
|
+
在 [llm-stats](https://llm-stats.com/benchmarks/video-mme) 2026-11 的 Video-MME 全量榜(2,700 题)上,橙色那行是 **Video2Agent\* 87.8**(4.1 Flash Max),与前沿模型同榜;\* 表示 [90 题子集](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/BENCH-VIDEOMME.md)。
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
## 它能做什么
|
|
81
|
+
|
|
82
|
+
### 1. 检索网络视频
|
|
83
|
+
|
|
84
|
+
在 B 站按关键词找片,按 UP 主、发布时间筛选;也可以直接贴 BV、av 或 b23 链接,先看标题、封面、时长,再决定要不要处理。
|
|
85
|
+
|
|
86
|
+
### 2. 批量处理视频
|
|
87
|
+
|
|
88
|
+
本地文件或链接都能处理:先读视频信息,再走 CC/AI 字幕或 ASR,切镜头、抽取关键画面、做 OCR,最后把转写、画面文字、场景和关键画面存到本地。一次一批 1–10 条;之后问答、对比、整理都直接查这份内容,长视频也不用整段重看。
|
|
89
|
+
|
|
90
|
+
### 3. 获得全面视频理解
|
|
91
|
+
|
|
92
|
+
插件给出的不只是转写,而是转写、画面文字、场景结构、关键画面和运动信息。Agent 可以据此回答视频里的问题、比较多条视频,或者把内容整理成步骤、结论和可用的建议。
|
|
93
|
+
|
|
94
|
+
- **长电影、长课程**:先看结构和关键内容,再决定要不要深入,不用从头看到尾。
|
|
95
|
+
- **UI 动效、操作录屏**:看切镜、运动和界面变化,帮开发定位交互、动效和实现问题。
|
|
96
|
+
- **教程、评测、访谈**:把步骤、参数、观点和结论抽出来,多条视频放在一起对比。
|
|
97
|
+
|
|
98
|
+
### 4. 管理 B 站收藏夹
|
|
99
|
+
|
|
100
|
+
扫码登录后,能看收藏夹、历史、文件夹,统计时长、UP 主和未看完,按 UP 主生成分类草案。DSH 里的 `account` 工具只读;真正整理文件夹、批量分类,回 CLI 加 `--confirm` 才动手,Cookie 只留在本地。
|
|
101
|
+
|
|
102
|
+
## 快速开始
|
|
103
|
+
|
|
104
|
+
**环境:** Python 3.11+、FFmpeg(在 `PATH` 中),以及 DSH(用插件界面时需要)。
|
|
105
|
+
视频没有字幕时,才需要语音模型(`small` 约 464 MB)。
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git clone https://github.com/Harm0ny-AI/DSH-Video2Agent.git
|
|
109
|
+
cd DSH-Video2Agent
|
|
110
|
+
|
|
111
|
+
python -m venv .venv
|
|
112
|
+
# Windows: .venv\Scripts\activate macOS/Linux: source .venv/bin/activate
|
|
113
|
+
pip install -e .
|
|
114
|
+
|
|
115
|
+
video2agent setup # 把 Skill 安装到 ~/.dsh/skills
|
|
116
|
+
video2agent doctor
|
|
117
|
+
video2agent ingest ./your-video.mp4 # 或 B 站链接
|
|
118
|
+
video2agent list
|
|
119
|
+
video2agent search "what you remember"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
从当前仓库安装 DSH 插件:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
dsh plugin --profile web add ./packages/dsh-video2agent
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
然后重启或重新加载 DSH。插件会注册 `video2agent` 工具和 `/video` 命令;`video2agent setup` 装好的 Skill 会告诉模型先调什么、引用怎么写。
|
|
129
|
+
|
|
130
|
+
## 工作原理
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
sequenceDiagram
|
|
134
|
+
autonumber
|
|
135
|
+
participant A as Agent
|
|
136
|
+
participant V as video2agent
|
|
137
|
+
participant D as SQLite + FTS5
|
|
138
|
+
Note over V: 先把视频入库:探测 → 字幕/ASR → 场景 → 采样帧 → OCR → 视觉片段
|
|
139
|
+
A->>V: search / digest / transcript
|
|
140
|
+
V->>D: 查 FTS5 和已入库片段
|
|
141
|
+
D-->>V: 文字结果
|
|
142
|
+
V-->>A: 文字 + 时间码
|
|
143
|
+
opt 需要核对时
|
|
144
|
+
A->>V: evidence / frames
|
|
145
|
+
V->>V: 取同一时刻的画面 + OCR/转写
|
|
146
|
+
V-->>A: 画面 + 文字 + 时间码
|
|
147
|
+
end
|
|
148
|
+
A-->>A: 带引用的回答
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**设计规则**
|
|
152
|
+
|
|
153
|
+
- **先文字,后画面。** 搜索只返回文字;只有需要核对某句话时,`evidence` 才取图,而且图和文字一定来自同一帧。
|
|
154
|
+
- **边界明确,不把未知当零。** 时间码超过视频结尾,会直接报错并给出处理建议;OCR 读取失败就是“未知”,不是“没有文字”;没读过的 OCR 保持 `pending`/`partial`/`failed`,绝不写成 0。
|
|
155
|
+
- **默认本地处理,但不等于离线。** 本地 ASR/OCR 都在这台机器上跑;`evidence` 取到的画面和文字会交给宿主模型,所以用云端模型时,它们会离开本机。云端 ASR/OCR 可以单独开启,用你自己的服务商密钥;设置页会写清楚哪些内容会发出去。
|
|
156
|
+
- **上下文有上限。** `digest`/`transcript` 都是紧凑格式,图片有预算,读取有缓存,查得再久也不会把上下文塞满。
|
|
157
|
+
|
|
158
|
+
## 截图
|
|
159
|
+
|
|
160
|
+
| DSH 插件 | 批量任务 | 设置 |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
|  |  |  |
|
|
163
|
+
|
|
164
|
+
深色社交分享图和插件市场卡片在 [`docs/assets/`](https://github.com/Harm0ny-AI/DSH-Video2Agent/tree/main/docs/assets)。
|
|
165
|
+
|
|
166
|
+
## 文档
|
|
167
|
+
|
|
168
|
+
- [架构与设计约束](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/ARCHITECTURE.md)
|
|
169
|
+
- [基准方法与逐题结果](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/BENCH-VIDEOMME.md)
|
|
170
|
+
- [限制与已知问题](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/LIMITS.md)
|
|
171
|
+
- [插件基准:接口、延迟与轮询](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/PLUGIN-BENCH.md)
|
|
172
|
+
- [长视频实测](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/LONG-VIDEO-BENCH.md)
|
|
173
|
+
- [B 站字幕与登录](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/BILIBILI-SUBTITLES.md)
|
|
174
|
+
- [CLI 命令参考](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/docs/ARCHITECTURE.md) · `video2agent --help`
|
|
175
|
+
|
|
176
|
+
## 状态
|
|
177
|
+
|
|
178
|
+
- **0.1.0 候选版。** CLI 和 Skill 已经稳定;DSH 插件也在隔离环境里验证过。
|
|
179
|
+
- 默认在本地跑,不需要 GPU;云端可选。
|
|
180
|
+
- PyPI/npm 还没发布;插件市场条目已按 awesome 列表格式准备好。
|
|
181
|
+
- 已知限制:单字中文搜索、小字/低对比度文字的 OCR、跨镜头计数。
|
|
182
|
+
|
|
183
|
+
## 插件市场
|
|
184
|
+
|
|
185
|
+
原生 DSH 插件(`dsh.bundle` → `cordis.patch.yml`),已经按 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 的格式准备好条目。
|
|
186
|
+
|
|
187
|
+
- 分类:`vision`
|
|
188
|
+
- 安装入口:`video2agent` 工具 + `/video` 命令;CLI 是同一套引擎。
|
|
189
|
+
|
|
190
|
+
## 参与贡献
|
|
191
|
+
|
|
192
|
+
欢迎提交 Issue 和 PR。先看 `CONTRIBUTING.md`;改代码后请运行:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
python -m unittest discover -s tests -q
|
|
196
|
+
ruff check src tests --select E,F,I --ignore E501
|
|
197
|
+
node tests/test_plugin_card.mjs
|
|
198
|
+
node tests/test_plugin_manifest.mjs
|
|
199
|
+
node tests/test_plugin_host_settings.mjs
|
|
200
|
+
node tests/test_plugin_campaign.mjs
|
|
201
|
+
node tests/test_plugin_dock_state.mjs
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## 许可证
|
|
205
|
+
|
|
206
|
+
Apache-2.0。第三方声明见 [THIRD_PARTY_LICENSES.md](https://github.com/Harm0ny-AI/DSH-Video2Agent/blob/main/THIRD_PARTY_LICENSES.md)。
|
|
207
|
+
|
|
208
|
+
<p align="center"><sub>如果它帮你少拖了一次进度条,点个 ⭐ 能让更多 Agent 找到它。</sub></p>
|