Use this mode to retain good visual quality and do not care about the exact bitrate or filesize of the encoded file.
ffmpeg -i "input.mkv" -map 0:v -map 0:a:m:language:eng? -map 0:s:m:language:eng? -map 0:d? -map 0:t? -c:v libx265 -crf 23 -c:a copy -threads 12 -bufsize 4M "out.mkv"
ffmpeg -i input -c:v libx265 -crf 26 -preset fast -c:a aac -b:a 128k output.mp4
NOTE: