Estimating Handbrake Output File Length - Solved
Posted: Tue Jun 11, 2019 8:16 pm
Estimating Handbrake Output File Length - Solved
So Handbrakes programmers cant figure out how to estimate output file size in a way that is helpful to users so i figured it out and will program it in qb64.
Its pretty simple really
so handbrake knows the size and length of the source and the preview... it simply needs to take this information and produce the estimate. from the tests ive run it seems like if a video is over 500 mbs you should times your estimate by 1.3... as people mess with this algorithem they may find differnet formats react differently to the algorithem and other variables may affect it... those will probably need to have special adjustments to make the algorithem more accurate... remember were not trying to come up with the exact size of the output file... were just trying to get a rough estimate so people can adjust their settings to get a outputfile size close to what they want. So here it is....
say your source file is 28:52
28x60=1680+52=1732 seconds long
your 10 second preview file size is 335kb
335x1732=580220 just move the decimal over 58.02mb
actual size turned out to be 57.59mb
ive found for really big files with short lengths for instance 750mb file only 23 minutes long the estimate falls short so the program i write to do this little estimate is going to times files 500mb and bigger at 1.3... in my tests that gives me a close estimate but as people use it they will find different formats and other variables are going to affect this very simple program so people will have to compensate by identifying the reason for the discrepancies and programming in code that compensates.... generally speaking this program works really well for 30min videos and 1.5-2 hour videos just with the simple algorithm i have described... when i get done programming it in qb64 ill append the code to this post and post it again as a new post to the thread
So Handbrakes programmers cant figure out how to estimate output file size in a way that is helpful to users so i figured it out and will program it in qb64.
Its pretty simple really
so handbrake knows the size and length of the source and the preview... it simply needs to take this information and produce the estimate. from the tests ive run it seems like if a video is over 500 mbs you should times your estimate by 1.3... as people mess with this algorithem they may find differnet formats react differently to the algorithem and other variables may affect it... those will probably need to have special adjustments to make the algorithem more accurate... remember were not trying to come up with the exact size of the output file... were just trying to get a rough estimate so people can adjust their settings to get a outputfile size close to what they want. So here it is....
say your source file is 28:52
28x60=1680+52=1732 seconds long
your 10 second preview file size is 335kb
335x1732=580220 just move the decimal over 58.02mb
actual size turned out to be 57.59mb
ive found for really big files with short lengths for instance 750mb file only 23 minutes long the estimate falls short so the program i write to do this little estimate is going to times files 500mb and bigger at 1.3... in my tests that gives me a close estimate but as people use it they will find different formats and other variables are going to affect this very simple program so people will have to compensate by identifying the reason for the discrepancies and programming in code that compensates.... generally speaking this program works really well for 30min videos and 1.5-2 hour videos just with the simple algorithm i have described... when i get done programming it in qb64 ill append the code to this post and post it again as a new post to the thread