Skip to content

Instantly share code, notes, and snippets.

@wpyoga
Last active January 18, 2023 09:05
Show Gist options
  • Save wpyoga/fd66478de7b5c64b57dfd122dd0d3de2 to your computer and use it in GitHub Desktop.
Save wpyoga/fd66478de7b5c64b57dfd122dd0d3de2 to your computer and use it in GitHub Desktop.
useful ffmpeg switches
ffmpeg -i input.mp4 -c:v libx264 -preset veryslow -pix_fmt yuv420p -vf scale=960:540 -crf 25 -an output.mp4
# -c:v libx264
# use libx264 for encoding
# -preset veryslow
# use the veryslow preset to produce very high quality videos
# -pix_fmt yuv420p
# use yuv420p format, suitable for most videos
# -vf scale=960:540
# rescale the video to 960x540 pixels
# -crf 25
# set the quality to 25 (higher crf = lower quality)
# -an
# do not include audio track in the output file
# other useful ffmpeg options
# -vf minterpolate=fps=60:mi_mode=mci:mc_mode=aobmc:me_mode=bidir:vsbmc=1
# interpolate frames to get a 60fps video
# fps=60
# set the output fps to 60
# mi_mode=mci
# use the mci mode
# mc_mode=aobmc
# me_mode=bidir
# vsbmc=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment