5 Commits

Author SHA1 Message Date
otto 017d9ad006 Decompose build() into a Plan accumulator with named phases
The 250-line build() god-function is split into:
- resolve_timeline(): collapse Trim ops into a Timeline.
- Plan: the mutable arg/filter accumulator, with one method per phase —
  translate() (per-op dispatch), translate_format()/start_audio_only()
  (format handling), drop_inapplicable_video_filters(),
  resolve_stream_copy(), resolve_target_size() (two-pass planning),
  filter_args() (vf/af vs gif palette graph), assemble_passes().
- build() now just orchestrates these in order.

Pure refactor: argument output is byte-for-byte identical, guarded by
the existing 23-test suite (all green).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 15:51:05 +01:00
otto 4daca8247c Decouple option codes, fix encode bugs, add test suite
Maintainability:
- Choice options now carry a stable `code` separate from the display
  `label`. The command builder and recipe storage key off codes, so
  relabeling a menu entry no longer silently changes the encode or
  breaks a saved recipe. Format/Audio dispatch is now a clean code
  match instead of `starts_with` on display strings. Old recipes that
  stored labels still load via a label fallback.

Correctness:
- Fade start times now scale by the speed factor already applied in the
  filter chain, so Speed + Fade produces a fade in the right place
  regardless of op order (video and audio).
- Two-pass pass 1 uses the platform null device (NUL on Windows).
- The stderr drain thread is joined before Finished is sent, so the
  failure tail reported to the user is never truncated.

Features / cleanup:
- Accept multiple file arguments on the CLI to open batch mode directly.
- try_recv() instead of recv_timeout(ZERO); drop unused import.

Testing:
- 23 unit tests covering build() arg generation, speed/fade ordering,
  recipe round-trip + old-label fallback, and the pure helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 15:47:16 +01:00
otto 16acb43daf Add fit-to-size two-pass encoding, file argument, recipes, and batch mode
- Fit to size: computes H.264 bitrate from duration and runs a
  two-pass encode to land on a target size in MB
- lazyff FILE opens straight in the editor
- Recipes: save/load named edit stacks (~/.config/lazyff/recipes.json)
- Batch: mark files with Space, run one edit stack across all of them
  through a sequential job queue with per-file results
2026-06-11 11:55:55 +01:00
otto d9cb0231d1 docs(readme): add screenshot 2026-06-11 11:27:40 +01:00
otto 471aa6fb0c Initial release: friendly TUI for FFmpeg
File browser, stackable edits (trim, resize, crop, rotate, speed,
color, effects, fps, compress, convert, audio) with a live preview
of the generated ffmpeg command, progress bar with cancel, audio-aware
edit menus, and Catppuccin Macchiato theme.
2026-06-11 11:23:01 +01:00