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 > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd May 2013, 21:00   #81  |  Link
paradoxical
Guest
 
Posts: n/a
First of all, you realize you're 4 years late to the party responding to Dark Shikari's post, right?

Quote:
Originally Posted by jq963152 View Post
Why only --crf 23?

Do you really consider CRF 23 to give "very good" results?
Clearly he did. CRF 16 or 18 would likely increase file sizes immensely for most content. The point of 23 was a trade off between quality and ridiculously large file sizes.

Quote:
Originally Posted by jq963152 View Post
Why only --ref 3?

Common framesizes, like 1920x1080 or 1280x720 for example, allow for 4 reference frames in Level 4.0 / 4.1 / 4.2 for example, correct?

So why not increase the default settings from --ref 3 to --ref 4?
See this response that was made at the time for the same question:

Quote:
Originally Posted by Manao View Post
Quote:
Maybe 4 or even possibly 5?
4 would break level 4.1 for 1080p streams. So either the default ref number depends on resolution (and then the users will never understand how it is set), or it stay at 3.

Last edited by paradoxical; 22nd May 2013 at 22:00.
  Reply With Quote
Old 23rd May 2013, 05:46   #82  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by jq963152 View Post
So, --ref 16 gets reduced to --ref 4 by --level 4.0 or 4.1 or 4.2 when framsize is 1920x1080p.


did something change? are levels enforced now ?

or did you use --bluray-compat ?


I just tested r2334 and nothing is reduced
poisondeathray is offline   Reply With Quote
Old 23rd May 2013, 10:22   #83  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 463
Level parametar only reduces reference frames if those are not manualy specified, AFAIK.
detmek is offline   Reply With Quote
Old 23rd May 2013, 14:46   #84  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Correct. --level reduces the ref frames to the maximum of the level (which is indeed 4 for level 4.1 1080p) unless it is overridden by --ref. --bluray-compat on the other hand limits the refs to 6 without any possibility to override it.

Quote:
Originally Posted by jq963152 View Post
Why only --ref 3?

Common framesizes, like 1920x1080 or 1280x720 for example, allow for 4 reference frames in Level 4.0 / 4.1 / 4.2 for example, correct?

So why not increase the default settings from --ref 3 to --ref 4?
The defaults are not there to simply max out refs/bframes or whatever and they are not really focused on compatibility in the first place (no level, vbv or bluray-compat stuff used by default):
Quote:
Originally Posted by Dark Shikari View Post
The settings in presets were picked to be roughly optimal positions on the speed-compession curve based on testing.
Also, the devs don't seem to be keen on changing them every other month.
sneaker_ger is offline   Reply With Quote
Old 23rd May 2013, 14:53   #85  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by sneaker_ger View Post
Correct. --level reduces the ref frames to the maximum of the level (which is indeed 4 for level 4.1 1080p) unless it is overridden by --ref. --bluray-compat on the other hand limits the refs to 6 without any possibility to override it.

Thanks for the clarification, I tested with --ref so that must have overriden the --level limits

--level never used to limit anything (nothing was enforced), when was that introduced ? I can't find it in the changelog
poisondeathray is offline   Reply With Quote
Old 23rd May 2013, 14:59   #86  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by jq963152 View Post
The defaults having been changed means they can not be changed again?
No, it doesn't meant they can't be changed again, and I never claimed any such silly thing, but the fact that it's been 4 years and they haven't changed again is a good sign that such a situation is highly unlikely at any point in the foreseeable future. My point is you were basically arguing over a decision that was made and changed in the code 4 years ago as if your input was going to somehow make any difference.

Quote:
Originally Posted by jq963152 View Post
But this seems to be incorrect?
As I said, I was merely quoting what was being said at the time. But as was said by someone else and quoting Dark Shikari, the point of the defaults were what he considered a good balance between size/quality and speed. Ref 3 is a good number because it guarantees compatibility with all levels for all resolutions even if it's not set at 4 and it's slightly faster.

Last edited by paradoxical; 23rd May 2013 at 15:08.
  Reply With Quote
Old 23rd May 2013, 15:07   #87  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by poisondeathray View Post
--level never used to limit anything (nothing was enforced), when was that introduced ? I can't find it in the changelog
I don't know when it happened, but it must have been many years ago. Since it still doesn't apply vbv and doesn't enforce the refs rigorously, people often still say "it's only a flag", though that is not true.
sneaker_ger is offline   Reply With Quote
Old 23rd May 2013, 15:12   #88  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by sneaker_ger View Post
I don't know when it happened, but it must have been many years ago. Since it still doesn't apply vbv and doesn't enforce the refs rigorously, people often still say "it's only a flag", though that is not true.
For reference frames at least, it was added in with the very same check-in that included the new defaults and the preset system.

https://github.com/DarkShikari/x264-devel/commit/af2a4ecd7bcefc97c8aa83913c9a2980206f9cd0

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( !b_user_ref )
+    {
+        int mbs = (((param->i_width)+15)>>4) * (((param->i_height)+15)>>4);
+        int i;
+        for( i = 0; x264_levels[i].level_idc != 0; i++ )
+            if( param->i_level_idc == x264_levels[i].level_idc )
+            {
+                while( mbs * 384 * param->i_frame_reference > x264_levels[i].dpb
+                       && param->i_frame_reference > 1 )
+                {
+                    param->i_frame_reference--;
+                }
+                break;
+            }
+    }
+
+
So, 4 years ago.

Last edited by paradoxical; 23rd May 2013 at 16:59.
  Reply With Quote
Old 23rd May 2013, 15:16   #89  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Thanks for the clarification
poisondeathray 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 19:39.


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