Overclock.net banner

anyone know how to limit file size in handbrake?

58K views 13 replies 9 participants last post by  bgc87  
#1 ·
I need to compress some video projects to around 7gb so they would fit in a dual layer dvd.
 
#4 ·
Quote:
Originally Posted by hawkeye071292 View Post

I think only certain version support that. What version are you using?
I tried version 0.9.5 its the version that has target file size, then I left my pc overnight to do some tests.
I tried to play the compressed mp4 this morning and vlc opens it, but it doesnt play.

Quote:
Originally Posted by killerhz View Post

get avisynth and install it, then get megui, install that. encode video and choose your bitrate or file size.
sorry i don't know how to do it with handbrake. what kind of files are you using?
Basically I have a 10GB H.264 video that I made with after effects.
I want to compress it to 7GB so it can fit on a dual layer dvd, while keeping the same resolution.
It doesnt matter if I lose a bit of quality.

Im thinking of trying avs converter or xilisoft, since handbrake doesnt work.
 
#5 ·
That's easy to do.
Go into the video tab, and under Quality select Target Size(MB) and enter the amount you want. It's not perfectly accurate, so go just a little bit lower if you're trying to fit it on a DVD. 7GB could be a few megabytes off.

6MNl5eh.png


Alternatively, you could look at the kbps of the 10GB file and do math to find out how much your video would be in kbps if it were 7GB, then select that option and enter that number.
 
#6 ·
Quote:
Originally Posted by Shadow11377 View Post

That's easy to do.
Go into the video tab, and under Quality select Target Size(MB) and enter the amount you want. It's not perfectly accurate, so go just a little bit lower if you're trying to fit it on a DVD. 7GB could be a few megabytes off.

6MNl5eh.png


Alternatively, you could look at the kbps of the 10GB file and do math to find out how much your video would be in kbps if it were 7GB, then select that option and enter that number.
thanks, i found out that only the older version of handbrake had that option.
With the latest version, the only option is to set an average bitrate, so I lowered the bitrate from 13mbps to 10mbps, it should come out less than 8gb if I estimated correctly.

I see in your screenshot that you have checked the "2 pass encoding"
what does that do exactly?
 
#10 ·
#11 ·
I thought I'd write this up for anyone that stumbles across this thread still.

Handbrake no longer offers a target filesize option, but don't fear, this is simple math.

There are a minimum of two different streams that you are creating in handbrake - an audio stream and a video stream. Both are presented in handbrake as kbps (kiloBITs per second).

Audio + Video = total kbps of your video = total filesize of your video.

Say you have a 30 minute video and you want it to be 500 megabytes in size.

Take 500, divide by 30 (number of minutes), divide by 60 (seconds in a minute), and multiple by 1,000 (1 megabyte = 1,000 kilobytes). Sure you could go from megabytes to kiloBITs directly, but I thought this would be more helpful.

There are 8 kilobits in a byte, so (finally) multiply this number by 8.

The result is 2222. You would need a bit rate of 2,222 kbps (or 2.222 mbps) to end up with a filesize of 500 megabytes.

Again - 2.222 is the total audio + video. I'll let you decide if you want 320kbps or 128kbps for your audio bitrate - or whatever works for you. Just know that you'll subtract whatever you pick as your audio bitrate from 2,222 kbps to get your video bit rate. If you have 3 audio tracks, make that subtraction 3 times.

In the quality section of the Video tab in handbrake, select "Average Bitrate", and of course 2-pass encoding for better quality, and enter your calculated video kbps. If you went with 320kbps for audio for example, you'd enter 1902 into this box.

As a quick reminder:
Take your target size / the number of minutes in the video / 60 * 1,000 * 8
To get your required video + audio bitrate.