View Single Post
Old 11th October 2014, 16:47   #14  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by r0lZ View Post
I encode my clip without any parameter, except --preset ultrafast. The encoder uses the baseline profile. (I don't think the level is relevant for the baseline profile, but I may be wrong.)
Profiles and Levels are orthogonal. The Level is as relevant (or irrelevant) with "Basline" Profile as with any other Profile.

Quote:
Originally Posted by r0lZ View Post
Then, I encode the same clip with --preset placebo. The encoder uses the high profile and level 5.1.
That means that my clip complies to all profiles between baseline and high, and to all levels currently implemented (up to 5.1).
When it has enough time, x264 selects the "best" profile and level automatically. For me, and obviously for x264, "best" is synonym with "highest" and not "lowest". Am I wrong?
Totally wrong!

For the last time: The Profile specifies witch features of H.264 you are allowed to use (or not). And x264 will select the lowest possible Profile that your stream compiles to. Always. No exceptions

So if you enable any "High" Profile features (e.g. "8x8 vs. 4x4 Transform Adaptivity"), as is the case with most of the slower presets (including "Placebo" preset), then your stream requires "High" Profile and that is exactly what x264 will set!

If, on the other hand, you only use "Baseline" Profile features, as is the case with "ultrafast" preset (since it disables pretty much everything that can be disabled), you obviously can get away with "Baseline" Profile. And that will be set.

Quote:
Originally Posted by r0lZ View Post
Now, if you want to encode the clip of the example above and be compatible with my TV WITHOUT SPECIFYING FANCY OPTIONS, you have 3 possibilities.

1. You can use a fast preset, but the result is unpredictable, and it is a pity to waste disc space.

2. You can specify --level 4.1, and everything is perfect, regardless of the preset you use (but as long as you don't specify incompatible options at the same time).

3. You can omit --level, but specify a bunch of other options so that in practice, you obtain also level 4.1. Since many options are somewhat obscure, and you can always make a mistake, my preferred solution is, by far, point 2.
Since x264 will always set the "correct" Profile (and also the proper Level, as long as you don't use"--level") for you, there is usually no need to use either "--profile" or "--level".

Only reason the use "--profile X" is when you explicitly want to apply the restrictions of Profile X to your x264 settings, because you know that the highest Profile supported by your playback device is X.

However, the "--level" option can not be used in that way. It just overwrites the Level that your stream will be tagged with - whether your stream actually conforms to that Level or not
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 11th October 2014 at 17:12.
LoRd_MuldeR is offline   Reply With Quote