Donson Intelligent Editing
Use when performing video/audio processing tasks including transcoding, filtering, streaming, metadata manipulation, or complex filtergraph operations with FFmpeg.
Use when performing video/audio processing tasks including transcoding, filtering, streaming, metadata manipulation, or complex filtergraph operations with FFmpeg.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Comprehensive guide for professional video and audio manipulation using FFmpeg and FFprobe.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play almost anything that humans and machines have created. It is a command-line tool that processes streams through a complex pipeline of demuxers, decoders, filters, encoders, and muxers.
# Basic Transcoding (MP4 to MKV) ffmpeg -i input.mp4 output.mkvChange Video Codec (to H.265/HEVC)
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -c:a copy output.mp4
Extract Audio (No Video)
ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 2 output.mp3
Resize/Scale Video
ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4
Cut Video (Start at 10s, Duration 30s)
ffmpeg -i input.mp4 -ss 00:00:10 -t 00:00:30 -c copy output.mp4
Fast Precise Cut (Re-encoding only the cut points is complex, so standard re-encoding is safer for precision)
ffmpeg -ss 00:00:10 -i input.mp4 -to 00:00:40 -c:v libx264 -crf 23 -c:a aac output.mp4
Concatenate Files (using demuxer)
Create filelist.txt: file 'part1.mp4' \n file 'part2.mp4'
ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.mp4
Speed Up/Slow Down Video (2x speed)
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output.mp4
| Option | Use When |
|---|---|
| Standard H.264 encoding (best compatibility) |
| H.265/HEVC encoding (best compression/quality) |
| Constant Rate Factor (lower is higher quality, 18-28 recommended) |
| Encoding speed vs compression (ultrafast, medium, veryslow) |
| Pass-through audio without re-encoding (saves time/quality) |
| Filter | Use When |
|---|---|
| Changing resolution (e.g., for 1080p width) |
| Removing edges (e.g., ) |
| Rotating video (1=90deg CW, 2=90deg CCW) |
| Changing frame rate (e.g., ) |
| Adding text overlays/watermarks |
| Picture-in-picture or adding image watermarks |
| Adding fade-in/out effects (e.g., for first 30 frames) |
| Adjusting audio levels (e.g., for 150% volume) |
| Changing video speed (e.g., for double speed) |
| Changing audio speed without pitch shift (0.5 to 2.0) |
| Tool/Option | Use When |
|---|---|
| Getting detailed technical info of a file |
| Setting global metadata tags |
| Selecting specific streams (e.g., ) |
Use
filter_complex when you need to process multiple inputs or create non-linear filter chains.
# Example: Adding a watermark at the bottom right ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=main_w-overlay_w-10:main_h-overlay_h-10" output.mp4Example: Vertical Stack (2 videos)
ffmpeg -i top.mp4 -i bottom.mp4 -filter_complex "vstack=inputs=2" output.mp4
Example: Side-by-Side (2 videos)
ffmpeg -i left.mp4 -i right.mp4 -filter_complex "hstack=inputs=2" output.mp4
Example: Grid (4 videos 2x2)
ffmpeg -i v1.mp4 -i v2.mp4 -i v3.mp4 -i v4.mp4 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2" output.mp4
Example: Fade Transition (Simple crossfade between two clips)
Requires manual offset calculation, using xfade is better
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "xfade=transition=fade:duration=1:offset=9" output.mp4
| Platform | Codec | Command |
|---|---|---|
| NVIDIA (NVENC) | H.264 | |
| Intel (QSV) | H.264 | |
| Apple (VideoToolbox) | H.265 | |
-map for complex files to ensure you get the right audio/subtitle tracks.-ss before -i for fast seeking (input seeking), or after -i for accurate seeking (output seeking).No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.