Do CRF 18 slow with x265 10 bit for high quality 1080p.
ffmpeg -i "input.mkv" -pix_fmt yuv420p10le -c:v libx265 -preset slow -crf 28 -c:a copy -x265-params profile=main10 "output".mkv
NOTE:
ffmpeg -y -i "input".mkv -c:v libx265 -b:v 1500k -x265-params pass=1 -an -f null /dev/null && \ ffmpeg -i "input".mkv -c:v libx265 -b:v 1500k -x265-params pass=2 -c:a copy "output".mkv