I am trying to understand how 2-pass (h264) encoding works in more detail than "first pass analyzes, second pass encodes". Most tutorials I found online use the
-b:v option on the first and second pass despite a target bitrate being quite useless on an analyzing pass that is supposed to be analyzing the video instead of encoding anything. My first question therefore is, what exactly does the first pass of an h264 encoding do and how does the
-b:v option affect it?
Also, as far as I understand the 2-pass encoding is supposed to output a mostly constant bitrate, but with a more uniform quality than a 1-pass CBR encoding which uses too much bits in less complex scenes and maybe not enough bits in more complex scenes. My second question therefore is, how does the
-b:v option affect the second pass differently than a 1-pass CBR encoding? Is it more like an "average bitrate" option for the second pass?