How the estimate works
Available bits are the target file size minus audio and estimated container overhead, divided by duration. Real muxed output can differ, so leave headroom and verify with a test encode.
video kbps=
((size × 8 × 1000) × (1 − overhead)) ÷ seconds − audio kbps