Choosing encoding options is not a hunt for the 'best-quality settings'. It is a sequence of choices. The destination narrows the codec, the codec narrows the rate control, and the preset comes last to balance time.
Search for ffmpeg commands and you will find plenty of posts saying 'this is the right option'. But the answer differs from post to post because the video is going to different places. Instead of memorizing options, this chapter lays out what to ask, and in what order. What each individual option means was covered in earlier chapters, so here we only add short links.
The first thing to ask is 'who will watch this file, on what device and player'. Whether it is for archiving on your own drive, a file that a platform will re-encode, a <video> tag on your own site, or a file to send in a messenger decides almost all the rest. What you settle at this step is not the codec but the constraints. Write down whether there is a size limit, whether you control the playback devices, and whether this is a source you may touch up again later.
You don't pick the codec that compresses best; you pick from what the playback device can decode. Without a hardware decoder, the device has to decode in software, a difference covered in Hardware vs. software decoding. You can see what your own device plays right away with the codec support checker, and the efficiency gap between encoders is in Size and quality by CRF (measured).
In this site's measurements, the size needed to reach the same VMAF was generally x264 > x265 > SVT-AV1, and on all four clips SVT-AV1 reached a similar or higher VMAF at 41–63% of x264's size (crf-sweep). But a small file is useless if it won't play, so compare efficiency only after the compatibility check passes.
The core question is 'do I fix the quality and accept whatever size comes out (CRF), or fix the size and accept whatever quality comes out (2-pass, ABR)?' If there is a size limit, the latter is the default; if not, the former. The next lesson looks at this in detail using this site's numbers.
Choose the preset last. Only once the first three are settled can you ask 'is this much time enough?'. If you touch the preset before settling the codec and CRF, even the same CRF gives different quality depending on the preset, and the comparison gets tangled (see the measurements in Lesson 3).
If you pick the preset first, or encode in AV1 based only on codec efficiency and then it won't play on the other person's device, you have to start over. The earlier the step, the higher the cost of undoing it, so decide from the front.
Where the file is ultimately played or delivered: archive, platform upload, web embed, messenger sharing, and so on. It determines the constraints on your encoding settings.
How the encoder decides how many bits to spend on each frame. Examples are CRF, which fixes quality, and ABR or 2-pass, which hit an average bitrate.
What is the most natural order for deciding encoding settings?