FFmpeg

Updated at
DescriptionCommand
Play videoffplay
Get file metadataffprobe
Convert format (default settings)ffmpeg -i input.mp4 output.mp4
Concatenate multiple filesffmpeg -i vids.txt -f concat
Specify start and end time-ss 00:00:00 -to 00:00:00
Set video codec-c:v [mpeg4, libx264, libx265]
Set audio codec-c:a [mp3, aac, flac, opus]
Copy streams without re-encoding-c copy
Set video bitrate (e.g., 7500 kbps)-b:v 7500k
Set audio bitrate (e.g., 320 kbps)-b:a 320k
Set frame rate (e.g., 30 fps)-r 30
Set resolution (e.g., Full HD)-s 1920x1080
Downmix audio to stereo-ac 2 (use without -c:a copy)
Keep all video and audio streams-map 0
Map video streams-map 0:v[:0\]
Map audio streams-map 0:a[:0\]
Map subtitle streams-map 0:s[:0\]
Remove chapters-map_chapters -1
Disable subtitle inclusion-sn
# convert complex mkv to simple stereo mp4
ffmpeg -i input.mkv -ss 00:10:00 -to 00:20:00 -c:v libx264 -c:a aac -b:a 320K -ac 2 -map 0 -sn output.mp4

# burn Subtitles into Video:
ffmpeg -i input.mp4 -vf subtitles=input.srt output.mp4