FFmpeg Cookbook

Side-by-Side Video Maker

Combine two videos into one split-screen clip — horizontal or vertical. Great for comparisons, before/after, and reactions.

Local processing only — your files never leave the browser
CLIP A (left / top)
🎬
Add Clip A
video, up to 75 MB
CLIP B (right / bottom)
🎬
Add Clip B
video, up to 75 MB
Each clip is fitted into a fixed cell (letterboxed if needed), so mixing landscape and portrait still works. The result ends when the shorter clip ends. Best with short clips — long videos are slow in the browser.
Combining… 0%

What this tool does

  • Horizontal (1280×720) or vertical (720×1280) split layouts
  • Each clip is fitted into a fixed cell and letterboxed, so landscape + portrait mixes cleanly
  • Keep Clip A’s audio or mute the result
  • Output ends with the shorter clip, so the halves stay in sync
  • Runs locally with ffmpeg.wasm — your files never leave your device

How to use

  1. 1

    Add two clips

    Drop a video into Clip A (left/top) and Clip B (right/bottom). Keep each under 75 MB.

  2. 2

    Choose a layout

    Horizontal places them side by side; vertical stacks them.

  3. 3

    Pick the audio

    Use Clip A’s audio, or mute for a clean comparison.

  4. 4

    Combine and download

    The result is encoded to MP4 (H.264). Preview, then download.

What each setting means

Layout
Horizontal = 1280×720, two 640×720 cells. Vertical = 720×1280, two 720×640 cells.
Audio
Keep Clip A’s soundtrack (if it has one) or mute the result entirely.

Common pitfalls

Symptom: The output is shorter than expected

Cause: A split screen ends when the shorter clip ends so the two halves stay aligned.

Fix: Trim both clips to the same length first, or put the longer take in the slot you care about.

Symptom: One side has black bars

Cause: That clip’s aspect ratio does not fill the cell, so it is letterboxed to avoid stretching.

Fix: Use clips with matching orientation, or crop them to fill the cell first — note each horizontal-layout cell (640×720) is taller than it is wide, so 16:9 landscape clips get top/bottom bars.

Symptom: It runs out of memory or is very slow

Cause: Two videos are decoded and re-encoded in the browser tab.

Fix: Use short clips (a few seconds) and keep each well under 75 MB; on a phone, aim for ~50 MB each.

Equivalent FFmpeg commands

Reference commands you can run on the desktop FFmpeg CLI.

Horizontal side-by-side (1280×720)
ffmpeg -i a.mp4 -i b.mp4 -filter_complex "[0:v]scale=640:720:force_original_aspect_ratio=decrease,pad=640:720:(ow-iw)/2:(oh-ih)/2,setsar=1[a];[1:v]scale=640:720:force_original_aspect_ratio=decrease,pad=640:720:(ow-iw)/2:(oh-ih)/2,setsar=1[b];[a][b]hstack=inputs=2:shortest=1,format=yuv420p[v]" -map "[v]" -map "0:a:0?" -c:v libx264 -crf 24 -preset veryfast -c:a aac -b:a 128k -movflags +faststart -shortest out.mp4
Vertical stacked (720×1280)
ffmpeg -i a.mp4 -i b.mp4 -filter_complex "[0:v]scale=720:640:force_original_aspect_ratio=decrease,pad=720:640:(ow-iw)/2:(oh-ih)/2,setsar=1[a];[1:v]scale=720:640:force_original_aspect_ratio=decrease,pad=720:640:(ow-iw)/2:(oh-ih)/2,setsar=1[b];[a][b]vstack=inputs=2:shortest=1,format=yuv420p[v]" -map "[v]" -an -c:v libx264 -crf 24 -preset veryfast out.mp4

Browser support & limits

  • Browser memory limits this to short clips; each input is capped at 75 MB and the combined total at 120 MB.
  • Two fixed layouts (horizontal / vertical), two equal cells; custom positioning / picture-in-picture is not offered.

Privacy

This tool runs ffmpeg.wasm directly in your browser. Files never leave your device — everything runs locally. Read the privacy policy →

Frequently asked questions

Can I combine a landscape and a portrait video?

Yes. Each clip is scaled to fit a fixed cell and letterboxed if needed, so mixed orientations combine without stretching.

How long does the combined video run?

It ends when the shorter of the two clips ends, keeping both halves in sync. Trim them to equal length first if you want the full duration of both.

Whose audio is used?

You choose: Clip A’s audio, or mute. Mixing both tracks is not offered because it often clashes; mute then add music separately if needed.

What resolution is the output?

1280×720 for horizontal, 720×1280 for vertical — a good balance of quality and browser performance.

Are my videos uploaded?

No. Everything runs in your browser via ffmpeg.wasm; the files never leave your device.

Related tools