Bitrate suggestions for H.264 encoding

daschneider

Junior Member
Apr 19, 2006
24
0
0
I'm in the process of ripping some BD disks and I'm saving them in a MKV container with H.264 encoding. I'd like to encode them to reduce the file sizes but I don't want to sacrifice the image quality all that much (I'm using Handbreak). I'd be interested in hearing what bit rates people are using in their H.264 encoding and what effect they see in the image quality.

Thanks in advance.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
I'm in the process of ripping some BD disks and I'm saving them in a MKV container with H.264 encoding. I'd like to encode them to reduce the file sizes but I don't want to sacrifice the image quality all that much (I'm using Handbreak). I'd be interested in hearing what bit rates people are using in their H.264 encoding and what effect they see in the image quality.

Thanks in advance.

What is "all that much" when it comes to image quality? Kind of subjective. I'm happy converting Blu-Ray to h264 with 3500-5000 or even lower if I think 720p will be adequate. it really depends on what you play it back on, too. If it's a 32" LCD that you are watching from 7 feet away then a 2500mbps @ 720p will probaly do just fine, but if you're watching 110" projection from 12 feet, 8000-9000 will probably be more appropriate.
 

velillen

Platinum Member
Jul 12, 2006
2,120
1
81
I feel it depends on the movie type as well. Animated movies can be lower bitrates. So can no action movies such as dramas and most chick flicks. Start adding in lots of action and i like to up the bit rate.

I also usually go for "scene" based sizes as well. In other words i shoot for what sizes you would see from scene groups. Starting at a dvd size (4.7gb) and usually ending up at 2-3dvd size.

For instance i did an hour long ski movie. At 4.7gb it was ~8k bit rate which i thought was to low for a 1080p high movement movie. So i bumped it up to 1.5dvd size (~7gb) and it ended up 12mbps bit rate which was much better. Then i did another ski movie and it got 12mbit ish bit rate with only a single dvd sized file.

My target ranges for movies...
720p=8-10mbps bit rates
1080p=10-15mbps bit rates

For finding the "sweet spot" the film will fall into with those bit rate targets i just start with 1 dvd sized, if its to small jump up to 2 dvd size. if over my target then, ill go for a half dvd. If still to small add another dvd size.


Anyways thats how i do it and others have their ways so just pick whatever seems to work for you.
 

0roo0roo

No Lifer
Sep 21, 2002
64,795
84
91
I thought animated required as much, sharp lines are hard to encode I thought:p
been a while since i looked into this...
 

cmdrdredd

Lifer
Dec 12, 2001
27,052
357
126
Since I save my files on a large storage device and stream them, I don't really sacrifice quality for file size. I mean, I use the highest bitrate I can select. With storage being so cheap and having about 5TB of it, it's not a concern at this point. If I ripped a whole 50GB dual layer disk, I could hold about 100 Blu-Rays. Since I rip only the movie and it averages 30GB, that's about 170 movies. I doubt my collection will exceed that.
 

Tegeril

Platinum Member
Apr 2, 2003
2,906
5
81
I encode all of my 1080p rips at 12288kbit abr over two passes. Has always looked great. Having exceeded 200 movies so far and still going strong, this provides a good file size/compression ratio. That said there are many other x264 configuration options worth noting for optimal performance.
 

Aharami

Lifer
Aug 31, 2001
21,205
165
106
yea, I use 12288 kbps as well (12 Mbps). But I have tweaked the advanced settings in handbrake to give me better quality at that compression. It takes about 4-6 hrs on my Q6600 to convert a movie in 2 pass. I let it run nightly.
 

Tegeril

Platinum Member
Apr 2, 2003
2,906
5
81
The options I run take approximately double that time to encode on my Q9550 - it's all in the flags you pass to x264. Can't wait for my i7-2600k build to be finished.
 

velillen

Platinum Member
Jul 12, 2006
2,120
1
81
The options I run take approximately double that time to encode on my Q9550 - it's all in the flags you pass to x264. Can't wait for my i7-2600k build to be finished.

Im curious what you are running. i'd love to see other peoples settings :)

These are the settings i usually use (dont mind the bitrate part)

program --pass 2 --bitrate 1090 --stats ".stats" --slow-firstpass --level 4.1 --bframes 3 --ref 4 --slices 4 --aud --nal-hrd vbr --b-pyramid strict --keyint 24 --min-keyint 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --weightp 0 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --output "output" "input"
 

bobdole369

Diamond Member
Dec 15, 2004
4,504
2
0
constant quality - no more than 60%. DVD's get 50%. I use more or less motion estimation based on the content. Always uneven multihexagon. I end up with roughly 8-12mbitrated files.
 

Tegeril

Platinum Member
Apr 2, 2003
2,906
5
81
I'm not forcing a level (it's coming out High Level 5.0) because these files are only ever played back on computers with ffdshow or the DivX decoder and dropped into an MKV. As such I ignore all of the Blu-ray required options.

x264 --pass 1 --bitrate 12288 --bframes 3 --b-pyramid normal --direct auto --deblock -3:-3 --subme 1 --analyse none --me dia --threads auto --thread-input -o NUL movie.avs
x264 --pass 2 --bitrate 12288 --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid normal --weightb --direct auto --deblock -3:-3 --subme 8 --analyse all --trellis 1 --me umh --threads auto --thread-input -o Movie.mkv movie.avs

Mine is definitely slower as a result of --subme 8 and --me umh. That and it's all done manually without handbrake. More verbose: http://cl.ly/0x261x2G0G1s2g1n183s to give you an idea of pass 1 framerate and pass 2 framerate. The example in the screenshot is Knight and Day, took approximately an hour or so for the first pass and is slowing down since that screenshot to ~5.8fps for pass 2. Q9550 is the CPU doing the work at stock clocks. Can't wait for my i7-2600k :)
 
Last edited: