Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th October 2014, 00:45   #21  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by r0lZ View Post
In the wiki article, they explain the profile and level concepts, but there is nothing about the presets.
If you use "--fullhelp" on the x264 commandline (and ideally redirect it to a file), you'll see the various parameters for each preset.
Groucho2004 is offline   Reply With Quote
Old 12th October 2014, 08:43   #22  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
OK, thanks!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 12th October 2014, 12:45   #23  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by r0lZ View Post
In the wiki article, they explain the profile and level concepts, but there is nothing about the presets.
Profiles and Levels are defined by the H.264 specification. At the same time, there are no such things as "Presets" in the H.264 standard. So, of course, you won't find it in the Wiki article about H.264/AVC.

Presets are simply a convenience function in the x264 encoder software. There is no direct relation between Presets and Profiles/Levels. Though, the Preset may influence, indirectly, at which Profile/Level your stream comes out.

You need to carefully distinguish between properties of the resulting H.264 bitstream, such as Profiles and Levels, and options of a specific H.264 encoder software, such as x264's Preset system.


Quote:
Originally Posted by detmek View Post
Quote:
Originally Posted by LoRd_MuldeR View Post
No, that's wrong. If your stream would normally come out as Level 5.1, but you enforce Level 4.1 by adding "--level 4.1" (while keeping all other settings the same), you stream's Level requirements do not change at all. Only difference is that your stream will now incorrectly be tagged as Level 4.1, while it actually doesn't comply to that Level - it still requires Level 5.1.

Using the "--level" switch does not reduce the number of reference frames. Instead, x264 will print out a warning, telling you that the selected number of reference frames violates the selected Level:
Code:
> x264_8bit_x64.exe --crf 18.0 --preset slower --ref 16

ffms [info]: 1920x1080p 0:1 @ 24000/1001 fps (vfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x264 [info]: profile High, level 5.1
Code:
> x264_8bit_x64.exe --crf 18.0 --preset slower --ref 16 --level 4.2

ffms [info]: 1920x1080p 0:1 @ 24000/1001 fps (vfr)
x264 [warning]: DPB size (16 frames, 130560 mbs) > level limit (4 frames, 34816 mbs)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x264 [info]: profile High, level 4.2
If you want fewer reference frames, simply use the "--ref" switch! And, if this actually reduced your stream's Level requirements, x264 will set the new (lower) Level automatically!
You are enforcing --ref 16. Try without that.
That was only one example to demonstrate that "--level X" does not actually/reliably make your stream conform to Level X. There may be some specific cases where it works as you expect, but in general it does not! All that "--level" really does, in general, is tagging your stream with Level X - regardless of whether it conforms to that Level or not. This is in contrast to "--profile X", which enforces the restrictions of Profile X and thus guarantees your stream will conform to Profile X.

Keep in mind that the required Level also depends on various properties of your input file, such as the resolution and the frame-rate! Those are things which x264 has absolutely no control over, because they are properties of the source video that x264 cannot influence! This means that each source video unavoidably has a certain minimum Level that it conforms to and it will never be able to conform to an even lower Level - regardless of what encoder settings you are going to use. Consequently, it can easily happen that your are setting "--level X", but form the properties your individual source file (resolution, frame rate, etc) alone it is already clear that this video will never be able to conform to Level X. Bummer!

To make a long story short: Using "--level X" doesn't guarantee that you are going to get a stream that actually conforms to Level X - which means you should be very careful when using that option. I still recommend to not use "--level", but instead do whatever is necessary to make your stream actually conform to Level X. As soon as you have done that, x264 will tag your stream as Level X automatically
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 12th October 2014 at 14:52.
LoRd_MuldeR is offline   Reply With Quote
Old 12th October 2014, 19:45   #24  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Quote:
Originally Posted by LoRd_MuldeR View Post
Profiles and Levels are defined by the H.264 specification. At the same time, there are no such things as "Presets" in the H.264 standard. So, of course, you won't find it in the Wiki article about H.264/AVC.
Again, you explain something that I know perfectly. It's why I have written " As I understand now, it's normally NOT via the profile and level options, but mainly via the preset option, at least when the encoder is x264." I apologize if I'm not always clear in my requests. But you should understand that a user of Simple x254 Launcher needs the information about how to configure x264, and not any h264 encoder. You gave me information about the profile and levels, but I don't needs that. I just want to know how to configure the x264 encoder to be sure that it will never use a level greater than 4.2, and in the same time, have the best possible compression. Since the preset is the first thing to select (including in your GUI), I suppose that it must be selected carefully. Apparently, it is impossible to obtain that information.
Quote:
Originally Posted by LoRd_MuldeR View Post
That was only one example to demonstrate that "--level X" does not actually/reliably make your stream conform to Level X. There may be some specific cases where it works as you expect, but in general it does not! All that "--level" really does, in general, is tagging your stream with Level X - regardless of whether it conforms to that Level or not. This is in contrast to "--profile X", which enforces the restrictions of Profile X and thus guarantees your stream will conform to Profile X.
I have examined your example and already agreed that if you use incompatible options, of course using --level is absurd. But I did a new test with a short clip (from a BD 1080p at 23.976 fps) with preset veryslow. Without specifying the level, it produces a file at level 5.1 and its final size is 106,963KB. The same file encoded with the same preset and --level 4.2 produces a file tagged as 4.2 (erroneously or not) but this time, its size is 107,207 KB. A very important difference for just a different string (or flag, or whatever) in the header. That's an evidence that specifying --level (I repeat: without other conflicting options), has an influence on the compression, and is not only a trick to patch the header with an intentionally wrong information. So, the --level DOES something, and may be useful. But I agree that I'm not sure that the final file is really compliant to level 4.2. There was no warning in the x264 log, so I assume that it has really created a 4.2 level. Anyway, my TV accepts it, and it's what I want.
Quote:
Originally Posted by LoRd_MuldeR View Post
To make a long story short: Using "--level X" doesn't guarantee that you are going to get a stream that actually conforms to Level X - which means you should be very careful when using that option. I still recommend to not use "--level", but instead do whatever is necessary to make your stream actually conform to Level X. As soon as you have done that, x264 will tag your stream as Level X automatically
I have tested that too with the same test clip. With any fast preset (from ultrafast to medium), the level automatically used by x264 is 4.0. With slow or slower, it's 5.0, and with veryslow or placebo, it's 5.1. Obviously, the level depends not only of the characteristics of the input file, but also of the preset used to encode it.

My question is essential if you have an hardware player that doesn't support level 5.0 or greater. How can I use one of the slow presets (with that file, or any other), to obtain level 4.1 (or 4.2, or 4.0 - the exact level doesn't matter much, as long as it's less than 5.0). Currently, I need to assume that specifying --level 4.1 is the way to do it, in absence of a better method. It the --level option is really unusable, there must be another way (without specifying tons of complex options) to force the encoder to stay at level 4.0 (since that level is obviously compatible with my input file). I would like to know just that.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 12th October 2014 at 20:07.
r0lZ is offline   Reply With Quote
Old 12th October 2014, 20:48   #25  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
For high profile with the slow presets just use --level (but never --ref) and set --vbv-maxrate and --vbv-bufsize in accordance with the following table:


This should suffice 99% of the time. If you make a mistake (for example too high resolution/fps for given level) x264 will print a warning in addition to the profile it uses. But beware, some decoders have additional limitations so you can never be sure it will actually play back perfectly. For example some players require --slices 4 beyond level 4.0 or they further restrict --level 4.1 to --vbv-maxrate 40000 and --vbv-bufsize 30000. Try to think before encoding what level you really need, you can often get away with --level 4.0 or lower without sacrificing quality.
sneaker_ger is offline   Reply With Quote
Old 12th October 2014, 20:49   #26  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by r0lZ View Post
I have examined your example and already agreed that if you use incompatible options, of course using --level is absurd. But I did a new test with a short clip (from a BD 1080p at 23.976 fps) with preset veryslow. Without specifying the level, it produces a file at level 5.1 and its final size is 106,963KB. The same file encoded with the same preset and --level 4.2 produces a file tagged as 4.2 (erroneously or not) but this time, its size is 107,207 KB. A very important difference for just a different string (or flag, or whatever) in the header. That's an evidence that specifying --level (I repeat: without other conflicting options), has an influence on the compression, and is not only a trick to patch the header with an intentionally wrong information. So, the --level DOES something, and may be useful. But I agree that I'm not sure that the final file is really compliant to level 4.2. There was no warning in the x264 log, so I assume that it has really created a 4.2 level. Anyway, my TV accepts it, and it's what I want.
This has less to do with "incompatible options". It has more to do with the fact the "--level" does not apply the restrictions of the specified Level, but instead only controls what Level your stream will be tagged with. The exactly same number of reference frames may be compliant with, e.g., Level 4.2 with one source video, but may violate Level 4.2 with some other source clip! That's because the Level does not limit the number of reference frames directly, but the size of the DPB (Decoded Picture Buffer) - which means the max. number of reference frames you can use in a specific Level depends on the resolution source clip. Thus you cannot say "--ref 16" and "--level 4.2" are "incompatible options". They may be perfectly valid!

Quote:
Originally Posted by r0lZ View Post
I have tested that too with the same test clip. With any fast preset (from ultrafast to medium), the level automatically used by x264 is 4.0. With slow or slower, it's 5.0, and with veryslow or placebo, it's 5.1. Obviously, the level depends not only of the characteristics of the input file, but also of the preset used to encode it.
I never said that the required Level depends only on the characteristics of the input file. I said that the characteristics of the input file alone already define a certain minimum Level that your clip can comply to. Your stream will never be able to comply to an even lower Level. Conversely, you can easily make your stream require an even higher Level, e.g. by cranking up the bitrate or by using more reference frames. And it's the latter what happens when you use "Placebo" Preset
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 12th October 2014 at 21:38.
LoRd_MuldeR is offline   Reply With Quote
Old 13th October 2014, 06:54   #27  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
LM, I agree with you that --level does not apply all restrictions for chosen level but it does limit number of of reference frames if those are not specified with --ref x. And level does depend on resolution and number of reference frames according to formula for DPB.http://en.wikipedia.org/wiki/H.264/M...ture_buffering
So, when you encode something with x264 and specify preset and level encoder has all information to automatically set correct number of reference frames or chosen level.

Now, there is a possibility that someone tries to specify level too low for final resolution, lets say level 3.1 for 1080p. And you are right when you say that stream will be flagged as level 3.1 but it won't comply with level 3.1. That is all clear but that does not answers r0lZ's question.

The point is that in his case --level 4.2 does the job as resolution is in the selected level and he only needs to make sure not to exceed maximum number of reference frames with the preset he uses.
detmek is offline   Reply With Quote
Old 13th October 2014, 08:18   #28  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Thanks sneaker_ger for the solution! Thanks too to detmek for the clarification, and to LM for having tried to help.

I think I have now exactly what I need. However, I still have a question about the --level argument. I have understood (clearly!) that it flags the stream with a possibly wrong level. It's obviously the case, as detmek wrote, when "someone tries to specify level too low for final resolution, lets say level 3.1 for 1080p". My question is: will it be tagged with the level in the specified --level argument is too high? For example, if I encode my 1080p clip with a fast preset and I specify --level 4.1, the level really used is level 4.0, but the file will be tagged as 4.1. Is it correct? If it's the case, it's a pity.

I need to know that, because ideally I would have preferred a way to specify the maximum level that the encoder should never exceed, regardless of the characteristics of the input file. (And if the input file is not compatible with the specified level OR with a lower level, then in that case, I would like to see a clear warning.) It would be so simple to have an option somewhere to tell something like "My player doesn't support level 5.0 or higher. Do whatever is necessary to create a stream that is compatible with it, but flag it with the level really used to encode the file." In other words, I would like an option to specify the maximum level that is allowed, without having to force a specific level.

OK, it's possible using the table given by sneaker_ger, but it's somewhat difficult to explain to inexperienced users. I would like to implement that option in BD3D2MK3D, and I suppose that I'll have to do it myself, as it seems that that option is missing in x264 itself. Is it correct?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 13th October 2014 at 08:28.
r0lZ is offline   Reply With Quote
Old 13th October 2014, 09:41   #29  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
Stream is always flagged with level specified with --level parameter. In your 1080p --level 4.1 --preset fast example stream will be flagged as 4.1 even though it is level 4.0.

A few years ago there was a discussion about what --level shoud do. The result was that --level flags stream with specified level and limits maximum number of reference frames of selected level is those are not specified with --ref parameter.

LM was right when he said that you should not rely on --level command to do the job. In your case it works because you exceed level 4.2 due to --preset veryslow and --preset placebo use too much of reference frames for selected level and resolution and --level brings those down.
detmek is offline   Reply With Quote
Old 13th October 2014, 11:42   #30  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Quote:
Originally Posted by r0lZ View Post
ideally I would have preferred a way to specify the maximum level that the encoder should never exceed, regardless of the characteristics of the input file. (And if the input file is not compatible with the specified level OR with a lower level, then in that case, I would like to see a clear warning.)
Level is not only influenced by input video parameters, but also by the encoding bitrate one chooses. Perhaps the attached shell script can be of some help in your case. This is how I call it currently (in my case I don't need to check for exceeding specified level, but that is easy to add):
Code:
rem ...
rem Estimate likely profile to be used with typical encodes
rem -------------------------------------------------------
if /i [%PRESET%] == [ultrafast] (
    set PROFILE=ConsBase
) else (
    set PROFILE=High
)
if /i [%FFMPDBUG%] == [echo] echo PROFILE=%PROFILE% >&2

rem Calculate H.264 level and maxref
rem --------------------------------
for /f "usebackq tokens=1* delims==" %%i in (`"call h264levl %WIDTH% %HEIGHT% %FPS% %BITRATE% %PROFILE% 1 1 2>NUL"`) do (
    if /i [%%i] == [level] (
        set LEVEL=%%j
    ) else if /i [%%i] == [maxref] (
        set MAXREF=%%j
    ) else if /i [%%i] == [x264maxref] (
        set XMAXREF=%%j
    )
)
if /i [%FFMPDBUG%] == [echo] echo LEVEL=%LEVEL%, MAXREF=%MAXREF%, XMAXREF=%XMAXREF% >&2

rem Check successful parsing
set PARLIST=
for %%i in (LEVEL MAXREF XMAXREF) do (
    if [!%%i!] == [] (
        if not [!PARLIST!] == [] set PARLIST=!PARLIST!, 
        set PARLIST=!PARLIST!'%%i'
    )
)
if not "%PARLIST%" == "" (
    echo Unable to determine video parameter/s %PARLIST%! >&2
    goto ERRPAUSE
)
rem ...
Attached Files
File Type: zip h264levl.zip (3.2 KB, 7 views)
fvisagie is offline   Reply With Quote
Old 13th October 2014, 11:58   #31  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
I understand. Thanks.

I still need some precisions.

I want to implement a user friendly option to limit the level really used by the encoder, something like a pseudo --max-level option, in BD3D2MK3D. Since BD3D2MK3D is usually used to convert 3D BDs to half-side-by-side or half-top&bottom MKV (therefore in the same resolution than the source video), and that, as far as I know, a 3D BD must be 1920x1080 at 23.976 fps, I suppose that without the --level parameter, x264 produces ALWAYS the same levels as in my tests (4.0, 5.0 or 5.1 for the different presets). So, assuming that the user doesn't force another profile or use fancy options, if he wants, say, limit to max level 4.1 and it selects the veryslow preset, I should use --level 4.1 --vbv-maxrate 62500 --vbv-bufsize 78125. If he selects profile medium (or less), I have nothing to do, since the level is <= 4.1 anyway. Right?

Or is it possible that the default level for 1080p @ 23.976fps is different than in my tests in some cases? If yes, what are the other characteristics of the input file that I should take into account? I have seen that the frame rate matters too, but in 3D BDs it is always 23.976 (sometimes muxed by the user at 25 fps if he uses an audio stream taken from a PAL version of the movie). Anyway, that frame rates are largely below the limits, so I guess they are OK anyway. But are there other characteristics to take into account?

In BD3D2MK3D, there is an option to produce the output video in Full-SBS (3840x1080) or Full-T&B (1920x2160). (I don't like that non-standard 3D modes, but some users have insisted, and I have finally implemented the "Full" option.) According to the tables about the levels, resolutions and frame rates of h264, the minimum level for that width or height is 5.1. But when I encode a full-SBS clip with x264, it uses level 5.0. I suppose therefore that it's not the width and/or height that matters, but the total number of pixels. That seems logical. Is it correct?

Last question. Is the --tune parameter also related directly or indirectly to the level, or can it be freely modified without impact on the level?

Thanks again for your patience.

[EDIT]
Thanks fvisagie for your script. It is always useful to see how peoples do things that you need to understand.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 13th October 2014 at 12:07. Reason: fvisagie has posted his reply when I was typing mine.
r0lZ is offline   Reply With Quote
Old 13th October 2014, 14:18   #32  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
Quote:
Originally Posted by r0lZ View Post
So, assuming that the user doesn't force another profile or use fancy options, if he wants, say, limit to max level 4.1 and it selects the veryslow preset, I should use --level 4.1 --vbv-maxrate 62500 --vbv-bufsize 78125. If he selects profile medium (or less), I have nothing to do, since the level is <= 4.1 anyway. Right?
Unless you use the vbv parameters you cannot know the level before you start encoding because you don't know the resulting bitrates. Even 1080p preset medium can exceed level 4.0 through bitrate peaks.

--tune animation can influence the level because it changes the number of reference frames but since --level automatically limits that you don't have to worry about it.
sneaker_ger is offline   Reply With Quote
Old 13th October 2014, 15:20   #33  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
OK, thanks. But x264 prints the level (and profile) that it will use immediately when it starts the encoding, even without vbv parameters. It seems to know it for sure, even before having begun to encode the file (and therefore is can compute it only with basic information such as the width, height and framerate). I wonder how it's possible. Or does it print the maximum level that it could use, but it may use a lower level if it never needs a high bitrate?

At least, the --tune option is easy to use. Good news! :-)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 13th October 2014, 16:33   #34  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Quote:
Originally Posted by r0lZ View Post
I want to implement a user friendly option to limit the level really used by the encoder
That's not really possible for well-behaved (predictable) software to do. For a given profile, the level depends on the frame size, framerate, bitrate and whether B-frames and B-pyramids are used in encoding (the latter two influence the number of reference frames used by x264, which in turn influences the level). Then, keeping all settings the same but changing the profile may change the level (see the effect on levels of using different profiles at http://en.wikipedia.org/wiki/H264#Levels).

There are too many explicit or implicit user settings that culminate in a given level to expect software automatically to adjust and/or compensate them all in a manner that does not lead to unexpected results or quality degradation.

A more workable approach may be to anticipate the bitrate for a given encode, then from the bitrate (and other settings) to anticipate the resultant level, and to raise an error if that exceeds the specified level. One way to implement that would be:
  • Encode in way that makes bitrate predictable (either do two-pass encoding or use the vbv parameters as suggested)
  • Use the script posted above to calculate the level anticipated
  • Compare that to the specified level and either allow encoding to proceed or halt with an error
This could be done by hand; if you do many encodes it could quite easily be automated in a shell script or program language.
fvisagie is offline   Reply With Quote
Old 13th October 2014, 16:50   #35  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
It's for my program, BD3D2MK3D, that I want to do it. It has to be automatic. I will use the vbv parameters, since that seems mandatory.

But still, I don't understand how it is possible that x264 prints the level it will use for a given input file when only the preset has been selected (and NO vbv parameters). It has to evaluate the bitrate given the picture size and the frame rate, and, of course, it knows already the other parameters it will use, since they are determined by the preset. So, if it uses, say, level 4.0 for preset medium and 1080p at 23.976 fps, I don't understand why it should use another level for the same preset and another input file but with the same resolution and frame rate (and, of course, if no other arguments have been provided). Since it cannot analyse the file during a first pass, and it prints the level info BEFORE it begins to encode the file, it must evaluate it with only those parameters: the preset, and the width, height and frame rate of the input file.

If it cannot do that, then the info it prints at the beginning of the encoding may be wrong. As far as I know, it's not the case. I'm puzzled!
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 13th October 2014, 17:24   #36  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
When x264 prints level it does not take bitrate and vbv into calcultaion. It uses resolution, framerate and reference frames. So, encoder might print wrong level if real bitrate is very high and exceeds VBV.

The reason we had no problems so far is because most hardware players have very large bufer and even higher read speed.
detmek is offline   Reply With Quote
Old 13th October 2014, 17:35   #37  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
Quote:
Originally Posted by detmek View Post
When x264 prints level it does not take bitrate and vbv into calcultaion.
It does take --bitrate and vbv into consideration AFAIK but of course if you do not specify vbv it can only guess and - like you said - the guess can turn out to be wrong.
sneaker_ger is offline   Reply With Quote
Old 13th October 2014, 17:38   #38  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Hum, so the info it prints at the beginning may be wrong! Bizarre, but OK, I understand that it cannot be trusted.

Additional question: if, during the encoding, the real bitrate exceeds VBV (and assuming that --level has not been specified), does it tag the file with the wrong level printed before the encoding, or does it tags it with the real level based on the real bitrate? In the first case, that means that usually, the level in the header of the file cannot be trusted by the player. That's incredible IMO.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 13th October 2014, 17:46   #39  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
Quote:
Originally Posted by r0lZ View Post
does it tag the file with the wrong level printed before the encoding
Yes, the level is written at the start and will not be corrected if it turns out wrong.
sneaker_ger is offline   Reply With Quote
Old 14th October 2014, 00:04   #40  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,566
Quote:
Originally Posted by LoRd_MuldeR View Post
And you can test this easily: Set a large number of reference frames via "--ref" switch and force a Level that doesn't actually allow that many reference frames (due to DPB size limit) via "--level" switch. Will x264 lower the number of reference frames for you, to make your stream actually comply to the enforced Level? No it doesn't! It only prints a warning message that your stream violates the Level! Does it still still set the enforced Level, despite your stream is violating the Level? Yes.
If you only use the preset option and not --ref directly, that doesn't apply, but only in the command-line:
Code:
    /* Automatically reduce reference frame count to match the user's target level
     * if the user didn't explicitly set a reference frame count. */
If you use libx264 directly, you're trusted to know what you're doing and not set it incorrectly unless you want to.
foxyshadis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.