Creators · Guides
Essential FFmpeg commands every video creator should know.
Copy-paste FFmpeg commands for cutting clips, converting formats, extracting audio, resizing to vertical, burning subtitles, compressing and joining files.
Key takeaways
- FFmpeg is a free command-line tool that can convert, cut, resize and combine almost any audio or video.
- Learn six patterns: cut, convert, extract audio, resize, burn subtitles and compress.
- Copying streams (
-c copy) is fast and lossless, but cuts only at keyframes. Re-encoding is slower but precise. - Always keep your original files.
Install and basic form
Download FFmpeg from its official site, or through a package manager such as winget, and make sure ffmpeg runs from your terminal. The basic shape is:
ffmpeg -i input.mp4 [options] output.mp4
Add -y to overwrite without asking.
1. Cut a clip
Precise cut by re-encoding:
ffmpeg -ss 00:01:30 -to 00:02:10 -i input.mp4 -c:v libx264 -c:a aac clip.mp4
Fast cut without re-encoding:
ffmpeg -ss 00:01:30 -to 00:02:10 -i input.mp4 -c copy clip.mp4
The second is quick but may start slightly early or late, because it must cut at a keyframe.
2. Convert formats
ffmpeg -i input.mov -c:v libx264 -crf 20 -c:a aac output.mp4
-crf controls quality: lower numbers are higher quality and bigger files. Values between 18 and 28 are typical for H.264.
3. Extract audio
ffmpeg -i episode.mp4 -vn -c:a libmp3lame -q:a 2 episode.mp3
For a lossless copy of the audio track, use -c:a copy with a suitable container, such as .m4a for AAC.
4. Resize and make vertical
Scale to a width of 1280, keeping the ratio:
ffmpeg -i input.mp4 -vf "scale=1280:-2" output.mp4
Crop a horizontal video to a 9:16 centre:
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4
See vertical video from a horizontal podcast for composition tips.
5. Burn subtitles into a video
From an SRT file:
ffmpeg -i input.mp4 -vf "subtitles=captions.srt" -c:a copy output.mp4
For Hindi, make sure the file is UTF-8 and a Devanagari-capable font is available. Learn the difference in burned-in captions vs SRT files.
6. Compress for sharing
ffmpeg -i input.mp4 -c:v libx264 -crf 26 -preset slow -c:a aac -b:a 128k small.mp4
Slower presets give smaller files at the same quality, but take longer.
7. Join clips
Create a text file list.txt:
file 'part1.mp4'
file 'part2.mp4'
Then:
ffmpeg -f concat -safe 0 -i list.txt -c copy joined.mp4
The clips must share the same codecs and settings for -c copy to work.
8. Make a GIF or thumbnail
A single frame at ten seconds:
ffmpeg -ss 10 -i input.mp4 -frames:v 1 thumb.jpg
9. Check what a file contains
ffprobe -hide_banner input.mp4
It lists codecs, resolution, frame rate and duration.
Tips
- Put
-ssbefore-ifor fast seeking. - Use quotes around file names with spaces.
- If it fails, read the last lines of the error. They usually name the problem.
- Hardware encoders such as NVENC can speed up conversion on supported graphics cards, with slightly different quality.
Frequently asked questions
Is FFmpeg free?
Yes, it is open source. Check its licence if you redistribute it inside a product.
Why does my cut start at the wrong place?
You used -c copy, which cuts on keyframes. Re-encode for frame-accurate cuts.
Is there a graphical version?
Several apps use FFmpeg inside. The command line is the most flexible.
Subtitle Studio and R.A.S use FFmpeg under the hood.
See Subtitle Studio