You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: edit tools fail on .webm input (libx264/AAC into WebM), and audio tools fail on audio-only outputs #187
convert produces WebM, and many users bring WebM from browsers or OBS. Most edit tools then fail on that file with ffmpeg's cryptic Nothing was written into output file. So convert followed by any edit is broken, and so is any edit of a browser-recorded clip.
Evidence (reproduced with ffmpeg 8.1.1)
The tools reuse the input's extension for the default output: src/tools/speed.ts:31, const ext = extname(args.input) || ".mp4";. The same pattern is in crop, scale, clip, compress, cut_idle, overlay, redact_region, reframe, zoom, callout, burn_subtitles, normalize_audio and denoise.
They always encode libx264/AAC (resolveQuality, audioCodecFor), which the WebM muxer rejects.
Related: normalize_audio and denoise to an audio-only output (.wav/.mp3) from a video input also fail, because of -map 0:v? -c:v copy (src/utils/audio.ts:101,155).
Suggested approach
Add a shared editOutputExt(input) helper: keep .mp4/.mkv/.mov and map everything else to .mp4.
Or choose codecs from the output container (VP9/Opus for .webm).
Drop the video map when the output extension is audio-only.
Reject an explicit output path whose container cannot hold the chosen codecs, with a clear message.
Done when
Every edit tool succeeds on a .webm input.
normalize_audio input.mp4 output.wav works.
Integration tests cover a WebM fixture across the extension-reusing tools.
Activity
fix(tools): run the container guard in the five H.264/AAC edit tools (#…
refactor: shared input and output scaffold for file-writing tools (#308)