FFmpeg Cookbook
JA

Loop & Boomerang Video Maker

Repeat a clip several times, or make a boomerang that plays forward and then backward. Everything runs in your browser.

Your file is not uploaded
Drag & drop a video, or tap to select
MP4 / MOV / WebM and more, up to 100 MB
—
—
Loop repeats the whole clip (output capped at 60 seconds). Boomerang plays it forward then backward, muted, and needs a short input (≤10 seconds) because reversing buffers every frame in memory.
Processing… 0%

Equivalent FFmpeg command

CLI command for your current settings. Updates live as you change controls.

ffmpeg -stream_loop 1 -i input.mp4 -t 60 -map "0:v:0?" -map "0:a:0?" -c:a aac -b:a 128k -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -movflags +faststart output.mp4

How to use

  1. Drop a videoChoose a short video up to 100 MB. Boomerangs need a clip of 10 seconds or less.
  2. Choose a modeLoop repeats the clip; Boomerang plays it forward and then backward.
  3. Set optionsFor Loop, pick the repeat count and whether to keep the audio.
  4. Make it and downloadPress Make loop (or Make boomerang), play the result, then download the MP4.

When it goes wrong

Boomerang fails or runs out of memory

Cause: Reversing keeps every frame of the clip in memory, which is heavy for a browser tab.

Fix: Use a clip of 10 seconds or less; trim it first if needed.

The loop is shorter than expected

Cause: Loop output stops at 60 seconds, and anything beyond is cut off.

Fix: To fit every repeat, use a shorter clip or fewer repeats.

Boomerang audio is missing

Cause: Reversed audio sounds unnatural, so boomerangs are written without audio.

Fix: To add sound, put music on afterward with the Add BGM / Audio Mix Tool.

Questions

What is the difference between loop and boomerang?

Loop plays the whole clip from the start the number of times you choose. Boomerang plays it forward and then straight back, for a back-and-forth motion.

Why is the boomerang muted?

Reversed audio sounds unnatural, so boomerangs are written without audio. Add music afterward if you want sound.

Why must boomerang clips be short?

Reversing a video keeps every frame in memory, and a browser has limited memory, so boomerang input is limited to 10 seconds.

Are my videos uploaded?

No. Everything runs in your browser with ffmpeg.wasm, and the file is not sent anywhere.

More detail (settings, limits, FFmpeg commands)

What each setting means

Mode
Loop = play the clip again from the start. Boomerang = play forward, then backward. Boomerang output is 30 fps and scaled down or up to fit within 1280×720.
Repeat (loop only)
How many plays in total: 2×, 3× or 5×. Anything past 60 seconds is cut off.
Audio (loop only)
Keep the audio (AAC 128 kbps) or mute it. Boomerang never has audio.

Browsers and limits

  • Loop output is limited to 60 seconds and boomerang input to 10 seconds (reversing uses a lot of memory). Input files up to 100 MB.
  • Boomerang never has audio.

The same job with the FFmpeg command line

Loop a clip 3× (capped at 60s)
ffmpeg -stream_loop 2 -i in.mp4 -t 60 -map 0:v:0? -map 0:a:0? -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart out.mp4
-stream_loop 2 reads the input two more times, so it plays three times in all. The scale filter rounds width and height to even numbers.
Boomerang (forward + reverse, muted)
ffmpeg -i in.mp4 -filter_complex "[0:v]fps=30,scale=1280:720:force_original_aspect_ratio=decrease:force_divisible_by=2,setpts=PTS-STARTPTS,split[f][b];[b]reverse,setpts=PTS-STARTPTS[r];[f][r]concat=n=2:v=1:a=0,format=yuv420p[v]" -map "[v]" -an -c:v libx264 -preset veryfast -crf 24 -movflags +faststart out.mp4
Without force_divisible_by=2, a portrait clip can get an odd width (405 for 1080×1920), which 4:2:0 H.264 cannot encode.