>>92108281writing the same thing in powershell
ffprobe for length, divide 32 by seconds for mbps, use whatever powers of ten suit you
mediainfo or something probably works, too, but having a single dependency is nice
encoding isn't an exact science, so you can either leave a little headroom or gamble going over and just redoing it and the whole thing's a waste for a 2 second 720p loop off twitter, use constant rate factor for small files if you care about the difference
and then there's scaling to consider when the bitrate's too low and you start getting cringe vp9 artifacts