.x265
From LinuxReviews
Jump to navigationJump to searchBest compression for video formats as of now. Can be used with the mp4 or mkv container formats.
ffmpeg -i INPUT -an -x265-params crf=25 OUT.mp4
You can also mux it in Matroska (.mkv):
ffmpeg -i INPUT -an -x265-params crf=25 OUT.mkv
ffmpeg -i input -c:v libx265 -c:a copy output.mp4