I usually do conversions with ffmpeg 1 pass CRF 22 with maxrate 1400k for some movies to convert them to 720p and generate smallest size with best quality, the parameters I use is:
c:v libx264 -vf format=yuv420p,scale=1280:-2 -crf 22 -maxrate 1400k -bufsize 7000k
Doing this too much I found that apart from the black bars that reduces bitrate, the color theme, number of high movement scenes... etc affects the bitrate too much, CRF 22 makes sure you get constant quality at every scene, that makes bitrate reaches my maximum 1400k at some scenes while the reset of the scenes in some movies are barely 800k, this result the average bitrate for a same movie reaches for example about 1100k, for these movies I do the encoding again with lower maxrate (Ex:1100k) and I get same quality with lower average rate 1000k.
Now I'm wondering is there any automated method in 2 pass to get same result? For example doing the first pass in CRF 22 and the second pass at average bitrate of first pass to lower the quality of those bitrate rages in first pass?