Recipe

FFmpeg Xfade Master Bake

ffmpeg bake recipe

Bake N per-scene clips into one seamless master mp4 with crossfade dissolves, and emit the scene-start (A[]) + segment-duration (SEG[]) arrays the HyperFrames overlay timeline keys off.

7 units use it

What it is

## What it is The master-assembly step for a multi-scene branching video. Each scene clip is normalized to 1080x1920/24fps, then chained with `xfade=transition=fade` so every cut is a 0.5s dissolve. The script computes each clip's xfade `offset` (the running output length minus the overlap) and prints two arrays — `A[]` (scene-start offsets) and `SEG[]` (per-segment durations) — which you paste into the HyperFrames composition so the GSAP overlay timeline lands every caption/fork/death on the right frame. ## When to use it - Any time you assemble several i2v clips into one continuous master (the choose-path series, any multi-beat reel where overlays must be frame-accurate over a single `<video>`). - The single-`<video>`-plus-baked-dissolves pattern is mandatory when overlays cross a cut — in-composition opacity crossfades between separate video clips render as hard cuts (MEMORY: hyperframes_video_crossfade_bake). ## Knobs - `D` = crossfade duration (0.5s default). - The xfade offset for clip k = (running output length) - D; re-baking only the tail keeps A[0..n] stable. - `VF` = the per-clip normalize chain (scale/crop/fps/setsar/format).

How to use it standalone

ffmpeg bake recipe
# Per-clip normalize, verbatim from scripts/tmp-bake-*.sh:
VF="scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,fps=24,setsar=1,format=yuv420p"
D=0.5

# xfade chain build (verbatim shape): for each clip k>=1
#   offset[k] = running_outlen - D
#   fc += "${prev}[k:v]xfade=transition=fade:duration=$D:offset=${offset[k]}[vk];"
# final ffmpeg call:
ffmpeg -y $inputs -filter_complex "$fc" -map "[vout]" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -r 24 master.mp4

# Emit the arrays the HyperFrames composition needs:
#   A=[0.00,6.50,12.38,...]   (scene starts)
#   SEG=[7.00,6.38,3.88,...]  (segment durations)
ParamValue
D0.5
crf20
fps24
resolution1080x1920
transitionfade
offset_formularunning_outlen - D

Units that use this recipe

7 units

Every finished unit with FFmpeg Xfade Master Bake in its recipe. Open one to see the full ingredient list, or remix straight from a tile.