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
Bugs in edit output: overlay picks the wrong audio, xfade drops audio, vertical_reel is 96 kHz, tiny blur redactions fail #188
Each of these silently produces wrong output from a normal edit: the wrong audio track, lost narration, a non-standard sample rate, or a failed redaction.
Evidence (reproduced with ffmpeg 8.1.1)
overlay takes the overlay's audio and length.src/utils/media.ts:454-481 builds -filter_complex "[0:v][1:v]overlay=..." with no -map, so ffmpeg auto-selects the audio stream with the most channels across all inputs.
A 4 s mono main plus an 8 s stereo picture-in-picture clip gave 8 s of video with the PiP's stereo audio.
xfade_transition drops all audio when only one clip has it.
src/tools/xfadeTransition.ts:43: const hasAudio = a.audioCodec !== null && b.audioCodec !== null;, after which the builder passes -an.
The vertical_reel export writes 96 kHz audio. One-pass loudnorm upsamples to 192 kHz, and only steam_trailer sets aresample (src/utils/produce.ts:478-492), so the reel MP4 got a 96000 Hz AAC track. That is bad for TikTok/Reels compatibility and wastes bitrate.
redact_region blur fails on regions under 8 px. In src/utils/media.ts:649-651 the boxblur luma radius has a minimum of 2, but the yuv420p chroma plane of a 4x4 or 6x6 crop is too small, and libx264 fails with EINVAL. A thin region, such as a 6 px line holding a token, cannot be blurred.
Suggested approach
Label the overlay output [v], add -map [v] -map 0:a?, and use eof_action=pass with -t <main duration> (or shortest=1 when the overlay is a video).
Reuse the anullsrc substitution from buildAssembleArgs.
Always append aresample=48000 after loudnorm in export presets.
Set the chroma radius separately (boxblur=lr=R:cr=max(1,floor(min(w,h)/4))), or fall back to pixelate/box for tiny regions.
Done when
Each case has an integration test that asserts the probed streams: audio source and duration, sample rate, and a successful blur on a 4x4 region.
Activity