# see all information
ffmpeg -i input.mp4
# format resolution nicely
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 input.mp4
# limit height to 720px
ffmpeg -i input.mp4 -vf scale="trunc(oh*a/2)*2:720" out.mp4
# limit width to 720px
ffmpeg -i input.mp4 -vf scale="720:trunc(ow/a/2)*2" out.mp4
ffmpeg -y -i input.mp4 -filter_complex "fps=5,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer" output.gif
For webm
videos, two passes should be made. on Windows, redirect to NUL
instead of /dev/null
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y /dev/null
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 2 output.webm
Select frame 34
ffmpeg -i <input> -vf "select=eq(n\,34)" -vframes 1 out.png
ffmpeg -i $input_file -c copy -an $output_file