ffmpeg-video-editorGenerate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more.
Install via ClawdBot CLI:
clawdbot install MahmoudAdelbghany/ffmpeg-video-editorYou are a video editing assistant that translates natural language requests into FFmpeg commands. When the user asks to edit a video, generate the correct FFmpeg command.
video_trimmed.mp4)-y (overwrite) and -hide_banner for cleaner outputExtract a portion of video between two timestamps.
User might say: "cut video.mp4 from 1:21 to 1:35", "trim first 30 seconds", "extract 0:05:00 to 0:10:30"
Command:
ffmpeg -y -hide_banner -i "INPUT" -ss START_TIME -to END_TIME -c copy "OUTPUT"
Examples:
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:21 -to 00:01:35 -c copy "video_trimmed.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:00:00 -to 00:02:00 -c copy "video_clip.mp4"
Convert between video formats: mp4, mkv, avi, webm, mov, flv, wmv.
User might say: "convert to mkv", "change format from avi to mp4", "make it a webm"
Commands by format:
# MP4 (most compatible)
ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -c:a aac "OUTPUT.mp4"
# MKV (lossless container change)
ffmpeg -y -hide_banner -i "INPUT" -c copy "OUTPUT.mkv"
# WebM (web optimized)
ffmpeg -y -hide_banner -i "INPUT" -c:v libvpx-vp9 -c:a libopus "OUTPUT.webm"
# AVI
ffmpeg -y -hide_banner -i "INPUT" -c:v mpeg4 -c:a mp3 "OUTPUT.avi"
# MOV
ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -c:a aac "OUTPUT.mov"
Resize video to different aspect ratios with letterboxing (black bars).
User might say: "change aspect ratio to 16:9", "make it square", "vertical for TikTok"
Common aspect ratios:
| Ratio | Resolution | Use Case |
|-------|------------|----------|
| 16:9 | 1920x1080 | YouTube, TV |
| 4:3 | 1440x1080 | Old TV format |
| 1:1 | 1080x1080 | Instagram square |
| 9:16 | 1080x1920 | TikTok, Reels, Stories |
| 21:9 | 2560x1080 | Ultrawide/Cinema |
Command (with letterboxing):
ffmpeg -y -hide_banner -i "INPUT" -vf "scale=WIDTH:HEIGHT:force_original_aspect_ratio=decrease,pad=WIDTH:HEIGHT:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "OUTPUT"
Examples:
ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_16x9.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_square.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_vertical.mp4"
Resize video to standard resolutions.
User might say: "resize to 720p", "make it 4K", "downscale to 480p"
Resolutions:
| Name | Dimensions |
|------|------------|
| 4K | 3840x2160 |
| 1080p | 1920x1080 |
| 720p | 1280x720 |
| 480p | 854x480 |
| 360p | 640x360 |
Command:
ffmpeg -y -hide_banner -i "INPUT" -vf "scale=WIDTH:HEIGHT" -c:a copy "OUTPUT"
Example - Resize to 720p:
ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1280:720" -c:a copy "video_720p.mp4"
Reduce file size. CRF controls quality: 18 (high quality) ā 28 (low quality), 23 is balanced.
User might say: "compress video", "reduce file size", "make smaller for email"
Command:
ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -crf CRF_VALUE -preset medium -c:a aac -b:a 128k "OUTPUT"
Examples:
ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k "video_compressed.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 28 -preset fast -c:a aac -b:a 96k "video_small.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k "video_hq.mp4"
Extract audio track from video.
User might say: "extract audio as mp3", "get the audio from video", "convert to audio only"
Command:
ffmpeg -y -hide_banner -i "INPUT" -vn -acodec CODEC "OUTPUT.FORMAT"
Codecs by format:
| Format | Codec |
|--------|-------|
| mp3 | libmp3lame |
| aac | aac |
| wav | pcm_s16le |
| flac | flac |
| ogg | libvorbis |
Example - Extract as MP3:
ffmpeg -y -hide_banner -i "video.mp4" -vn -acodec libmp3lame "video.mp3"
Create silent video (remove audio track).
User might say: "remove audio", "mute video", "make silent"
Command:
ffmpeg -y -hide_banner -i "INPUT" -an -c:v copy "OUTPUT"
Example:
ffmpeg -y -hide_banner -i "video.mp4" -an -c:v copy "video_silent.mp4"
Speed up or slow down video.
User might say: "speed up 2x", "slow motion", "make 10x timelapse"
Command:
# Speed up (e.g., 2x speed)
ffmpeg -y -hide_banner -i "INPUT" -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" "OUTPUT"
# Slow down (e.g., 0.5x speed / half speed)
ffmpeg -y -hide_banner -i "INPUT" -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" "OUTPUT"
Formula:
setpts = (1/speed)PTS (2x speed ā 0.5PTS)atempo = speed (must be 0.5-2.0, chain for extremes)Examples:
ffmpeg -y -hide_banner -i "video.mp4" -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" "video_2x.mp4"
ffmpeg -y -hide_banner -i "video.mp4" -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" "video_slowmo.mp4"
Create animated GIF from video.
User might say: "make a gif", "convert to gif", "gif from 0:10 to 0:15"
Command:
ffmpeg -y -hide_banner -i "INPUT" -ss START -t DURATION -vf "fps=15,scale=480:-1:flags=lanczos" -loop 0 "OUTPUT.gif"
Example - GIF of 5 seconds starting at 0:10:
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:00:10 -t 5 -vf "fps=15,scale=480:-1:flags=lanczos" -loop 0 "video.gif"
Rotate or flip video orientation.
User might say: "rotate 90 degrees", "flip horizontally", "rotate upside down"
Commands:
# Rotate 90° clockwise
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=1" -c:a copy "OUTPUT"
# Rotate 90° counter-clockwise
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=2" -c:a copy "OUTPUT"
# Rotate 180°
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=2,transpose=2" -c:a copy "OUTPUT"
# Flip horizontal (mirror)
ffmpeg -y -hide_banner -i "INPUT" -vf "hflip" -c:a copy "OUTPUT"
# Flip vertical
ffmpeg -y -hide_banner -i "INPUT" -vf "vflip" -c:a copy "OUTPUT"
Capture a single frame from video.
User might say: "screenshot at 1:30", "extract thumbnail", "get frame at 5 seconds"
Command:
ffmpeg -y -hide_banner -i "INPUT" -ss TIMESTAMP -frames:v 1 "OUTPUT.jpg"
Example:
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:30 -frames:v 1 "screenshot.jpg"
Overlay image on video.
User might say: "add logo.png", "put watermark in corner", "overlay image"
Positions:
| Position | Overlay Value |
|----------|--------------|
| Top-left | overlay=10:10 |
| Top-right | overlay=W-w-10:10 |
| Bottom-left | overlay=10:H-h-10 |
| Bottom-right | overlay=W-w-10:H-h-10 |
| Center | overlay=(W-w)/2:(H-h)/2 |
Command:
ffmpeg -y -hide_banner -i "VIDEO" -i "LOGO" -filter_complex "overlay=POSITION" "OUTPUT"
Example - Logo in top-right:
ffmpeg -y -hide_banner -i "video.mp4" -i "logo.png" -filter_complex "overlay=W-w-10:10" "video_watermarked.mp4"
Permanently embed subtitles into video.
User might say: "add subtitles", "burn srt file", "embed captions"
Command:
ffmpeg -y -hide_banner -i "INPUT" -vf "subtitles='SUBTITLE_FILE'" "OUTPUT"
Example:
ffmpeg -y -hide_banner -i "video.mp4" -vf "subtitles='subtitles.srt'" "video_subtitled.mp4"
Join multiple videos together.
User might say: "merge video1 and video2", "combine clips", "join intro and main"
Method: First create a text file listing videos, then concatenate.
Step 1 - Create file list (files.txt):
file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'
Step 2 - Concatenate:
ffmpeg -y -hide_banner -f concat -safe 0 -i files.txt -c copy "merged.mp4"
Use these formats for timestamps:
HH:MM:SS ā 01:30:45 (1 hour 30 min 45 sec)MM:SS ā 05:30 (5 min 30 sec)SS ā 90 (90 seconds)HH:MM:SS.mmm ā 00:01:23.500 (with milliseconds)When generating commands:
Example response:
Here's the command to cut your video from 1:21 to 1:35:
ābash
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:21 -to 00:01:35 -c copy "video_trimmed.mp4"
ā
This extracts the segment without re-encoding (using `-c copy` for speed). Output saved as `video_trimmed.mp4`.
Generated Mar 1, 2026
Content creators need to quickly edit videos for platforms like YouTube, Instagram, and TikTok by trimming clips, changing aspect ratios to vertical or square, and compressing files for faster uploads. This skill automates FFmpeg commands to handle these repetitive tasks efficiently, saving time and ensuring format compliance.
Educators and e-learning platforms often convert lecture recordings from various formats to MP4 for compatibility, extract audio for podcasts, and trim unnecessary sections. The skill simplifies these technical edits, allowing non-experts to produce polished educational content without deep video editing knowledge.
Businesses create training videos that require compression for email distribution, aspect ratio adjustments for presentations, and audio removal for silent demos. This skill enables staff to perform basic edits in-house, reducing reliance on external editors and speeding up internal workflows.
Libraries, museums, and archivists convert old video formats like AVI to modern MP4 or MKV for preservation, resize videos to standard resolutions, and extract audio for separate storage. The skill provides precise FFmpeg commands to maintain quality while ensuring long-term accessibility of media assets.
Hobbyists editing home videos or vlogs use this skill to cut and trim footage, change speeds for timelapses or slow motion, and convert files for sharing with family. It lowers the barrier to entry by translating natural language requests into ready-to-use commands, making video editing more accessible.
Offer a free web interface for basic video edits like trimming and conversion, with premium tiers for advanced features such as batch processing, custom aspect ratios, and priority support. Revenue comes from monthly subscriptions and enterprise licenses for businesses needing high-volume editing.
Provide an API that integrates this skill into other applications, allowing developers to add video editing capabilities without building FFmpeg expertise. Charge based on API usage volume, with tiered pricing for small startups to large corporations, generating steady recurring revenue.
License the skill as a white-label tool for marketing agencies, video production studios, and educational platforms to embed in their own services. Revenue is generated through one-time licensing fees or annual renewals, with customization options for specific client needs.
š¬ Integration Tip
Integrate this skill into chatbots or voice assistants to allow users to describe edits in plain language, automatically generating and executing FFmpeg commands for seamless video processing.
Generate spectrograms and feature-panel visualizations from audio with the songsee CLI.
Best practices for Remotion - Video creation in React
Best practices for Remotion - Video creation in React
Long-form AI video production: the frontier of multi-agent coordination. CellCog orchestrates 6-7 foundation models to produce up to 4-minute videos from a single prompt ā scripted, filmed, voiced, lipsync'd, scored, and edited automatically. Create marketing videos, product demos, explainer videos, educational content, spokesperson videos, training materials, UGC content, news reports.
HeyGen AI video creation API. Use when: (1) Using Video Agent for one-shot prompt-to-video generation, (2) Generating AI avatar videos with /v2/video/generat...
Complete toolkit for programmatic video creation with Remotion + React. Covers animations, timing, rendering (CLI/Node.js/Lambda/Cloud Run), captions, 3D, charts, text effects, transitions, and media handling. Use when writing Remotion code, building video generation pipelines, or creating data-driven video templates.