I made this because my upload speed sucks and instead of uploading my files to 8mb.video to make it uploadable to Discord, I made a calculator to calculate the bitrate required for the highest quality for the video whilst staying under the 10MB file size limit. So instead calculating the bitrate myself everytime I just put the video length and file size wanted into the calculator and put the bitrate into HandBrake. Sometimes the bitrate outputed is too high or low and there can be more quality squeezed out the file size, but that's not the fault of the calculator but the fault of the video itself, the video encoder used when re-encoding, and other settings, you can still do trial and error to get the highest bitrate for the re-encoded video. Sorry for yapping but I just wanted to say everything I wanted to.
For the Python version EndCod3r/bitrate_calculator.py