Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions skills/recording.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Needs a running TTS server at `--base-url` (default `http://127.0.0.1:8880/v1`).
--apng <dasimgui>/doc/source/_static/tutorials/buttons.apng
```

Mostly-static recordings (a plot with a brief gesture) land ~0.5–0.8 MB at the defaults. A
**full-motion** clip (e.g. a realtime scroll, where every frame is a full-frame change) defeats
H.264 inter-frame compression and runs several MB. Shrink it the lossless way — add
`--preset veryslow` (better compression at the **same** quality), **not** by raising `--crf`
(which trades away the quality the clip needs). `--crf` stays at the clean default `23`; both are
knobs only for this case.
Comment on lines +92 to +97

Only the resulting `.mp4` is tracked. The `.apng`, `voiceover/*.wav`, `*.manifest.json`, `*.sidecar.json`, `*_music.wav`, and `*.mp4.ffmpeg.txt` are all intermediates and gitignored.

## Mental model
Expand Down
8 changes: 7 additions & 1 deletion utils/convert_recording.das
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ struct Config {
@clarg_doc = "Fade in/out length, milliseconds"
fade_ms : int = 100

@clarg_doc = "libx264 quality (lower = better/larger). Default 23 - keep it here for excellent quality; shrink full-motion clips with --preset, not by raising this"
crf : int = 23

@clarg_doc = "libx264 preset (slower = smaller at the SAME quality). Default medium; use veryslow for full-motion clips (e.g. realtime scroll) to cut size without touching crf"
preset : string = "medium"

@clarg_doc = "daScript root (find_sf2 + default daslang exe). Default: this exe's das-root"
das_root : string

Expand Down Expand Up @@ -158,7 +164,7 @@ def main : int {
var fargs <- ["ffmpeg", "-y", "-r", "{fps_eff}", "-i", cfg.apng, "-i", music_wav]
fargs |> push_from(vo_inputs)
fargs |> push_from(["-filter_complex", fg, "-map", "0:v", "-map", "[aout]",
"-c:v", "libx264", "-crf", "23", "-pix_fmt", "yuv420p",
"-c:v", "libx264", "-preset", cfg.preset, "-crf", "{cfg.crf}", "-pix_fmt", "yuv420p",
"-movflags", "+faststart", "-shortest", out_mp4])

// --- save the command, then run it ---
Expand Down
Loading