vidfix 0.3.2__tar.gz → 0.4.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.
Files changed (50) hide show
  1. {vidfix-0.3.2 → vidfix-0.4.1}/.gitignore +0 -5
  2. {vidfix-0.3.2 → vidfix-0.4.1}/CHANGELOG.md +80 -0
  3. {vidfix-0.3.2 → vidfix-0.4.1}/PKG-INFO +108 -82
  4. {vidfix-0.3.2 → vidfix-0.4.1}/README.md +106 -81
  5. {vidfix-0.3.2 → vidfix-0.4.1}/pyproject.toml +2 -1
  6. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/__init__.py +1 -1
  7. vidfix-0.4.1/src/vidfix/__main__.py +5 -0
  8. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/cli.py +36 -8
  9. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/attach.py +42 -39
  10. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/capabilities.py +22 -2
  11. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/caption.py +41 -2
  12. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/convert.py +19 -5
  13. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/ffmpeg.py +17 -2
  14. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/formats.py +20 -8
  15. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/generate.py +6 -3
  16. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/matrix.py +21 -2
  17. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/probe.py +6 -7
  18. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/verify.py +15 -8
  19. vidfix-0.4.1/src/vidfix/interactive.py +873 -0
  20. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_attach.py +38 -21
  21. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_capabilities.py +9 -0
  22. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_convert.py +22 -0
  23. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_formats.py +2 -2
  24. vidfix-0.4.1/tests/test_guards.py +220 -0
  25. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_integration.py +34 -7
  26. vidfix-0.4.1/tests/test_interactive.py +1014 -0
  27. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_matrix.py +1 -0
  28. vidfix-0.4.1/tests/test_public_api.py +437 -0
  29. {vidfix-0.3.2 → vidfix-0.4.1}/uv.lock +56 -2
  30. vidfix-0.3.2/src/vidfix/interactive.py +0 -387
  31. vidfix-0.3.2/tests/test_interactive.py +0 -474
  32. {vidfix-0.3.2 → vidfix-0.4.1}/.github/dependabot.yml +0 -0
  33. {vidfix-0.3.2 → vidfix-0.4.1}/.github/workflows/ci.yml +0 -0
  34. {vidfix-0.3.2 → vidfix-0.4.1}/.github/workflows/publish.yml +0 -0
  35. {vidfix-0.3.2 → vidfix-0.4.1}/.python-version +0 -0
  36. {vidfix-0.3.2 → vidfix-0.4.1}/LICENSE +0 -0
  37. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/__init__.py +0 -0
  38. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/duration.py +0 -0
  39. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/core/presets.py +0 -0
  40. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/data/presets.yaml +0 -0
  41. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/exceptions.py +0 -0
  42. {vidfix-0.3.2 → vidfix-0.4.1}/src/vidfix/py.typed +0 -0
  43. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_caption.py +0 -0
  44. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_cli.py +0 -0
  45. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_duration.py +0 -0
  46. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_ffmpeg.py +0 -0
  47. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_generate.py +0 -0
  48. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_presets.py +0 -0
  49. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_probe.py +0 -0
  50. {vidfix-0.3.2 → vidfix-0.4.1}/tests/test_verify.py +0 -0
@@ -20,10 +20,6 @@ build/
20
20
  coverage.xml
21
21
  htmlcov/
22
22
 
23
- # Local-only session notes (never publish)
24
- CLAUDE.md
25
- plan.md
26
-
27
23
  # Editors / OS
28
24
  .idea/
29
25
  .vscode/
@@ -35,4 +31,3 @@ plan.md
35
31
  *.webm
36
32
  *.mkv
37
33
  !tests/fixtures/*.mp4
38
- .claude/
@@ -5,6 +5,86 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.1] - 2026-10-19
9
+
10
+ ### What's new
11
+
12
+ - **More exact: looping a clip to make it longer keeps its frame rate.**
13
+ Stretching a 1-minute 29.97 fps clip to 5 minutes with loop now gives
14
+ exactly 29.97 fps and 5:00, so `verify` passes.
15
+
16
+ ### Fixed
17
+
18
+ - `convert --extend-mode loop` (and "loop" in the wizard) drifted the frame
19
+ rate at every loop point (29.97 came out as 29.957). The output now keeps the
20
+ source frame rate exactly.
21
+
22
+ ## [0.4.0] - 2026-09-27
23
+
24
+ ### What's new
25
+
26
+ - **Easier: no typing, just arrow keys.** Run `vidfix` and every question is a
27
+ menu — move with ↑↓, press enter. Each choice says what it means
28
+ ("stereo — left + right", "mp4 — plays everywhere"), questions are numbered,
29
+ answers turn into ✓ lines, and a summary box lets you Run, Run & open, or
30
+ Cancel before anything is written. Anything not in a list? Pick **other…**
31
+ and type it.
32
+ - **Faster: long clips generate several times quicker.** A 60-second 1080p
33
+ test clip: webm 28 s → 1.8 s, h265 21 s → 6 s, 4K 13 s → 7.5 s, h264
34
+ 3.1 s → 2.2 s — same exact fps, length and size.
35
+ - **Safer: files that would have come out broken are now made correctly or
36
+ stopped with a clear one-line message.**
37
+
38
+ ### Added
39
+
40
+ - Wizard picks with the arrow keys, and every choice carries a one-line meaning
41
+ ("stereo — left + right"). Questions are numbered ("Step 3 ·"), and a summary
42
+ box with Run / Run & open / Cancel comes before anything is written. Every
43
+ question is a menu: input files from the current folder, the output file in
44
+ every format the step can write (or your own name), fps / duration /
45
+ resolution with "other…" for your own value, caption color and size, yes/no,
46
+ and tick boxes for variants. A wrong typed value is caught right in the box.
47
+ Without a real terminal (pipes, CI) the same lists are numbered — answer `2`,
48
+ the name, or your own value.
49
+ - `--open` on `generate`, `convert`, `caption`, `attach`, `format` and
50
+ `variants` opens the result when it's written.
51
+ - `.ogg`, `.opus` and `.aac` audio outputs (generate and format), up to 7.1.
52
+ - `python -m vidfix`.
53
+ - `vidfix --version`.
54
+ - `verify()` in Python takes the same spec forms as the CLI (`fps="29.97"`,
55
+ `duration="2s"`, `res="720p"`).
56
+
57
+ ### Changed
58
+
59
+ - `generate` is much faster for long clips: webm ~16x, h265 ~3x, h264 ~1.5x
60
+ (quicker encoder settings for synthetic patterns; `convert` keeps its quality
61
+ settings for real footage).
62
+ - `attach` re-encodes the video when stream-copying would break the file
63
+ (burned subtitles, a codec the output can't hold, `.avi`/`.mpg` on either
64
+ side) instead of refusing — e.g. an h264 clip can now go into `.webm`.
65
+ - Output folders that don't exist yet are created.
66
+ - `.mpg`/`.mpeg` now hold mpeg2 video only — h264 and h265 in them wrote
67
+ broken timestamps.
68
+
69
+ ### Fixed
70
+
71
+ - `attach` into or out of `.avi`/`.mpg`/`.mpeg`/`.wmv` wrote files with broken
72
+ timing or dropped frames while reporting success.
73
+ - `attach --burn` into `.webm`/`.mxf`/`.mpg`/`.ogv` failed on the kept audio.
74
+ - Clear errors instead of raw FFmpeg output for: unknown caption color or size,
75
+ caption start after end, a missing output folder, writing over the input file,
76
+ a subtitle file that isn't one, attaching audio from a file with no audio,
77
+ attaching/captioning/converting a file with no video, `format` from audio to a
78
+ picture, and unreadable input files.
79
+ - `variants` checks every fps/resolution, the source, and the output folder
80
+ before running anything (an output path that is a file used to crash).
81
+ - `verify` rejects negative tolerances.
82
+ - Wizard: re-asks a bad caption color on the spot, only offers format targets
83
+ that fit the source, skips the channel question for a source with no audio,
84
+ and requires at least one spec to verify.
85
+ - `preset list` shows aliases (`ndf25`) as "same as pal25".
86
+ - `info` called audio pulled out of an mp4 into `.ogg`/`.opus` an "mp4".
87
+
8
88
  ## [0.3.2] - 2026-08-15
9
89
 
10
90
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vidfix
3
- Version: 0.3.2
3
+ Version: 0.4.1
4
4
  Summary: CLI toolkit to convert, generate, and verify videos and images to exact specs (fps, duration, resolution, format) — test fixtures, CI checks, and everyday conversions.
5
5
  Project-URL: Homepage, https://github.com/gouravrana7/vidfix
6
6
  Project-URL: Issues, https://github.com/gouravrana7/vidfix/issues
@@ -26,6 +26,7 @@ Requires-Python: >=3.10
26
26
  Requires-Dist: imageio-ffmpeg>=0.6.0
27
27
  Requires-Dist: pydantic>=2
28
28
  Requires-Dist: pyyaml>=6.0.3
29
+ Requires-Dist: questionary>=2.1.1
29
30
  Requires-Dist: rich>=13.0.0
30
31
  Requires-Dist: typer>=0.12.0
31
32
  Description-Content-Type: text/markdown
@@ -44,76 +45,116 @@ Description-Content-Type: text/markdown
44
45
  *videos, pictures & audio from nothing · any format to any format ·
45
46
  multi-track audio · captions & timecode burn-in · pass/fail checks for CI*
46
47
 
47
- </div>
48
+ [What it does](#what-it-does) · [Wizard](#no-commands-to-learn) · [Python](#use-it-from-python) · [Install](#install) · [Commands](#commands) · [CI](#ci-usage)
48
49
 
49
- **vidfix** is a CLI-first media toolkit. It creates any video, picture, or
50
- audio file from nothing, converts anything to any format, muxes audio and
51
- subtitles together, and forces existing files to exact specs — fps, duration,
52
- resolution, codec, audio channels. Then it proves it: `vidfix info` reads any
53
- file back in plain words, `vidfix verify` turns specs into pass/fail exit
54
- codes for CI. Built for anyone — developers, testers, creators, or someone
55
- who just wants a file converted.
50
+ </div>
56
51
 
57
- ## No commands to learn. It talks to you.
52
+ **vidfix** is a CLI-first media toolkit for developers, testers, creators — or
53
+ anyone who just needs a file in the right shape. Tell it the fps, length, size,
54
+ codec or format you want; it makes the file, then proves it.
58
55
 
59
- ```bash
60
- uvx vidfix
61
- ```
56
+ ## What it does
62
57
 
63
- That's it — nothing to install, no setup, no syntax to memorize.
64
- vidfix asks what you want step by step in plain words, checks every answer
65
- **the moment you type it** (a bad answer re-prompts right there — it never
66
- runs a job it knows will fail), runs the job, and shows you the equivalent
67
- one-liner for next time. When it's done it prints the **full path where the
68
- file was saved**, so you never have to hunt for the output.
58
+ | You want to… | Run |
59
+ |---|---|
60
+ | Make a test video, sound or picture from nothing | `vidfix generate -o clip.mp4 --fps 60 --duration 30s --res 1080p` |
61
+ | Force a video to exact fps / length / size / codec | `vidfix convert in.mov --fps 29.97 --res 720p -o out.mp4` |
62
+ | Turn any file into any other format | `vidfix format clip.mov -o clip.gif` |
63
+ | Burn text or a running timecode onto video | `vidfix caption in.mp4 --text "Take 42" -o out.mp4` |
64
+ | Add audio tracks or subtitles to a video | `vidfix attach in.mp4 --audio en.wav --subs en.srt -o out.mkv` |
65
+ | Read what's inside a file, in plain words | `vidfix info clip.mp4` |
66
+ | Check a file in CI (exit 0 pass / 1 fail) | `vidfix verify out.mp4 --fps 60 --res 1080p` |
67
+ | Make every fps × size combination at once | `vidfix variants in.mp4 --fps 30,60 --res 720p,1080p -o out/` |
69
68
 
70
- ## Install
69
+ ## No commands to learn
71
70
 
72
71
  ```bash
73
- uvx vidfix # try instantly — no install
74
- pip install vidfix # or install for keeps (or: uv tool install vidfix)
72
+ uvx vidfix
75
73
  ```
76
74
 
77
- Everything vidfix needs is built in — install it and it just works.
75
+ Run it with no arguments and vidfix asks what you want — no install, no syntax:
78
76
 
79
- ## Quick start
80
-
81
- **No syntax needed** — just run `vidfix` and answer the prompts:
77
+ - **Arrow keys, not typing.** Every question is a menu, and every choice says
78
+ what it means. Need something not listed? Pick **other…** and type it.
79
+ - **Mistakes are caught on the spot.** A bad answer is re-asked right there;
80
+ the wizard never offers a choice the chosen format can't make.
81
+ - **You see it before it runs.** A summary box, then run, run & open, or cancel.
82
+ - **You learn the one-liner.** The equivalent command is printed for next time,
83
+ and the full path of the saved file when it's done.
82
84
 
83
85
  ```
84
86
  $ vidfix
85
- What do you want to do? (generate/convert/caption/attach/format/verify/info/variants) [generate]:
86
- Generate (video/audio-only/picture): video
87
- formats: 3gp, avi, flv, m4v, mkv, mov, mp4, mpeg, mpg, mxf, ogv, ts, webm, wmv — pick any
88
- Output file [test.mp4]: fixture.mp4
89
- Pattern (smpte/color-bars/testsrc/gradient/...): smpte
90
- Duration (e.g. 30s, 1min, 1:30) [5s]: 10 seconds
91
- Resolution (e.g. 720p, 1080p, 1280x720) [720p]:
92
- Audio (tone/silence/none) [tone]: tone
93
- Audio channels (mono/stereo/5.1/7.1/left/right) [stereo]: 5.1
87
+ ╭─ vidfix ────────────────────────────╮
88
+ │ exact-spec media · no syntax needed │
89
+ ╰─────────────────────────────────────╯
90
+ ✓ Step 1 · What do you want to do? generate
91
+ ✓ Step 2 · Generate video
92
+ ? Step 3 · Output file (↑↓ to move, enter to pick)
93
+ ❯ test.mp4 plays everywhere
94
+ test.mov Apple / editing
95
+ test.mkv holds anything
96
+ test.webm web video
97
+ ...
98
+ other… type your own value
99
+ ```
100
+
101
+ ```
102
+ ✓ Step 3 · Output file fixture.mp4
103
+ ✓ Step 6 · fps 30
104
+ ✓ Step 7 · Duration 10s
105
+ ✓ Step 8 · Resolution 1080p
106
+ ✓ Step 11 · Audio channels 5.1
94
107
  ...
95
- equivalent command: vidfix generate --pattern smpte --duration '10 seconds' --audio-layout 5.1 -o fixture.mp4
108
+ ╭─ Ready to generate ───────────╮
109
+ │ pattern smpte │
110
+ │ fps 30 │
111
+ │ duration 10s │
112
+ │ audio channels 5.1 │
113
+ │ resolution 1080p │
114
+ │ output fixture.mp4 │
115
+ ╰───────────────────────────────╯
116
+ equivalent command: vidfix generate --pattern smpte --fps 30 --duration 10s --audio-layout 5.1 --res 1080p -o fixture.mp4
117
+
118
+ ✓ Step 18 · Go ahead? run & open
96
119
  ✓ wrote fixture.mp4
97
120
  location: /Users/you/clips/fixture.mp4
98
121
  ```
99
122
 
100
- Every answer is validated on the spot and the equivalent one-liner is printed
101
- so you can script it next time. Answer the output prompt with just a format
102
- name (`mxf`) and vidfix names the file for you (`fixture.mxf`). Check the
103
- result any time with `vidfix info fixture.mp4` or assert it with
104
- `vidfix verify`. Or go straight to the flags:
123
+ No arrow keys (a pipe, CI, a basic terminal)? The same questions come as a
124
+ numbered list — answer `2`, the name, or your own value.
105
125
 
106
- ```bash
107
- # A 60fps, 30s, 720p SMPTE-bars clip with a burned-in timecode
108
- vidfix generate -o fixture.mp4 --fps 60 --duration 30s --res 720p --timecode
126
+ ## Use it from Python
127
+
128
+ Same features, one import, the same spec forms as the command line:
129
+
130
+ ```python
131
+ from vidfix import convert, generate, verify, probe
132
+
133
+ generate("fixture.mp4", fps="59.94", duration="30s", res="720p")
134
+ info = probe("fixture.mp4") # MediaInfo (pydantic)
135
+ result = verify("fixture.mp4", duration=30.0)
136
+ assert result.passed
137
+ ```
138
+
139
+ Every function takes `str` or `Path`, frame rates as `"29.97"`, `29.97` or
140
+ `Fraction(30000, 1001)`, and raises `vidfix.VidfixError` with a readable
141
+ message when something can't be done.
109
142
 
110
- # Force real footage to exact specs
111
- vidfix convert raw.mov --fps 29.97 --duration 10s --res 1280x720 -o fixture.mp4
143
+ ## Install
144
+
145
+ ```bash
146
+ uvx vidfix # run instantly, nothing to install
147
+ pip install vidfix # or keep it (or: uv tool install vidfix)
112
148
 
113
- # Assert specs in CI (exit 0 pass / 1 fail)
114
- vidfix verify fixture.mp4 --fps 29.97 --duration 10s --res 1280x720
149
+ uvx vidfix@latest # newest release with uvx
150
+ pip install -U vidfix # upgrade with pip (or: uv tool upgrade vidfix)
151
+ vidfix --version # which version you have
115
152
  ```
116
153
 
154
+ Everything vidfix needs is built in. Plain `uvx vidfix` may reuse a copy it
155
+ downloaded earlier — add `@latest` to be sure you're on the newest release.
156
+ What changed: [CHANGELOG.md](CHANGELOG.md).
157
+
117
158
  ## It refuses to write a broken file
118
159
 
119
160
  Every output format has real limits — codecs it can hold, channel counts,
@@ -137,7 +178,7 @@ format can't make.
137
178
 
138
179
  ## Commands
139
180
 
140
- Everything vidfix can do, at a glance (details in the sections below):
181
+ Every command has `--help`. The same options are in the wizard.
141
182
 
142
183
  | Command | What it does |
143
184
  |---|---|
@@ -145,15 +186,16 @@ Everything vidfix can do, at a glance (details in the sections below):
145
186
  | `vidfix generate` | Create synthetic test media to exact specs — videos, audio-only files, or still pictures; patterns, tones, channel layouts, timecode burn-in, no source file needed |
146
187
  | `vidfix convert` | Force an existing video to exact fps / duration / resolution / codec (stream-copies when possible) |
147
188
  | `vidfix caption` | Burn a text caption into a video — position, size, color, optional start/end window |
148
- | `vidfix attach` | Mux an existing audio file and/or subtitle (.srt/.vtt) onto a video — soft track or `--burn`-ed in |
189
+ | `vidfix attach` | Add audio tracks and/or a subtitle (.srt/.vtt/.ass/.ssa) to a video — soft track or `--burn`-ed in |
149
190
  | `vidfix format` | Convert any picture or video to any other format by output extension (incl. palette-optimized GIF, thumbnails, audio extraction) |
150
191
  | `vidfix verify` | Assert a file matches specs; exit 0 pass / 1 fail — wire straight into CI |
151
192
  | `vidfix info` | Show a file's details in plain words: type, duration, fps, resolution, codecs (`--json` for scripts) |
152
193
  | `vidfix variants` | Generate the fps × resolution cartesian product of variants, in parallel |
153
194
  | `vidfix preset list` / `preset show` | Inspect built-in + user presets (broadcast rate family, see [Presets](#presets)) |
154
195
 
155
- `info` and `variants` were previously named `probe` and `matrix`; the old names
156
- still work as hidden aliases, so existing scripts keep running.
196
+ Handy on every command that writes a file: `--open` opens the result when
197
+ it's done. `python -m vidfix` works too. (`probe` and `matrix` still work as
198
+ old names for `info` and `variants`.)
157
199
 
158
200
  ### `vidfix convert` — exact-spec transforms
159
201
 
@@ -206,7 +248,7 @@ Audio: 440Hz `tone` (default), `silence`, `none` — any layout from `mono` to
206
248
  `7.1`, or `left`/`right` for channel-identification checks.
207
249
 
208
250
  The output extension picks the media kind: video (`.mp4`, `.mov`, …),
209
- audio-only (`.wav`, `.mp3`, `.m4a`, `.flac`), or a still picture
251
+ audio-only (`.wav`, `.mp3`, `.m4a`, `.flac`, `.ogg`, `.opus`, `.aac`), or a still picture
210
252
  (`.png`, `.jpg`, `.jpeg`, `.webp`, `.bmp`, `.tiff`).
211
253
 
212
254
  | Option | Meaning | Default |
@@ -264,18 +306,10 @@ $ vidfix info clip.mp4
264
306
  audio aac · stereo (left+right) · normal quality (44100 Hz)
265
307
  ```
266
308
 
267
- Everything reads in plain words, with the technical value kept in brackets:
268
- the type says whether the file is video or audio, durations are in seconds
269
- (`1m 30s (90.00 seconds)` for longer files), common resolutions get their
270
- everyday name (`1080p`, `4k`), color formats a plain label (`standard`,
271
- `10-bit`), audio channels show as `mono`/`stereo`/`5.1`/`7.1` instead of a
272
- channel count (`stereo (left+right)`, `5.1 surround`), and sound quality in
273
- everyday words (`normal quality (44100 Hz)`, `high quality`, `low quality`). The file type is resolved from the file's `major_brand` tag
274
- (mp4/mov/m4a/3gp) or the extension — not the raw demuxer list
275
- (`mov,mp4,m4a,3gp,3g2,mj2`); `--json` keeps the raw string as `demuxer` and the
276
- tag as `major_brand` alongside the friendly `container`. Broadcast rates get
277
- their preset-family label in the fps line (`df30`, `df60`, `pal25`, `pal50`,
278
- `film24`, `film23976`) so you can read them at a glance.
309
+ Everything reads in plain words, with the technical value kept in brackets —
310
+ `1080p (1920x1080)`, `stereo (left+right)`, `normal quality (44100 Hz)`.
311
+ Broadcast rates get their preset name (`df30`, `pal25`, `film24`, …). `--json`
312
+ gives every raw value for scripts.
279
313
 
280
314
  ### `vidfix caption` — burn text into a video
281
315
 
@@ -317,12 +351,14 @@ vidfix attach clip.mp4 --audio track.m4a --subs subs.srt -o out.mkv # all at onc
317
351
  |---|---|---|
318
352
  | `-o, --output` | Output file path | required |
319
353
  | `--audio` | Audio file to add as a track (repeat for multiple tracks) | — |
320
- | `--subs` | Subtitle file (.srt/.vtt) to add | — |
354
+ | `--subs` | Subtitle file (.srt/.vtt/.ass/.ssa) to add | — |
321
355
  | `--burn` | Burn subtitles into the picture (else a soft, toggle-able track) | off |
322
356
 
323
- The video is stream-copied (no re-encode, no quality loss) unless subtitles are
324
- burned in. Repeat `--audio` to add several tracks (one per file, in order) — it
325
- works on any video, including a `vidfix generate` clip. `.flv` holds only one
357
+ The video is stream-copied (no re-encode, no quality loss) whenever the output
358
+ can hold it cleanly; otherwise — burned subtitles, a codec the output can't hold,
359
+ or `.avi`/`.mpg` on either side — it is re-encoded so the file always plays.
360
+ Repeat `--audio` to add several tracks (one per file, in order) — it works on
361
+ any video, including a `vidfix generate` clip. `.flv` holds only one
326
362
  audio track; use `.mkv`/`.mp4`/`.mov` for more. Soft subtitles need a
327
363
  `.mp4`/`.mov`/`.mkv`/`.webm` output — for other containers use `--burn`.
328
364
 
@@ -340,8 +376,9 @@ vidfix format take.wav -o take.flac # audio to another audio format
340
376
  The output extension picks the format — the only option is `-o, --output` (required).
341
377
  Video targets: `mp4`, `mov`, `mkv`, `webm`, `avi`, `m4v`, `ts`, `mxf`, `mpg`, `ogv`,
342
378
  `flv`, `wmv`, `3gp`, `gif`. Picture targets: `png`, `jpg`, `webp`, `bmp`, `tiff`.
343
- Audio targets (from a video or another audio file): `wav`, `mp3`, `m4a`, `flac`.
344
- `generate` and `convert` write those containers too — each picks a codec that plays in it.
379
+ Audio targets (from a video or another audio file): `wav`, `mp3`, `m4a`, `flac`,
380
+ `ogg`, `opus`, `aac`.
381
+ `generate` and `convert` write the same video containers, each with a codec that plays in it.
345
382
 
346
383
  ### `vidfix variants` — variant grids in parallel
347
384
 
@@ -388,17 +425,6 @@ presets colon notation, matching broadcast convention. Aliases (`alias: pal25`)
388
425
  work in user presets too. Add your own in `~/.config/vidfix/presets.yaml`;
389
426
  explicit flags always override.
390
427
 
391
- ## Python API
392
-
393
- ```python
394
- from vidfix import convert, generate, verify, probe
395
-
396
- generate("fixture.mp4", fps="59.94", duration="30s", res="720p")
397
- info = probe("fixture.mp4") # MediaInfo (pydantic)
398
- result = verify("fixture.mp4", duration=30.0)
399
- assert result.passed
400
- ```
401
-
402
428
  ## vidfix vs moviepy vs raw FFmpeg
403
429
 
404
430
  | | vidfix | moviepy | raw ffmpeg |