fix: resolve issues #36, #37, #47 (release 0.9.0)#58
Merged
Conversation
scale, crop, xfade_transition, assemble_highlights, and title_card let an explicit odd width/height reach libx264 + yuv420p, which fails with a cryptic "not divisible by 2" tail. A shared validateEvenDimension guard now rejects the value up front and suggests the nearest even sizes. Fixes #47. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The blanket .m4a container cannot hold opus/vorbis/etc and wrote a broken file. copy now probes the source audio codec first, maps it to a compatible container (m4a/mp3/ogg/flac/wav, .mka as the catch-all), errors clearly when the input has no audio stream, and reports sourceAudioCodec in the result. Fixes #36. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every ffmpeg builder runs with -y, so a caller-supplied output path that already existed was silently clobbered. resolveOutput now refuses an existing path with a clear error unless the tool call passes the new optional overwrite flag; unique auto-generated default paths are unaffected. Wired through all 19 tools with an output parameter and mirrored in mcp-tools.json. Closes #37. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the three open, well-scoped issues from the tracker:
scale,crop,xfade_transition,assemble_highlights, andtitle_cardnow reject an explicit oddwidth/heightwith a clear message (naming the nearest even values) instead of dying with a cryptic libx264 "not divisible by 2" tail. SharedvalidateEvenDimensionguard insrc/utils/validate.ts; rejection (not rounding) per the issue's preference, since the caller asked for an exact size. Defaults and-2auto-sides unaffected.extract_audio format:"copy"container. The blanket.m4awrote a broken file for non-mp4 codecs.copynow probes the source codec and maps it to a compatible container (aac/alac → m4a, mp3 → mp3, opus/vorbis → ogg, flac → flac, pcm → wav, else → mka), errors up front on an input with no audio stream, and returnssourceAudioCodec.resolveOutputnow refuses a caller-supplied path that already exists unless the new optionaloverwrite: trueis passed; unique auto-generated defaults are unchanged. Wired through all 19 tools with anoutputparameter and mirrored inmcp-tools.json. Minor version bump (0.9.0) since this changes default behavior for explicit output paths.Testing
npm run build,npm run typecheck,npm run lint,npm test— 159 passed / 6 skipped, including 11 new unit tests (even-dimension rejection across all five builders, the codec→container map, and the overwrite guard incl. default-path exemption).screenshotto the same explicit path refused then allowed withoverwrite: true;scale width:101rejected with the even-dimension message whilewidth:100succeeds;extract_audio copyon an opus source produced a playable.oggwithsourceAudioCodec: "opus";copyon a video-only recording errors with "no audio stream".Fixes #47. Fixes #36. Closes #37.
🤖 Generated with Claude Code