Convert, extract, trim, resize, compress and screenshot media from the command line. Tap to copy.
ffmpeg -i in.mov out.mp4Convert a file to another formatffmpeg -i in.mp4 out.gifTurn a video into a GIFffmpeg -i in.wav out.mp3Convert audio to MP3ffmpeg -i in.mp4 -vn out.mp3Extract the audio from a videoffmpeg -i in.mp4 -ss 00:00:10 -t 5 out.mp4Clip 5 seconds starting at 10sffmpeg -i in.mp4 -vf scale=1280:-1 out.mp4Resize video to 1280px wide, keep ratioffmpeg -i in.mp4 -an out.mp4Remove the audio trackffmpeg -i in.mp4 -r 30 out.mp4Change the frame rate to 30fpsffmpeg -i in.mp4 -crf 23 out.mp4Re-encode with a quality/size tradeoffffmpeg -i in.mp4 -b:v 1M out.mp4Encode at a target video bitrateffmpeg -i in.mp4 -c copy out.mkvRewrap without re-encoding (fast)ffmpeg -i in.mp4 -ss 5 -vframes 1 shot.pngGrab a single frame as an imageffmpeg -i in.mp4 -vf fps=1 frame_%03d.pngExport one frame per secondffprobe in.mp4Print media info about a fileffmpeg converts almost anything with ffmpeg -i input output — the extensions decide the formats. Add -ss and -t to trim, -vf scale to resize, -crf to control quality, and -c copy to rewrap without re-encoding (much faster). Use ffprobe to inspect a file.