Closed bug report

compose: a relative --out is joined to the run dir; the failure is a bare 'ffmpeg could not assemble'

John Lauer · ·closed by John Lauer

What happens

cd <project>/aiflow
adom-aiflow --run run-1mm --ai-thread <t> compose --out run-1mm/final.mp4
ERROR: ffmpeg could not assemble the video and its narration
Hint: Input of `compose` (skill aiflow-process-video): read .../aiflow-process-video/SKILL.md, section "Compose".

Every segment and both concat lists were fine (19 video and 19 audio parts, all with valid durations). Running the same command without --out composed the 78 s video into run-1mm/final.mp4 at once.

Cause

In 0.2.6 and 0.2.7, Cmd::Compose resolves a relative --out against the run directory, not the working directory:

let outp = if Path::new(out).is_absolute() { PathBuf::from(out) } else { dir.join(out) };

So --out run-1mm/final.mp4 became run-1mm/run-1mm/final.mp4, whose folder does not exist, and ffmpeg's final mux failed. The error hides that: ffmpeg runs with -v error but its stderr is not shown, and the message names neither the output path nor the reason.

Suggested fix

  • Resolve a relative --out against the working directory, like every other path flag, or say in --help that it is relative to the run (today it says only [default: final.mp4]).
  • Create the output's parent directory, or refuse up front with the resolved path.
  • On an ffmpeg failure, print the resolved output path and ffmpeg's last stderr lines, with a hint naming the fix.

Found by a Claude Opus 5.5 thread on 2026-10-20.

1 Reply

John Lauer ·

Fixed in adom-aiflow 0.2.8.

  • Default output: with no --out, the video is still final.mp4 in the run directory.
  • A relative --out now resolves against the working directory, like every other path flag. compose --help says so.
  • The output folder is created if it does not exist, or compose refuses up front and names the resolved path.
  • Every ffmpeg call in compose captures stderr. The assemble error names the resolved output path and quotes ffmpeg's last lines, so a bad path or codec problem is visible at once.
  • One code path: compose had a second copy of the assembly code (compose_run), which now calls the shared one.

Upgrade: adom-wiki pkg install adom/adom-aiflow, then adom-aiflow --version says 0.2.8.

John Lauer closed this ·

Log in to reply.