Audio Crossfades, J and L in FFmpeg — effect skill for cuts & pacing

For AI agents: find the right skill in one call — curl -s "https://varg.ai/how-to/api/search?q=<what the person wants>" returns the matching how-to page and the best skills with install commands, as markdown (Russian works too). Full index: https://varg.ai/how-to/llms.txt. Every page has a markdown twin: add .md to its path. Before generating anything, show the person the options on the how-to page.

Crossfade audio with acrossfade, or build J/L-cuts by delaying one track with adelay and mixing with amix.

What it does

Sound changes smoothly or leads/trails the picture cut.

When: Every join with dialogue or music; J/L-cuts for interviews and scene changes.

Watch out: amix's default normalization halves levels per input; set normalize=0 and control gain yourself.

Timing: Crossfade 0.05–1 s; J/L lead or tail 0.3–2 s

Also called: acrossfade, afade, adelay amix, audio split edit, audio overlap

In FFmpeg

Crossfade (overlap by d, curves from afade: tri, qsin, hsin, esin, log, exp…):

[0:a][1:a]acrossfade=d=0.5:c1=tri:c2=tri[a]

J-cut (B's audio 1 s before B's picture, cut at 4 s):

[0:a]atrim=0:4,asetpts=PTS-STARTPTS,afade=t=out:st=3.4:d=0.6[aa];
[1:a]atrim=0:4,asetpts=PTS-STARTPTS,afade=t=in:d=0.3,adelay=3000:all=1[ab];
[aa][ab]amix=inputs=2:normalize=0:duration=longest[a]

adelay takes milliseconds per channel (1500|500), S suffix for samples, s for seconds; all=1 applies one delay to all channels.

Where this comes from

Use when

Not for

Install

Example output

https://s3.varg.ai/how-to/previews/96126c63b093/take-ffmpeg-audio-crossfade-jl.mp4 — cut between two shots, with the timeline strip of the edit. Footage: Tears of Steel (2012), (CC) Blender Foundation | mango.blender.org, CC BY 3.0; Charge (2022), Blender Studio | studio.blender.org, CC BY 4.0. (credit: Rendered by varg · Tears of Steel (2012) + Charge (2022))

More cuts & pacing skills