ffmpeg -i <input> -vcodec libx264 -bf 8 -g 300 -crf 18 -preset veryslow -tune film -profile:v high -g 300 -acodec aac out.mkv