FFmpeg cheatsheet

FFmpeg: Convert and inspect

7 common FFmpeg tasks.

Check the version

Print the FFmpeg version and build options.

ffmpeg -version

Inspect a file

Show streams, codecs, duration and bit rate.

ffprobe -hide_banner input.mp4

Inspect a file as JSON

Print format and stream details in a machine-readable form.

ffprobe -v error -show_format -show_streams -of json input.mp4

Convert between formats

Convert a file, choosing the format from the output file name.

ffmpeg -i input.mov output.mp4

Change the container without re-encoding

Copy the streams as they are. This is fast and lossless.

ffmpeg -i input.mkv -c copy output.mp4

Overwrite without asking

Replace the output file if it exists. Use -n to never overwrite.

ffmpeg -y -i input.mp4 output.webm

List supported encoders

Show the encoders your build supports.

ffmpeg -encoders

Was this page helpful?