>FFmpegLab

FFmpeg guides & templates

Practical, copy-pasteable walkthroughs for the FFmpeg techniques behind every edit.

SQL API · YAML API · BASH · Typescript SDK · postgresql · supabase · s3 · whisper ai · ffmpeg · self-hostable · open-source

Share Renders { } Code Config
Generated Code Logs Customize
-i $MEDIA_1
-i $MEDIA_2
-filter_complex
[0:v]loop=loop=150:size=1:start=0,setdar=16/9,scale=1280:720:force_original_aspect_ra
[1:v]loop=loop=150:size=1:start=0,setdar=16/9,scale=1280:720:force_original_aspect_ra
[v0?][v1?]concat=n=2:v=1:a=0,settb=expr=1/30[c1?];
[c1?]settb=expr=1/30[v_layer0];
[v_layer0]split[v_main][v_overlay];[v_main]settb=expr=1/30[v_concat];[v_overlay]nullsink
aevalsrc=0:d=5[s0];[s0]adelay=delays=0|0,volume=10[a0?];
aevalsrc=0:d=5[s1];[s1]adelay=delays=5000|5000,volume=10[a1?];
[a0?][a1?]amix=inputs=2:duration=longest[a_concat]
-aspect 16/9
-movflags +faststart
-map [v_concat]
-map [a_concat]
-r 30
-ss 00:00:00
-to 00:00:10
-y $OUTPUT_PATH
▶

FFMPEG Guides

Template
Transitions
FFmpeg xfade transitions guide
Syntax, duration & offset, all 30+ presets, audio crossfades, and chaining transitions across clips.
Template
Effects
Ken Burns / Zoompan Effects – The Art of Motion
Bring still images to life with smooth pan-and-zoom animations. Master the zoompan filter to create Ken Burns effects, dynamic slideshows, and cinematic camera movements.
Template
GIF
Convert video to GIF
A quick one-liner plus the palettegen/paletteuse method for crisp, banding-free GIFs.
Template
Audio
Mixing audio with amix
Layer music, voiceover, and effects; balance levels; duck with sidechaincompress; crossfade tracks.
Template
Effects
filter_complex effects, by example
Overlay, scale, pad, crop, color correction, and chroma key — chained into one custom filter graph.
Template
Effects
xstack FFmpeg Filter – Create Video Mosaics & Grids
Stack multiple videos into custom layouts, split-screen grids, and collages — without the complex overlay chains. Master the xstack filter.
New
Codec
The complete FFmpeg codecs guide
Every video and audio codec you need to know: H.264, H.265, VP9, AV1, AAC, MP3, lossless codecs, hardware acceleration, and how to pick the right one for your project. With practical commands and comparison tables.
New
Format
The complete FFmpeg formats guide
Containers explained: MP4, MKV, WebM, MOV, AVI, MPEG‑TS, FLV, GIF, and audio-only containers like M4A and FLAC. Learn how to remux without re-encoding, use `faststart` for web streaming, and pick the perfect format for your project.
New
Tools
FFmpeg, ffprobe & ffplay: the complete toolkit explained
Stop copy‑pasting blindly. Understand how the `ffmpeg` command is structured, how stream specifiers let you target individual tracks, how to inspect files with `ffprobe`, and how to preview filters with `ffplay`.
New
Muxer
Muxer flags: MP4 brands, edit lists, timecodes, DASH, MKV cues & image sequences
Remuxing is simple. Controlling the muxer is an art. Learn how to set the MP4 brand, fix editing problems with `use_editlist`, write timecode tracks, fragment for DASH, optimize MKV cues, and generate image sequences.
New
Effects
Blend FFmpeg Filter – 30+ Blend Modes for Creative Compositing
Photoshop-style blending for video — multiply, screen, overlay, difference, and more. Master the blend filter for cinematic effects and motion graphics.
New
Codec
Codec private options: squeezing every bit of quality
CRF and presets are just the beginning. Learn how to control reference frames (`refs`), B‑frame decision (`b-adapt`), lookahead (`rc-lookahead`), psychovisual tuning (`psy-rd`), deblocking, and niche encoders like MPEG‑2, MJPEG, PNG, and WMV.
Compression
Video Compression with FFmpeg – Complete Guide to Reducing File Size
Master CRF, codec selection, presets, two-pass encoding, and hardware acceleration to reduce file size while preserving quality.
Effects
Bitstream Filters – The -bsf Power Tool
Manipulate encoded streams without decoding or re-encoding. Master h264_mp4toannexb, h264_metadata, aac_adtstoasc, noise, and more.
Effects
Video Denoising – Complete Guide to Noise Removal
Remove grain, salt‑and‑pepper, and compression artifacts with FFmpeg's powerful denoise filters. Compare hqdn3d, nlmeans, vaguedenoiser, bm3d, and more.
Effects
Optical Flow & Motion Interpolation
Create buttery-smooth slow motion, convert frame rates, and eliminate judder with the minterpolate filter. Master motion estimation, compensation, and scene detection.
Editing
Scene Detection & Automated Editing
Automatically detect scene changes, split videos, extract thumbnails, and build highlight reels with scdet, select, and blackdetect.
Audio
Advanced Audio Processing
Master loudness normalization, noise reduction, sidechain compression, and creative audio effects with FFmpeg's professional audio filter suite.
Color
Color Spaces, HDR, and Tone Mapping in FFmpeg
Convert HDR video to SDR without washed-out colors. Master zscale, tonemap, and proper color space conversion for HDR10, HLG, and Dolby Vision.
Stabilize
Stabilize shaky video
The two-pass vidstab workflow, smoothing and zoom tuning, and a quick deshake fallback.
Audio
Sidechain Compression & Audio Ducking in FFmpeg
Auto-duck background music when voiceover plays, create pumping EDM effects, and build professional audio mixes with the sidechaincompress filter.
Metadata
Metadata Preservation – Timecode, Reel Names & EXIF
Keep timecode, reel names, camera metadata, and EXIF data through transcoding, remuxing, and rewrapping. Master -map_metadata, -movflags, and the ffmetadata workflow.
Debug
FFmpeg Debugging & Troubleshooting – Read Logs, Fix Errors Fast
Stop staring at cryptic error messages. Master -loglevel, decode filtergraph failures, debug stream mapping, and use the FFmpegLab IDE as your personal linting tool.
Editing
Mask Overlay & Advanced Compositing in FFmpeg
Blur faces, create split screens, and composite videos like a pro. Master alphamerge, maskedmerge, and the overlay filter with grayscale masks.
Encoding
ROI Encoding – Region of Interest Encoding
Allocate more bitrate to faces, text, and critical regions while saving bandwidth on backgrounds. Master the addroi filter and qoffset parameter.
Effects
Lens Correction & Distortion – Remove or Add Effects
Remove barrel distortion, fisheye, and pincushion from action cameras and wide-angle lenses. Or add creative distortion effects for music videos, dream sequences, and retro vibes.
Editing
Dynamic Runtime Commands & Timeline Editing in FFmpeg
Send interactive commands to FFmpeg while it's running to change filter parameters on the fly. Master sendcmd, zmq, and timeline expressions for dynamic overlays, opacity fades, and real‑time adjustments.
Compress
Compress video & reduce file size
CRF explained, H.264 vs H.265/HEVC, two-pass bitrate, downscaling, and shrinking audio.
Convert
Convert video formats
MP4, WebM, MOV, MKV — remux vs re-encode, extract audio, and export high-quality GIFs.
Editing
Trim, cut & split video
Lossless clipping with -ss/-to, frame-accurate cuts, splitting, and joining with concat.
Text
Add text & subtitles
drawtext titles and lower-thirds, plus burning in or attaching SRT/ASS subtitles.
Speed
Speed up & slow down video
setpts and atempo for 2× cuts, timelapses, and smooth slow motion — with audio in sync.
Frames
Extract frames & thumbnails
Single stills, one frame per second, every Nth frame, auto thumbnails, and contact sheets.
Rotate
Rotate & flip video
transpose, hflip and vflip for 90/180° turns and mirrors, plus lossless metadata rotation.
Fades
Fade video & audio in and out
fade and afade for opening from black, ending on black, and ramping the soundtrack.
Crop
Crop video
crop=w:h:x:y with centering, square and 9:16 reframes, and removing black bars.
Resize
Resize & scale video
The scale filter, keeping aspect ratio, downscaling to 1080p/720p, and padding to size.
Merge
Merge & concatenate videos
The concat demuxer for lossless joins and the concat filter for mismatched clips.
Audio
Extract audio from video
Copy losslessly or convert to MP3, AAC, or WAV, and rip just a time range.
Audio
Remove & mute audio
Strip sound with -an, mute a section with the volume filter, or replace the track.
Watermark
Add a watermark or logo
Overlay a PNG in any corner, control padding and opacity, or burn in a text watermark.
Frame rate
Change frame rate (FPS)
The fps filter, 60-to-30 conversion, constant frame rate, and minterpolate smoothing.
Loop
Loop video
-stream_loop to repeat clips, loop a still into video, loop to a duration, and boomerang.
AI
DNN Filters – AI-Powered Video Processing
Super‑resolution, denoising, object detection, and image classification—all inside FFmpeg. Master the dnn_processing, dnn_detect, and dnn_classify filters.

Developer & Product guides

Practical, walkthroughs for the FFmpegLab platform.

New
AI
Agent-First Setup – FFmpegLab Server with Supabase
Complete guide to setting up FFmpegLab Server using Supabase. Includes modular bash scripts for automated setup of PostgreSQL, pgmq, S3 storage, and API keys.
New
SQL
Render Videos Using SQL – A Deep Dive into FFmpegLab Server
Translate the SDK example into raw SQL. Learn how the database models work and how to render videos by directly manipulating PostgreSQL.
New
DevOps & Automation
Environment Variables & Scalable Runners – FFmpegLab Server Architecture
Configure PostgreSQL, pgmq, S3 storage, and distribute rendering across multiple runners. The complete guide to scaling FFmpegLab Server.
New
Self-Hosting & Storage
Setting Up Supabase Storage with FFmpegLab – Auth, Buckets, TUS Uploads & Per-User RLS
Configure user authentication with magic link login, create a storage bucket with per-user RLS policies, and set up the SUPABASE_STORAGE_BUCKET environment variable for FFmpegLab. Upload files Of any size.
Product
FFmpeg GUI Libraries Compared – FFmpegLab vs. The Competition
HandBrake, Shutter Encoder, StaxRip, and a dozen more—all compared. Plus, why FFmpegLab's IDE-first, collaborative approach is a game-changer for teams and developers.
Product
Mobile Web Video Editor – Edit Videos in Your Browser, No App Required
Trim, crop, add effects, and export videos directly from your phone. FFmpegLab is a free, privacy-first mobile web video editor that runs entirely in your browser using WebAssembly.
Product
Figma for Video – Collaborative Video Editing with Templates & Teams
Collaborate in real-time, share templates, and version your video projects like design teams do. FFmpegLab brings Figma-style collaboration to video production.
Privacy
The offline, private video editor
How OPFS + WebAssembly editing keeps footage on-device, with encrypted P2P sync and zero tracking.
Self-hosting GUI
Self-host with Docker
Bring your own backend for storage, rendering, and sync with a single Docker Compose file.
Business & Technology
Applications & Startups Powered by FFmpeg
From AI video editors to privacy-first converters, discover the startups and applications built on FFmpeg. Learn how FFmpegLab enables the next generation of media companies.
✦  Fresh from the render queue

Better FFmpeg workflows, delivered.

Get practical commands, new templates, and deep-dive guides for the edits that are usually hardest to get right.

✓  Copy-pasteable commands    ✓  Editor templates    ✓  No noise
One useful email at a time.

Ship faster than ever.

Open Source · API-First · Built for Scale