Target Size x264 settings?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Brewtal
Posts: 9
Joined: Mon Aug 16, 2010 1:31 pm

Target Size x264 settings?

Post by Brewtal »

Howdy All,

SImple question from a simple man.

What settings does Handbrake use for x264 when using Target Size setting?

THanks,
Brewtal
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Target Size x264 settings?

Post by TedJ »

Um, no particular x264 options since no Handbrake preset uses it.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Target Size x264 settings?

Post by mduell »

The same it uses for any other rate control method: the defaults or the ones you specify.
Brewtal
Posts: 9
Joined: Mon Aug 16, 2010 1:31 pm

Re: Target Size x264 settings?

Post by Brewtal »

Thanks for the replies.

So Handbrake will use whatever settings I've specificed under advanced options?

If that's the case, then I guess I'm confused.
How can it stick to a target file size if I tell it to used high profile settings?
Does it override those higher profile settings to maintain a give file size?

Thanks again,
Brewtal
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Target Size x264 settings?

Post by mduell »

Brewtal wrote:So Handbrake will use whatever settings I've specificed under advanced options?
Yes.
Brewtal wrote:If that's the case, then I guess I'm confused.
How can it stick to a target file size if I tell it to used high profile settings?
Does it override those higher profile settings to maintain a give file size?
High Profile is unrelated to file size. No overriding is necessary.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Target Size x264 settings?

Post by dynaflash »

Brewtal wrote:If that's the case, then I guess I'm confused.
How can it stick to a target file size if I tell it to used high profile settings?
Does it override those higher profile settings to maintain a give file size?
I think your getting confused by the concept of constant quality. In Target Size mode HB will choose a bitrate to achieve your targeted file size whereas when using constant quality it will maintain a given visual quality bitrate be damned.
Brewtal
Posts: 9
Joined: Mon Aug 16, 2010 1:31 pm

Re: Target Size x264 settings?

Post by Brewtal »

dynaflash wrote:I think your getting confused by the concept of constant quality. In Target Size mode HB will choose a bitrate to achieve your targeted file size whereas when using constant quality it will maintain a given visual quality bitrate be damned.
Yes, I believe I am confused.

I'll try to rephrase my question, I'm probably too dumb to really understand what I'm asking...

If I want an .mkv with a file size of say 4400MB, what does Handbrake do about the x264 settings?

Don't x264 settings affect the bitrate?

Thanks for your longsuffering,
Brewtal
Last edited by TedJ on Tue Aug 17, 2010 1:46 am, edited 1 time in total.
Reason: Fixed borked quote block.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Target Size x264 settings?

Post by TedJ »

Handbrake doesn't do anything about x264 settings based on your chosen target filesize or bitrate.

x264 settings do affect bitrate, but only indirectly... they will affect the required bitrate to reach a desired quality level if using constant quality, or will affect perceived quality if using ABR.
Brewtal
Posts: 9
Joined: Mon Aug 16, 2010 1:31 pm

Re: Target Size x264 settings?

Post by Brewtal »

TedJ, thank you for your patience, I greatly appreciate it.

Just for my own clarification, if I set the Advanced Options to High Profile and set a Target Size of 4400MB, Handbrake will use the Advanced options I set and decide what bitrate is needed to meet the file size requirement, correct?

And conversely, if I use the same Advanced Options and set Constant Quality at 20, Handbrake will decide what bitrate is needed to keep the quality constant, correct?

I'm just trying to understand so I can determine the best setting for converting my blurays to MKV on my HTPC.
I'm mainly concerned with quality, then file size and speed isn't of great importance to me.
I've done some test backups and gotten from around 1 to 4 fps and file sizes approximately 20% of original, I didn't know if I was overdoing it and could acheive a smaller file size with the same quality.
I've been using CQ of 20 will a minimum of the default High Profile settings with UMH to perform my backups.

Thanks again,
Brewtal
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Target Size x264 settings?

Post by dynaflash »

Brewtal wrote:Just for my own clarification, if I set the Advanced Options to High Profile and set a Target Size of 4400MB, Handbrake will use the Advanced options I set and decide what bitrate is needed to meet the file size requirement, correct?

And conversely, if I use the same Advanced Options and set Constant Quality at 20, Handbrake will decide what bitrate is needed to keep the quality constant, correct?
Correct on both.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Target Size x264 settings?

Post by mduell »

Brewtal wrote:Just for my own clarification, if I set the Advanced Options to High Profile and set a Target Size of 4400MB, Handbrake will use the Advanced options I set and decide what bitrate is needed to meet the file size requirement, correct?
Handbrake will set the video bitrate independently of the advanced options you provide: (size / time) - audio bitrate = video bitrate
That bitrate determination is then passed to x264lib which is responsible for implementing your advanced options and hitting your target bitrate.
Brewtal wrote:And conversely, if I use the same Advanced Options and set Constant Quality at 20, Handbrake will decide what bitrate is needed to keep the quality constant, correct?
Handbrake will tell x264lib to maintain RF 20, as well as passing your advanced options (as above).
Brewtal wrote:I'm mainly concerned with quality, then file size and speed isn't of great importance to me.
Then I'd suggest using a quality target.
Brewtal wrote:I've done some test backups and gotten from around 1 to 4 fps and file sizes approximately 20% of original, I didn't know if I was overdoing it and could acheive a smaller file size with the same quality.
Percentage of original file size is not terribly meaningful except as a very rough ballpark. Some movies will be 10%, some will be 50%.
Brewtal wrote:I've been using CQ of 20 will a minimum of the default High Profile settings with UMH to perform my backups.
RF 20 is a bit overkill for full resolution HD encodes; you can drop the file size about 25% by going to RF 23. There will be a loss in objective quality, but I doubt you'll notice it. Take a movie you hate and watch it with progressively higher Rate Factor to see what you're willing to tolerate. I'm generally in the mid 20s for 1080 material, but I've been satisfied with results at RF 29 in a situation where I was tight on space.
Brewtal
Posts: 9
Joined: Mon Aug 16, 2010 1:31 pm

Re: Target Size x264 settings?

Post by Brewtal »

Thanks for the info. Very intelligent ppl here.

This is off the original topic, but I'm trying to do some encoding tests on a smaller sample than a whole movie so it goes more quickly.

Is there a way I can extract a single chapter from a bluray or the mkv I have made of the bluray?

Thanks again,
Brewtal
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Target Size x264 settings?

Post by mduell »

HB doesn't support BR chapters, but download the nightly and you can encode between arbitrary time points.
Post Reply