You've got some learning to do
Maybe start here:
https://trac.ffmpeg.org/wiki/Encode/H.265
A basic command that will give you decent compression for most content without getting too slow would be something like the following:
Code:
ffmpeg -i input.mp4 -c:v libx265 -preset medium -crf 22 output.mp4
If you want to downscale (e.g. to 1080p assuming you're coming from a UHD source)
Code:
ffmpeg -i input.mp4 -vf scale=w=-2:h=1080 -c:v libx265 -preset medium -crf 22 output.mp4
Drop the CRF value to increase bitrate / increase quality. Raise the CRF to do the opposite.
I'd suggest determining whether the default medium is tolerable in terms of speed. Use the slowest preset you can stand, and then tune your CRF value.