vid2llm 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.
Files changed (42) hide show
  1. vid2llm-0.1.0/.gitignore +71 -0
  2. vid2llm-0.1.0/CHANGELOG.md +25 -0
  3. vid2llm-0.1.0/LICENSE +201 -0
  4. vid2llm-0.1.0/NOTICE +5 -0
  5. vid2llm-0.1.0/PKG-INFO +70 -0
  6. vid2llm-0.1.0/README.md +22 -0
  7. vid2llm-0.1.0/pyproject.toml +275 -0
  8. vid2llm-0.1.0/src/vid2llm/__init__.py +80 -0
  9. vid2llm-0.1.0/src/vid2llm/__main__.py +11 -0
  10. vid2llm-0.1.0/src/vid2llm/_version.py +24 -0
  11. vid2llm-0.1.0/src/vid2llm/backends/__init__.py +29 -0
  12. vid2llm-0.1.0/src/vid2llm/backends/base.py +85 -0
  13. vid2llm-0.1.0/src/vid2llm/backends/ffmpeg.py +250 -0
  14. vid2llm-0.1.0/src/vid2llm/backends/opencv.py +183 -0
  15. vid2llm-0.1.0/src/vid2llm/backends/pyav.py +213 -0
  16. vid2llm-0.1.0/src/vid2llm/cli.py +236 -0
  17. vid2llm-0.1.0/src/vid2llm/core/__init__.py +1 -0
  18. vid2llm-0.1.0/src/vid2llm/core/encoder.py +75 -0
  19. vid2llm-0.1.0/src/vid2llm/core/extractor.py +113 -0
  20. vid2llm-0.1.0/src/vid2llm/core/selector.py +140 -0
  21. vid2llm-0.1.0/src/vid2llm/core/types.py +155 -0
  22. vid2llm-0.1.0/src/vid2llm/exceptions.py +79 -0
  23. vid2llm-0.1.0/src/vid2llm/py.typed +0 -0
  24. vid2llm-0.1.0/tests/__init__.py +0 -0
  25. vid2llm-0.1.0/tests/conftest.py +65 -0
  26. vid2llm-0.1.0/tests/fixtures/__init__.py +1 -0
  27. vid2llm-0.1.0/tests/integration/__init__.py +0 -0
  28. vid2llm-0.1.0/tests/integration/test_extract_cli.py +75 -0
  29. vid2llm-0.1.0/tests/integration/test_extractor.py +81 -0
  30. vid2llm-0.1.0/tests/unit/__init__.py +0 -0
  31. vid2llm-0.1.0/tests/unit/backends/__init__.py +0 -0
  32. vid2llm-0.1.0/tests/unit/backends/test_ffmpeg.py +104 -0
  33. vid2llm-0.1.0/tests/unit/backends/test_opencv.py +100 -0
  34. vid2llm-0.1.0/tests/unit/backends/test_protocol.py +47 -0
  35. vid2llm-0.1.0/tests/unit/backends/test_pyav.py +100 -0
  36. vid2llm-0.1.0/tests/unit/core/__init__.py +0 -0
  37. vid2llm-0.1.0/tests/unit/core/test_encoder.py +88 -0
  38. vid2llm-0.1.0/tests/unit/core/test_selector.py +77 -0
  39. vid2llm-0.1.0/tests/unit/core/test_types.py +105 -0
  40. vid2llm-0.1.0/tests/unit/test_cli.py +35 -0
  41. vid2llm-0.1.0/tests/unit/test_exceptions.py +45 -0
  42. vid2llm-0.1.0/tests/unit/test_smoke.py +28 -0
@@ -0,0 +1,71 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+
8
+ # Distribution / packaging
9
+ build/
10
+ dist/
11
+ *.egg-info/
12
+ *.egg
13
+ wheels/
14
+ sdist/
15
+ share/python-wheels/
16
+ MANIFEST
17
+
18
+ # Virtual environments
19
+ .venv/
20
+ venv/
21
+ env/
22
+ ENV/
23
+
24
+ # Test, coverage, type checker caches
25
+ .pytest_cache/
26
+ .mypy_cache/
27
+ .ruff_cache/
28
+ .tox/
29
+ .coverage
30
+ .coverage.*
31
+ htmlcov/
32
+ coverage.xml
33
+ *.cover
34
+ .hypothesis/
35
+
36
+ # uv
37
+ .python-version
38
+
39
+ # IDE and editors
40
+ .idea/
41
+ .vscode/
42
+ *.swp
43
+ *.swo
44
+ *~
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Environment variables and secrets
51
+ .env
52
+ .env.*
53
+ !.env.example
54
+
55
+ # Logs
56
+ *.log
57
+
58
+ # Documentation build
59
+ docs/_build/
60
+ site/
61
+
62
+ # Local user-generated frame extraction outputs (project-specific)
63
+ /frames/
64
+ /output/
65
+ *.mp4.frames/
66
+
67
+ # Auto-generated by hatch-vcs, do not commit
68
+ src/vid2llm/_version.py
69
+
70
+ # Claude Code local session data
71
+ .claude/
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Frame extraction orchestrator with streaming `extract_frames` and collecting `extract_to_list`.
13
+ - Frame to disk serialization supporting jpg, png, and webp via Pillow.
14
+ - Functional CLI with `extract` and `probe` commands.
15
+ - Three pluggable backends (opencv, pyav, ffmpeg) with automatic selection.
16
+
17
+ ### Changed
18
+
19
+ ### Deprecated
20
+
21
+ ### Removed
22
+
23
+ ### Fixed
24
+
25
+ ### Security
vid2llm-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://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 describing the origin of the Work and
141
+ 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 Leonardo Goncalves Sobral (Leovox Studios)
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
+ http://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.
vid2llm-0.1.0/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ vid2llm
2
+ Copyright 2026 Leonardo Gonçalves Sobral (Leovox Studios)
3
+
4
+ This product includes software developed by Leonardo Gonçalves Sobral
5
+ at Leovox Studios (https://leovox.studio).
vid2llm-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: vid2llm
3
+ Version: 0.1.0
4
+ Summary: Turn any video into LLM-ready frames. Smart sampling, scene detection, OCR, and SDK-ready output for modern multimodal language models.
5
+ Project-URL: Homepage, https://github.com/leozitogs/vid2llm
6
+ Project-URL: Documentation, https://github.com/leozitogs/vid2llm#readme
7
+ Project-URL: Repository, https://github.com/leozitogs/vid2llm
8
+ Project-URL: Issues, https://github.com/leozitogs/vid2llm/issues
9
+ Project-URL: Changelog, https://github.com/leozitogs/vid2llm/blob/main/CHANGELOG.md
10
+ Author-email: Leonardo Gonçalves Sobral <studiosleovox@gmail.com>
11
+ Maintainer-email: Leonardo Gonçalves Sobral <studiosleovox@gmail.com>
12
+ License-Expression: Apache-2.0
13
+ License-File: LICENSE
14
+ License-File: NOTICE
15
+ Keywords: ai-agents,computer-vision,frame-extraction,llm,multimodal,ocr,python,scene-detection,video,video-understanding
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: License :: OSI Approved :: Apache Software License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Topic :: Multimedia :: Video
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
29
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
+ Classifier: Typing :: Typed
31
+ Requires-Python: >=3.11
32
+ Requires-Dist: numpy>=2.0.0
33
+ Requires-Dist: pillow>=10.0.0
34
+ Requires-Dist: rich>=13.9.0
35
+ Requires-Dist: typer>=0.15.0
36
+ Provides-Extra: all
37
+ Requires-Dist: av<14.0,>=12.0.0; extra == 'all'
38
+ Requires-Dist: opencv-python<5.0,>=4.9.0; extra == 'all'
39
+ Provides-Extra: cv
40
+ Requires-Dist: opencv-python<5.0,>=4.9.0; extra == 'cv'
41
+ Provides-Extra: detection
42
+ Provides-Extra: ffmpeg
43
+ Provides-Extra: ocr
44
+ Provides-Extra: providers
45
+ Provides-Extra: pyav
46
+ Requires-Dist: av<14.0,>=12.0.0; extra == 'pyav'
47
+ Description-Content-Type: text/markdown
48
+
49
+ # vid2llm
50
+
51
+ > Turn any video into LLM-ready frames. Smart sampling, scene detection, OCR, and SDK-ready output for Claude, GPT-4o, and Gemini.
52
+
53
+ **Status:** Pre-release, not yet on PyPI.
54
+
55
+ ![License](https://img.shields.io/badge/license-Apache--2.0-blue)
56
+
57
+ This repository is in Phase 0 (Foundation). The public API, CLI, and documentation are not yet implemented.
58
+
59
+ ## Documents
60
+
61
+ - [Project brief](PROJECT_BRIEF.md)
62
+ - [Engineering standards](ENGINEERING_STANDARDS.md)
63
+ - [Changelog](CHANGELOG.md)
64
+ - [Contributing](CONTRIBUTING.md)
65
+ - [Code of conduct](CODE_OF_CONDUCT.md)
66
+ - [Security policy](SECURITY.md)
67
+
68
+ ## License
69
+
70
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,22 @@
1
+ # vid2llm
2
+
3
+ > Turn any video into LLM-ready frames. Smart sampling, scene detection, OCR, and SDK-ready output for Claude, GPT-4o, and Gemini.
4
+
5
+ **Status:** Pre-release, not yet on PyPI.
6
+
7
+ ![License](https://img.shields.io/badge/license-Apache--2.0-blue)
8
+
9
+ This repository is in Phase 0 (Foundation). The public API, CLI, and documentation are not yet implemented.
10
+
11
+ ## Documents
12
+
13
+ - [Project brief](PROJECT_BRIEF.md)
14
+ - [Engineering standards](ENGINEERING_STANDARDS.md)
15
+ - [Changelog](CHANGELOG.md)
16
+ - [Contributing](CONTRIBUTING.md)
17
+ - [Code of conduct](CODE_OF_CONDUCT.md)
18
+ - [Security policy](SECURITY.md)
19
+
20
+ ## License
21
+
22
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,275 @@
1
+ # vid2llm project configuration.
2
+ # See https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
3
+ # Build backend: hatchling with hatch-vcs for git tag based versioning.
4
+
5
+ [build-system]
6
+ requires = ["hatchling>=1.27", "hatch-vcs>=0.4"]
7
+ build-backend = "hatchling.build"
8
+
9
+ # ---------------------------------------------------------------------------
10
+ # Project metadata (PEP 621)
11
+ # ---------------------------------------------------------------------------
12
+
13
+ [project]
14
+ name = "vid2llm"
15
+ dynamic = ["version"]
16
+ description = "Turn any video into LLM-ready frames. Smart sampling, scene detection, OCR, and SDK-ready output for modern multimodal language models."
17
+ readme = "README.md"
18
+ requires-python = ">=3.11"
19
+ license = "Apache-2.0"
20
+ license-files = ["LICENSE", "NOTICE"]
21
+ authors = [
22
+ { name = "Leonardo Gonçalves Sobral", email = "studiosleovox@gmail.com" },
23
+ ]
24
+ maintainers = [
25
+ { name = "Leonardo Gonçalves Sobral", email = "studiosleovox@gmail.com" },
26
+ ]
27
+ keywords = [
28
+ "video",
29
+ "llm",
30
+ "multimodal",
31
+ "frame-extraction",
32
+ "computer-vision",
33
+ "scene-detection",
34
+ "ocr",
35
+ "ai-agents",
36
+ "video-understanding",
37
+ "python",
38
+ ]
39
+ classifiers = [
40
+ "Development Status :: 3 - Alpha",
41
+ "Intended Audience :: Developers",
42
+ "Intended Audience :: Science/Research",
43
+ "License :: OSI Approved :: Apache Software License",
44
+ "Operating System :: OS Independent",
45
+ "Programming Language :: Python :: 3",
46
+ "Programming Language :: Python :: 3.11",
47
+ "Programming Language :: Python :: 3.12",
48
+ "Programming Language :: Python :: 3.13",
49
+ "Programming Language :: Python :: Implementation :: CPython",
50
+ "Topic :: Multimedia :: Video",
51
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
52
+ "Topic :: Scientific/Engineering :: Image Processing",
53
+ "Topic :: Software Development :: Libraries :: Python Modules",
54
+ "Typing :: Typed",
55
+ ]
56
+
57
+ # Runtime dependencies. Minimal core needed for the CLI to function.
58
+ # Feature dependencies (cv, pyav, ocr, etc.) live under optional-dependencies.
59
+ dependencies = [
60
+ # Image encoding for frame serialization (jpg, png, webp).
61
+ "pillow>=10.0.0",
62
+ # CLI framework. Type safe command parsing built on click.
63
+ "typer>=0.15.0",
64
+ # Terminal rendering for progress, tables, and styled CLI output.
65
+ "rich>=13.9.0",
66
+ # Core numerical array type used across the frame extraction contract.
67
+ "numpy>=2.0.0",
68
+ ]
69
+
70
+ [project.urls]
71
+ Homepage = "https://github.com/leozitogs/vid2llm"
72
+ Documentation = "https://github.com/leozitogs/vid2llm#readme"
73
+ Repository = "https://github.com/leozitogs/vid2llm"
74
+ Issues = "https://github.com/leozitogs/vid2llm/issues"
75
+ Changelog = "https://github.com/leozitogs/vid2llm/blob/main/CHANGELOG.md"
76
+
77
+ [project.scripts]
78
+ vid2llm = "vid2llm.cli:app"
79
+
80
+ # ---------------------------------------------------------------------------
81
+ # Optional dependency groups (PEP 621 optional-dependencies)
82
+ # Reserved for future phases. Each group activates a specific feature surface.
83
+ # ---------------------------------------------------------------------------
84
+
85
+ [project.optional-dependencies]
86
+ # OpenCV backend. Wraps the cv2 Python bindings for fast in-process decoding.
87
+ cv = ["opencv-python>=4.9.0,<5.0"]
88
+ # PyAV backend. Provides Pythonic access to FFmpeg libraries with precise timestamps.
89
+ pyav = ["av>=12.0.0,<14.0"]
90
+ # FFmpeg backend. Driven entirely by the ffmpeg binary, no Python dependency required.
91
+ ffmpeg = []
92
+ ocr = []
93
+ detection = []
94
+ providers = []
95
+ all = ["vid2llm[cv,pyav]"]
96
+
97
+ # ---------------------------------------------------------------------------
98
+ # Dependency groups (PEP 735)
99
+ # Used by `uv sync --group <name>` for local development.
100
+ # ---------------------------------------------------------------------------
101
+
102
+ [dependency-groups]
103
+ dev = [
104
+ "ruff>=0.8.4",
105
+ "mypy>=1.13.0",
106
+ "pre-commit>=4.0.0",
107
+ ]
108
+ test = [
109
+ "pytest>=8.3.0",
110
+ "pytest-cov>=6.0.0",
111
+ "pytest-xdist>=3.6.0",
112
+ ]
113
+ docs = []
114
+
115
+ # ---------------------------------------------------------------------------
116
+ # Hatch build configuration
117
+ # ---------------------------------------------------------------------------
118
+
119
+ [tool.hatch.version]
120
+ source = "vcs"
121
+ fallback-version = "0.0.0"
122
+
123
+ [tool.hatch.build.hooks.vcs]
124
+ version-file = "src/vid2llm/_version.py"
125
+
126
+ [tool.hatch.build.targets.wheel]
127
+ packages = ["src/vid2llm"]
128
+
129
+ [tool.hatch.build.targets.sdist]
130
+ include = [
131
+ "src/vid2llm",
132
+ "tests",
133
+ "LICENSE",
134
+ "NOTICE",
135
+ "README.md",
136
+ "CHANGELOG.md",
137
+ "pyproject.toml",
138
+ ]
139
+
140
+ # ---------------------------------------------------------------------------
141
+ # Ruff: formatter and linter
142
+ # ---------------------------------------------------------------------------
143
+
144
+ [tool.ruff]
145
+ line-length = 100
146
+ target-version = "py311"
147
+ src = ["src", "tests"]
148
+ extend-exclude = [
149
+ "src/vid2llm/_version.py",
150
+ ]
151
+
152
+ [tool.ruff.format]
153
+ quote-style = "double"
154
+ indent-style = "space"
155
+ line-ending = "lf"
156
+ docstring-code-format = true
157
+
158
+ [tool.ruff.lint]
159
+ select = [
160
+ "E", # pycodestyle errors
161
+ "W", # pycodestyle warnings
162
+ "F", # pyflakes
163
+ "I", # isort
164
+ "N", # pep8-naming
165
+ "D", # pydocstyle
166
+ "UP", # pyupgrade
167
+ "B", # flake8-bugbear
168
+ "A", # flake8-builtins
169
+ "C4", # flake8-comprehensions
170
+ "RET", # flake8-return
171
+ "SIM", # flake8-simplify
172
+ "TCH", # flake8-type-checking
173
+ "PTH", # flake8-use-pathlib
174
+ "RUF", # ruff-specific
175
+ ]
176
+ ignore = [
177
+ "D203", # one-blank-line-before-class (conflicts with D211)
178
+ "D213", # multi-line-summary-second-line (conflicts with D212)
179
+ ]
180
+
181
+ [tool.ruff.lint.per-file-ignores]
182
+ "tests/**/*.py" = ["D"]
183
+ "src/vid2llm/__init__.py" = ["D104"]
184
+ "src/vid2llm/__main__.py" = ["D"]
185
+ # Backends declare NDArray at the top level; moving to TYPE_CHECKING requires backend modifications.
186
+ "src/vid2llm/backends/*.py" = ["TC002"]
187
+ # Typer's standard pattern requires Argument/Option calls in function default expressions.
188
+ "src/vid2llm/cli.py" = ["B008"]
189
+
190
+ [tool.ruff.lint.pydocstyle]
191
+ convention = "google"
192
+
193
+ [tool.ruff.lint.isort]
194
+ known-first-party = ["vid2llm"]
195
+
196
+ # ---------------------------------------------------------------------------
197
+ # Mypy: strict type checking
198
+ # ---------------------------------------------------------------------------
199
+
200
+ [tool.mypy]
201
+ python_version = "3.11"
202
+ strict = true
203
+ warn_unused_configs = true
204
+ warn_redundant_casts = true
205
+ warn_unused_ignores = true
206
+ warn_return_any = true
207
+ warn_unreachable = true
208
+ disallow_untyped_decorators = true
209
+ no_implicit_reexport = true
210
+ show_error_codes = true
211
+ show_column_numbers = true
212
+ pretty = true
213
+ files = ["src", "tests"]
214
+ exclude = [
215
+ "src/vid2llm/_version.py",
216
+ ]
217
+
218
+ [[tool.mypy.overrides]]
219
+ module = "tests.*"
220
+ disallow_untyped_defs = false
221
+
222
+ # ---------------------------------------------------------------------------
223
+ # Pytest configuration
224
+ # ---------------------------------------------------------------------------
225
+
226
+ [tool.pytest.ini_options]
227
+ minversion = "8.0"
228
+ testpaths = ["tests"]
229
+ addopts = [
230
+ "-ra",
231
+ "--strict-markers",
232
+ "--strict-config",
233
+ "--showlocals",
234
+ "--tb=short",
235
+ "--cov=vid2llm",
236
+ "--cov-report=term-missing",
237
+ "--cov-report=xml",
238
+ ]
239
+ markers = [
240
+ "unit: fast tests that do not touch the file system or network",
241
+ "integration: slower tests that exercise the CLI or filesystem",
242
+ "slow: tests that take more than a second to run",
243
+ ]
244
+ filterwarnings = [
245
+ "error",
246
+ "ignore::DeprecationWarning:importlib.*",
247
+ ]
248
+
249
+ # ---------------------------------------------------------------------------
250
+ # Coverage configuration
251
+ # ---------------------------------------------------------------------------
252
+
253
+ [tool.coverage.run]
254
+ branch = true
255
+ source = ["vid2llm"]
256
+ omit = [
257
+ "src/vid2llm/_version.py",
258
+ "src/vid2llm/__main__.py",
259
+ ]
260
+
261
+ [tool.coverage.report]
262
+ exclude_lines = [
263
+ "pragma: no cover",
264
+ "raise NotImplementedError",
265
+ "if TYPE_CHECKING:",
266
+ "if __name__ == .__main__.:",
267
+ "\\.\\.\\.",
268
+ ]
269
+ fail_under = 80
270
+ show_missing = true
271
+ skip_covered = false
272
+ precision = 1
273
+
274
+ [tool.coverage.xml]
275
+ output = "coverage.xml"