ffmpeg-cookbook

Provides ffmpeg command recipes for video resizing, transitions, concatenation, and audio syncing.

Updated Aug 9, 2026
Ready to run
npx skills add https://github.com/ChenJiangxi/auramate-video --skill ffmpeg-cookbook-chenjiangxi
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: ffmpeg-cookbook
Source: https://github.com/ChenJiangxi/auramate-video/tree/main/skills/ffmpeg-cookbook
Command: npx skills add https://github.com/ChenJiangxi/auramate-video --skill ffmpeg-cookbook-chenjiangxi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Video production with ffmpeg involves dozens of non-obvious pitfalls: concat failures from mismatched encoding parameters, audio-video drift accumulating across clips, transitions silently shortening total duration, and cryptic errors like missing libass filters. This Skill provides tested, copy-paste-ready ffmpeg recipes that avoid these traps. ## Core Features & Use Cases - Format Conversion Recipes: Convert horizontal footage to vertical 1080x1920 with blurred backgrounds, hard crops, or letterboxing, plus zoompan animation for still images. - Drift-Free Assembly: Concatenate clips and audio tracks using absolute timestamp anchoring, apad/atrim padding, and settb normalization so audio and video stay frame-aligned. - Gap-Embedded Transitions: Add crossfade transitions inside end-of-sentence silence gaps so total duration and per-sentence timing remain identical to hard cuts. - Error Lookup Table: Diagnose common failures like Non-monotonous DTS, infinite encoding from missing -t flags, missing audio tracks, and gray colors from wrong pixel formats. - Use Case: You are assembling a multi-beat short video from separately encoded clips and voiceover MP3s. Use the concat and audio-stitching recipes to produce a final MP4 where every sentence starts exactly on its visual beat. ## Quick Start Ask the agent to look up the ffmpeg recipe for converting a horizontal clip to vertical 1080x1920 with a blurred background, or to fix audio-video drift when concatenating clips.

Frequently Asked Questions about ffmpeg-cookbook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert horizontal video to vertical 1080x1920 with ffmpeg?▼

Use a split filter that scales one copy to fill 1080x1920 with boxblur as background, and overlays the original scaled to fit as foreground. The recipe chain is split, scale, crop, boxblur for the background, then overlay the centered foreground.

How to concatenate video clips in ffmpeg without errors?▼

All clips must share identical encoding parameters: resolution, fps, pixel format, and sample aspect ratio. Normalize each clip with fps=30,setsar=1,format=yuv420p first, then use the concat demuxer with absolute paths and -safe 0.

Why does audio drift out of sync when concatenating video clips?▼

Per-clip encoding rounds durations up to whole frames, and the error accumulates across clips. Fix it by padding each audio segment with apad and trimming with atrim to exact beat boundaries, and anchor video segments at absolute timestamps.

How do I add crossfade transitions without changing total video duration?▼

Place the xfade transition inside the silence gap at the end of the previous segment so it ends exactly when the next sentence starts. Extend the incoming clip by the transition duration rather than overlapping existing content.

Why does ffmpeg encoding never finish with a still image input?▼

Using -loop 1 without -t causes ffmpeg to read the image infinitely. Always pair -loop 1 with an explicit -t duration or -shortest so the encoder terminates.

What does the 'No such filter: ass' error mean in ffmpeg?▼

The installed ffmpeg build lacks libass support, so ass and subtitles filters are unavailable. The workaround is rendering subtitles as PNG images and compositing them with the overlay filter instead.