BFrames, setting in general.

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
dmitche3
Posts: 13
Joined: Sun Dec 16, 2012 4:02 pm

BFrames, setting in general.

Post by dmitche3 »

First off, I'm extremely pleased with my experiences with Handbrake. I have two SamDung TVs (ES6500 and EH5300) that play very well using Serviio. As Samsung's AllPlay server doesn't find files that have Windows compression turned on. :(

While I'm happy with the settings that I have chosen, and everything that I compress encodes, is there a reason that I should not be selecting B-Frames and Reference frames at the maximum of 10? I'm pretty anal about quality and I want the smallest file sizes. As I'm hitting 2TB of video and I'm anal about having two backups, I don't want to have to buy more disk for some time. :)

I guess my question is, will I regret these options in the future should I need to replace my TVs in 5-10 years? Or will these settings become 'the norm' with improved technology?

Any thoughts are welcomed. I need a reality check from temps de temps.
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: BFrames, setting in general.

Post by mduell »

1) It's really slow to encode. There are other options that would be better tradeoffs in terms of compression vs time spent. See the thread on x264 presets for the best practices on what settings to use for slower, more efficient encoding.

2) Too many refs may increase the level beyond what your playback devices support. See wikipedia for the levels and consult your vendor about what level is supported.
dmitche3
Posts: 13
Joined: Sun Dec 16, 2012 4:02 pm

Re: BFrames, setting in general.

Post by dmitche3 »

Thanks for the reply. Yes, it does take a long time but that's not important to me. As I am only ripping my own DVDs and being disabled I have quite a bit of time. :wink: I did read the note on H264 and a few WIKIs lately on the different frames, as well as some of Handbrake's users preferred settings.

It looks like I'm good to keep going. Now to re-rip my DVDs that I did with Xilisoft crapware. :(
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: BFrames, setting in general.

Post by JohnAStebbins »

dmitche3 wrote:Thanks for the reply. Yes, it does take a long time but that's not important to me. As I am only ripping my own DVDs and being disabled I have quite a bit of time. :wink: I did read the note on H264 and a few WIKIs lately on the different frames, as well as some of Handbrake's users preferred settings.

It looks like I'm good to keep going. Now to re-rip my DVDs that I did with Xilisoft crapware. :(
It not only takes longer, but there is zero, zilch, nada practical value in a high number of b-frames and ref frames unless you are encoding animation. There is a summary in the activity log that tells you what percentage of each number of consecutive b-frames were used. I suggest you encode a few samples, look at the log to determine a practical value, and use that. Movies generally require no more than 5 b-frames and animation can benefit from 10. Good ref frames values are 3 for movies and 6 for animation. Only if you are doing encodes of screencasts or other highly static content would higher values be beneficial.

Code: Select all

x264 [info]: consecutive B-frames:  3.4%  4.9%  7.6% 22.8% 40.2% 21.2%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
The first number is % of sequences with 0 consecutive b-frames. Second is sequences with 1 consecutive b-frame. Etc.

The example above is from an encoding of 1 chapter of a movie. As you can see, the number of b-frames used drops off to 0 at 5 b-frames.
dmitche3
Posts: 13
Joined: Sun Dec 16, 2012 4:02 pm

Re: BFrames, setting in general.

Post by dmitche3 »

Fantastic! That sounds like a great idea. I'll examine the log immediately. :)

Thanks very much!
dmitche3
Posts: 13
Joined: Sun Dec 16, 2012 4:02 pm

Re: BFrames, setting in general.

Post by dmitche3 »

Well, it looks like I'll keep the 10 BFrames. :) As I'm seeing pretty much the same #s.
Thanks. I'll continue to monitor from time to time. The series that I'm recording now are B&W which may account for the higher consecutive frames.

x264 [info]: consecutive B-frames: 0.5% 0.3% 0.3% 4.3% 8.4% 39.0% 11.3% 13.2% 8.7% 11.7% 2.4%
mduell
Veteran User
Posts: 8205
Joined: Sat Apr 21, 2007 8:54 pm

Re: BFrames, setting in general.

Post by mduell »

If it's really black and white you can add the -g or -grayscale option; lets HandBrake know the movie is black and white, so it doesn't bother keeping track of color information. This can reduce green tinge or rainbow shimmering in black and white encodes.
Post Reply