vided 0.1.2__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.
- vided-0.1.2/.gitignore +25 -0
- vided-0.1.2/LICENSE +21 -0
- vided-0.1.2/PKG-INFO +492 -0
- vided-0.1.2/README.md +480 -0
- vided-0.1.2/pyproject.toml +58 -0
- vided-0.1.2/src/vided/__init__.py +84 -0
- vided-0.1.2/src/vided/__main__.py +4 -0
- vided-0.1.2/src/vided/cli.py +347 -0
- vided-0.1.2/src/vided/contact_sheet.py +257 -0
- vided-0.1.2/src/vided/data/__init__.py +1 -0
- vided-0.1.2/src/vided/data/silero_vad_16k_op15.onnx +0 -0
- vided-0.1.2/src/vided/errors.py +21 -0
- vided-0.1.2/src/vided/ffmpeg.py +200 -0
- vided-0.1.2/src/vided/filtergraph.py +107 -0
- vided-0.1.2/src/vided/frames.py +101 -0
- vided-0.1.2/src/vided/project.py +238 -0
- vided-0.1.2/src/vided/redactions.py +136 -0
- vided-0.1.2/src/vided/render.py +78 -0
- vided-0.1.2/src/vided/static/__init__.py +0 -0
- vided-0.1.2/src/vided/static/app.js +1368 -0
- vided-0.1.2/src/vided/static/index.html +121 -0
- vided-0.1.2/src/vided/static/styles.css +808 -0
- vided-0.1.2/src/vided/time_ranges.py +87 -0
- vided-0.1.2/src/vided/trimmer.py +932 -0
- vided-0.1.2/src/vided/ui_server.py +170 -0
- vided-0.1.2/src/vided/vad.py +495 -0
- vided-0.1.2/tests/conftest.py +117 -0
- vided-0.1.2/tests/fixtures/media/realistic-speech-gaps-short.LICENSE.md +16 -0
- vided-0.1.2/tests/fixtures/media/realistic-speech-gaps-short.mp4 +3 -0
- vided-0.1.2/tests/fixtures/media/realistic-speech-gaps.LICENSE.md +15 -0
- vided-0.1.2/tests/fixtures/media/realistic-speech-gaps.mp4 +3 -0
- vided-0.1.2/tests/helpers.py +136 -0
- vided-0.1.2/tests/test_cli.py +246 -0
- vided-0.1.2/tests/test_contact_sheet.py +146 -0
- vided-0.1.2/tests/test_e2e_browser.py +101 -0
- vided-0.1.2/tests/test_e2e_fixture.py +87 -0
- vided-0.1.2/tests/test_filtergraph.py +35 -0
- vided-0.1.2/tests/test_project.py +26 -0
- vided-0.1.2/tests/test_redactions.py +29 -0
- vided-0.1.2/tests/test_release_bump_check.py +165 -0
- vided-0.1.2/tests/test_time_ranges.py +66 -0
- vided-0.1.2/tests/test_trimmer.py +280 -0
- vided-0.1.2/tests/test_ui_server.py +56 -0
- vided-0.1.2/tests/test_vad.py +225 -0
- vided-0.1.2/uv.lock +815 -0
vided-0.1.2/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
.pytest_cache/
|
|
4
|
+
.ruff_cache/
|
|
5
|
+
.playwright-cli/
|
|
6
|
+
.scratch/
|
|
7
|
+
test-results/
|
|
8
|
+
*-after-edit.yaml
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
.DS_Store
|
|
13
|
+
|
|
14
|
+
# Example project/output folders
|
|
15
|
+
*.mp4
|
|
16
|
+
*.mov
|
|
17
|
+
*.mkv
|
|
18
|
+
*.webm
|
|
19
|
+
*.avi
|
|
20
|
+
*.m4v
|
|
21
|
+
|
|
22
|
+
# Tracked test media fixtures use Git LFS.
|
|
23
|
+
!tests/fixtures/media/*.mp4
|
|
24
|
+
|
|
25
|
+
docs/
|
vided-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vided contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
vided-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vided
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: A stupid-simple local video silence speeder and rectangular blur redactor.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: pillow>=10.1
|
|
9
|
+
Provides-Extra: vad
|
|
10
|
+
Requires-Dist: onnxruntime>=1.16.1; extra == 'vad'
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Vided
|
|
14
|
+
|
|
15
|
+
Vided is a small local tool for editing one screen recording at a time.
|
|
16
|
+
|
|
17
|
+
It can:
|
|
18
|
+
|
|
19
|
+
- cut short silent gaps
|
|
20
|
+
- speed up longer silent sections
|
|
21
|
+
- optionally mute sped-up silent sections
|
|
22
|
+
- generate thumbnails
|
|
23
|
+
- mark fixed rectangular blur regions in a browser UI
|
|
24
|
+
- render a debug preview with visible boxes
|
|
25
|
+
- render the final blurred video with `ffmpeg`
|
|
26
|
+
|
|
27
|
+
Everything is file-based and local. A project folder contains `project.json`,
|
|
28
|
+
`redactions.json`, generated thumbnails, generated filtergraphs, and rendered outputs.
|
|
29
|
+
|
|
30
|
+
## Best fit
|
|
31
|
+
|
|
32
|
+
Use Vided for mostly static screen recordings where the sensitive area stays in a
|
|
33
|
+
predictable part of the screen:
|
|
34
|
+
|
|
35
|
+
- email addresses
|
|
36
|
+
- account IDs
|
|
37
|
+
- tokens
|
|
38
|
+
- URL bars
|
|
39
|
+
- sidebars
|
|
40
|
+
- terminal panes
|
|
41
|
+
|
|
42
|
+
Vided is not a tracker. If the thing you need to hide moves, create multiple
|
|
43
|
+
redactions across smaller time ranges.
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
|
|
47
|
+
For video work:
|
|
48
|
+
|
|
49
|
+
- `ffmpeg`
|
|
50
|
+
- `ffprobe`
|
|
51
|
+
|
|
52
|
+
For local development and source installs:
|
|
53
|
+
|
|
54
|
+
- Python 3.11 or newer
|
|
55
|
+
- `uv`
|
|
56
|
+
|
|
57
|
+
Speech-based trimming with VAD is optional. Install the ONNX Runtime extra when you
|
|
58
|
+
need it:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uv sync --extra vad
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Run from this repo
|
|
65
|
+
|
|
66
|
+
Install dependencies and check the CLI:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
uv sync
|
|
70
|
+
uv run vided --help
|
|
71
|
+
uv run vided doctor
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Run the CLI module directly:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv run python -m vided --help
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
After the package is published to PyPI, install it as a tool:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv tool install vided
|
|
84
|
+
vided --help
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For one-off use after publishing:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uvx vided --help
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Quick start
|
|
94
|
+
|
|
95
|
+
Create a project:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
vided init /path/to/original-recording.mp4 --output-dir my-recording-project
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
If you omit `--output-dir`, `init` creates a folder from the input filename, such as
|
|
102
|
+
`original-recording`.
|
|
103
|
+
|
|
104
|
+
Trim silence:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
vided trim my-recording-project
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Open the annotation UI:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
vided ui my-recording-project
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If thumbnails are missing, `ui` generates them from `work/trimmed.mp4` before opening
|
|
117
|
+
the browser.
|
|
118
|
+
|
|
119
|
+
In the UI:
|
|
120
|
+
|
|
121
|
+
1. Click a thumbnail in the bottom filmstrip.
|
|
122
|
+
2. Click **Set start**.
|
|
123
|
+
3. Drag a rectangle in the large frame view.
|
|
124
|
+
4. Click the thumbnail where the blur should end.
|
|
125
|
+
5. Click **Add redaction**.
|
|
126
|
+
6. Wait for the save status in the top bar.
|
|
127
|
+
|
|
128
|
+
Render a debug preview first:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
vided render my-recording-project --debug --overwrite
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The debug output is:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
my-recording-project/output/debug-preview.mp4
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Render the final blurred video:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
vided render my-recording-project --overwrite
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The final output is:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
my-recording-project/output/final.mp4
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Render a contact sheet from the final video:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
vided render my-recording-project --contact-sheet --overwrite
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The contact sheet shows sampled frames from `output/final.mp4`. Frames that overlap
|
|
159
|
+
redactions get an accent border.
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
my-recording-project/output/contact-sheet.jpg
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Trim behavior
|
|
166
|
+
|
|
167
|
+
The default trim mode is `hybrid`:
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
detector: audio
|
|
171
|
+
short silent sections: cut
|
|
172
|
+
silent sections 1.5s or longer: speed:8,volume:0
|
|
173
|
+
normal sections: keep
|
|
174
|
+
margin: 0.2s
|
|
175
|
+
smooth: 0.2s,0.1s
|
|
176
|
+
audio threshold: 0.04
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Short pauses disappear. Long waits are sped up and muted. Speech stays at normal speed.
|
|
180
|
+
The default detector uses ffmpeg-decoded audio levels.
|
|
181
|
+
|
|
182
|
+
To use VAD instead:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
vided trim my-recording-project --detector vad --overwrite
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
This creates or refreshes `work/vad.wav` and `work/vad_ranges.json` as needed, then
|
|
189
|
+
runs the same ffmpeg trim renderer.
|
|
190
|
+
|
|
191
|
+
## Project layout
|
|
192
|
+
|
|
193
|
+
After the full flow, a project looks like this:
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
my-recording-project/
|
|
197
|
+
project.json
|
|
198
|
+
redactions.json
|
|
199
|
+
input/
|
|
200
|
+
original.mp4
|
|
201
|
+
work/
|
|
202
|
+
trimmed.mp4
|
|
203
|
+
vad.wav
|
|
204
|
+
vad_ranges.json
|
|
205
|
+
filtergraph.txt
|
|
206
|
+
filtergraph.debug.txt
|
|
207
|
+
frames/
|
|
208
|
+
frame_000001.jpg
|
|
209
|
+
frame_000002.jpg
|
|
210
|
+
frames.json
|
|
211
|
+
output/
|
|
212
|
+
debug-preview.mp4
|
|
213
|
+
final.mp4
|
|
214
|
+
contact-sheet.jpg
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`vad.wav` and `vad_ranges.json` exist only after using VAD.
|
|
218
|
+
|
|
219
|
+
## Commands
|
|
220
|
+
|
|
221
|
+
The normal workflow uses:
|
|
222
|
+
|
|
223
|
+
- `init`
|
|
224
|
+
- `trim`
|
|
225
|
+
- `ui`
|
|
226
|
+
- `render`
|
|
227
|
+
- `doctor`
|
|
228
|
+
|
|
229
|
+
Check dependencies:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
vided doctor
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Create a project:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
vided init input.mp4
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Choose a project folder:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
vided init input.mp4 project-dir
|
|
245
|
+
vided init input.mp4 --output-dir project-dir
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Symlink the original instead of copying it:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
vided init input.mp4 project-dir --symlink
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Run the default trim pass:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
vided trim project-dir --overwrite
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Use a different trim mode:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
vided trim project-dir --mode cut --overwrite
|
|
264
|
+
vided trim project-dir --mode speed --overwrite
|
|
265
|
+
vided trim project-dir --mode keep --overwrite
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Tune silence handling:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
vided trim project-dir --silent-speed 12 --overwrite
|
|
272
|
+
vided trim project-dir --no-mute-silent-audio --overwrite
|
|
273
|
+
vided trim project-dir --smooth 0.2s,0.1s --overwrite
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Show a speed badge on sped-up sections:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
vided trim project-dir --speed-indicator --speed-indicator-corner top-right --overwrite
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
The badge appears only when the sped-up section lasts at least one second in the
|
|
283
|
+
output. To show it on shorter sped-up sections:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
vided trim project-dir --speed-indicator --speed-indicator-min-seconds 0.5 --overwrite
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Use VAD:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
vided trim project-dir --detector vad --overwrite
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Generate denser or larger thumbnails before opening the UI:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
vided frames project-dir --interval 0.5 --overwrite
|
|
299
|
+
vided frames project-dir --thumbnail-width 960 --overwrite
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Render to a custom path:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
vided render project-dir --output output/my-final.mp4 --overwrite
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Render a contact sheet from the default final video:
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
vided render project-dir --contact-sheet --overwrite
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Render a contact sheet from a custom final video:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
vided render project-dir --contact-sheet --final-video output/my-final.mp4 --output output/my-sheet.jpg --overwrite
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
`trim`, `frames`, and `render` also support `--dry-run`.
|
|
321
|
+
|
|
322
|
+
## Technical design
|
|
323
|
+
|
|
324
|
+
The pipeline is:
|
|
325
|
+
|
|
326
|
+
```text
|
|
327
|
+
original video
|
|
328
|
+
-> audio-level or optional VAD activity detection
|
|
329
|
+
-> ffmpeg-backed speed/mute trim pass
|
|
330
|
+
-> work/trimmed.mp4
|
|
331
|
+
-> ffmpeg thumbnail generation
|
|
332
|
+
-> browser rectangle annotations
|
|
333
|
+
-> redactions.json
|
|
334
|
+
-> ffmpeg debug preview
|
|
335
|
+
-> ffmpeg final blurred render
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Redactions are created against the trimmed video. That keeps all redaction timestamps
|
|
339
|
+
in the same timeline as the debug and final renders.
|
|
340
|
+
|
|
341
|
+
The UI stores rectangles in real video pixels, not thumbnail pixels.
|
|
342
|
+
|
|
343
|
+
## Redaction data
|
|
344
|
+
|
|
345
|
+
The browser writes `redactions.json`. Each redaction stores selected times, buffered
|
|
346
|
+
effective times, a video-pixel rectangle, and a style:
|
|
347
|
+
|
|
348
|
+
```json
|
|
349
|
+
{
|
|
350
|
+
"id": "redaction_001",
|
|
351
|
+
"selected_start_seconds": 10.0,
|
|
352
|
+
"selected_end_seconds": 15.0,
|
|
353
|
+
"buffer_pre_seconds": 0.5,
|
|
354
|
+
"buffer_post_seconds": 0.5,
|
|
355
|
+
"effective_start_seconds": 9.5,
|
|
356
|
+
"effective_end_seconds": 15.5,
|
|
357
|
+
"rect": {
|
|
358
|
+
"x": 1000,
|
|
359
|
+
"y": 42,
|
|
360
|
+
"w": 420,
|
|
361
|
+
"h": 90
|
|
362
|
+
},
|
|
363
|
+
"style": {
|
|
364
|
+
"type": "blur",
|
|
365
|
+
"filter": "boxblur",
|
|
366
|
+
"luma_radius": 18,
|
|
367
|
+
"luma_power": 3
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Rendering
|
|
373
|
+
|
|
374
|
+
For each blur redaction, the renderer generates an ffmpeg filtergraph that:
|
|
375
|
+
|
|
376
|
+
1. splits the video stream
|
|
377
|
+
2. crops the target rectangle from a copy
|
|
378
|
+
3. applies `boxblur` to the crop
|
|
379
|
+
4. overlays the blurred crop back onto the base video during the redaction time range
|
|
380
|
+
|
|
381
|
+
Generated filtergraphs are written to:
|
|
382
|
+
|
|
383
|
+
```text
|
|
384
|
+
work/filtergraph.txt
|
|
385
|
+
work/filtergraph.debug.txt
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
The final render must re-encode video because blur is a video filter. Defaults:
|
|
389
|
+
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"video_codec": "libx264",
|
|
393
|
+
"crf": 16,
|
|
394
|
+
"preset": "medium",
|
|
395
|
+
"pixel_format": "yuv420p",
|
|
396
|
+
"audio_codec": "copy"
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
Lower CRF means higher quality and larger files. Try CRF `12` or `14` for very high
|
|
401
|
+
quality, or `18` to `23` for smaller files.
|
|
402
|
+
|
|
403
|
+
Audio is stream-copied during the redaction render. Silence speeding and muting happen
|
|
404
|
+
during the trim pass.
|
|
405
|
+
|
|
406
|
+
## Limitations
|
|
407
|
+
|
|
408
|
+
- Fixed rectangles only. There are no keyframed rectangles or object tracking.
|
|
409
|
+
- Annotations happen on the trimmed video. Changing trim settings later means
|
|
410
|
+
regenerating thumbnails and reviewing redactions.
|
|
411
|
+
- The UI uses frame thumbnails plus debug render. It does not include a video preview.
|
|
412
|
+
- Frame times are based on the thumbnail interval. This is fine for broad redactions
|
|
413
|
+
with buffers, but not frame-perfect editing.
|
|
414
|
+
- Rotation metadata and unusual pixel aspect ratios are not normalized.
|
|
415
|
+
- Blur is implemented in the UI. Solid redaction is partially supported by the renderer
|
|
416
|
+
if you hand-edit `style.type` to `solid`.
|
|
417
|
+
- The local UI server binds to `127.0.0.1` by default. Do not expose it to the public
|
|
418
|
+
internet.
|
|
419
|
+
|
|
420
|
+
## Development
|
|
421
|
+
|
|
422
|
+
Run tests:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
uv run pytest
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Format, lint, and type-check:
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
uv run ruff format src tests
|
|
432
|
+
uv run ruff check src tests
|
|
433
|
+
uv run ty check src tests
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Install the pre-commit hook:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
uv run pre-commit install
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Every commit with package source or release metadata changes must bump the package
|
|
443
|
+
version with zerover. This includes staged changes under `src/` and published package
|
|
444
|
+
metadata in `pyproject.toml`, such as runtime dependencies, entry points, Python
|
|
445
|
+
version support, or build configuration. Tests, workflows, docs, scripts, dev
|
|
446
|
+
dependencies, and `uv.lock`-only changes do not require a bump.
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
uv version --bump patch
|
|
450
|
+
# or, for larger changes while still staying on major zero:
|
|
451
|
+
uv version --bump minor
|
|
452
|
+
git add pyproject.toml uv.lock
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
After committing, add the matching tag:
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
version="$(uv version --short)"
|
|
459
|
+
git tag -a "v$version" -m "v$version"
|
|
460
|
+
git push origin HEAD --tags
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Publishing runs from `.github/workflows/publish.yml` when a `v*` tag is pushed. In
|
|
464
|
+
PyPI, configure a trusted publisher for:
|
|
465
|
+
|
|
466
|
+
- owner: `pmbaumgartner`
|
|
467
|
+
- repository: `vided`
|
|
468
|
+
- workflow: `publish.yml`
|
|
469
|
+
- environment: `pypi`
|
|
470
|
+
|
|
471
|
+
### Realistic media fixtures
|
|
472
|
+
|
|
473
|
+
The repo includes two Git LFS-tracked public-domain NASA fixtures:
|
|
474
|
+
|
|
475
|
+
- `tests/fixtures/media/realistic-speech-gaps.mp4`
|
|
476
|
+
- `tests/fixtures/media/realistic-speech-gaps-short.mp4`
|
|
477
|
+
|
|
478
|
+
Use them for realistic trim, VAD, frame generation, render, and UI smoke tests. Source
|
|
479
|
+
and license notes live beside each fixture as `*.LICENSE.md`.
|
|
480
|
+
|
|
481
|
+
Run fixture e2e tests:
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
uv run --extra vad pytest --run-e2e -m e2e
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
Install the Playwright browser once before browser e2e tests:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
uv run playwright install chromium
|
|
491
|
+
uv run --extra vad pytest --run-e2e -m browser --browser chromium
|
|
492
|
+
```
|