View Single Post
Old 4th November 2018, 04:21   #6568  |  Link
AVspace
Registered User
 
Join Date: Oct 2018
Posts: 19
Quote:
Originally Posted by hello_hello View Post
It can't really work any other way. You've picked a speed preset that uses 16 ref frames. If you don't specify a profile/level, x264 will try to pick a level that allows 16 ref frames, but the level is also based on resolution and frame rate (and maybe other criteria).
If you specify a faster speed preset, x264 may choose a lower level if it complies with the number of ref frames for the faster speed preset (and the resolution and frame rate etc).

When you specify a level and a speed preset, the level wins, so for the very slow preset and level 4.1 (for example), you might find x264 limits the number of reference frames, and limits them more for higher resolutions. If you specify the number of ref frames in the command line (ie --ref 5), that's what'll be used regardless of the specified level or speed preset.



If you open MeGUI's x264 encoder configuration and "show advanced settings" is checked, when you select a speed preset or tuning or target playback device, MeGUI changes the advanced settings in the GUI to their new default values, so you can switch to the other tabs to see what they'll be. For the x264 defaults, it'll show 3 ref frames in the GUI. For the slow speed preset it changes to 5. The animation tuning increases the number of ref frames (amongst other things).

I don't think any settings are changed just be selecting a level, as whether they should be changed or how much they need to be changed depends on the resolution and frame rate, so it'd be x264 making the adjustments to be complaint with any specified level. MeGUI's encoder configuration has no way of knowing what the resolution or frame rate will be anyway.

So yeah, if you want to reduce the number of ref frames either pick a level and let x264 adjust it, or if you don't care about level compliance, specify a particular number of ref frames yourself.

MeGUI only adds something to the command line when it differs from the defaults for a particular speed preset or tuning (unless you select a target playback device that requires restricted settings). That means if you select the "slower" speed preset (for example) which defaults to 8 ref frames, and you want to specify (force) 8 ref frames regardless of the selected level, you'd have to manually add it to the custom command line section.

If you were to add --ref 8 to the custom command line section, the number of ref frames specified in the encoder configuration under "Frame Type" would be ignored by MeGUI (changing the number of ref frames in the GUI would do nothing) as options in the custom command line section take precedence.

The only thing x264 doesn't automatically enforce when you specify a level (as far as I know) are the level compliant VBV settings. That's why, when you select Level 4.2 (for example), MeGUI automatically adds "--vbv-bufsize 78125 --vbv-maxrate 62500" to the x264 command line.

Selecting the maximum level your playback device supports is probably a good idea. Level 4.1 (or higher) support is fairly standard these days. That way you'll have a complaint encode regardless of the speed preset. If you want to reduce the number of ref frames for a given encode, you can always specify that too.
Thanks for the help. I think i have a better understanding of it now after the replies.

The only reason i was changing it to level 4.2 was because i wanted all the benefits of very slow but relative to a lower setting basis like i don't feel like i need 16 ref frames but i might need other things very slow provides in it's preset and was attempting to manually limit the encode from going passed a certain threshold. I've seen a lot of other encode settings end up in the 4.1 and 4.2 range which is why i was focusing on that level range because that's about around the settings i'm using.

I see now that none of the various encoders automatically does this like i thought it would. I thought it automatically detected the source and adjusted settings in a different way. It's not a MeGui thing it's just the way it works.


Is it typically okay to take the very slow preset and apply it and then to manually add my own ref frames to the preset profile? Essentially what i want to do as my goal is have the benefit of the high motion estimate settings for example "multi-hexagon" subme10 and then i want to combine that with more realistic ref/bframes like 9 ref frames and 9 bframes or something like this.

Would that be a decent approach? What i want to know is if it's not a good idea to change something like this from the preset. Meaning it's usually better to change the preset rather than to change a few settings. Maybe it's at 16 ref frames for a good reason and changing it messes things up, that's what i'm trying avoid. I'm looking to take the best preset i can go with and lower just a few things like ref frames to pick up the speed efficiency to get a mix of high settings and efficiency.

Last edited by AVspace; 5th November 2018 at 01:13.
AVspace is offline   Reply With Quote