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 20th April 2016, 03:03   #1  |  Link
r4dius
Registered User
 
Join Date: Mar 2013
Posts: 6
Any x264 --fade-compensate side effects ?

Hi,

I'm trying to keep the best quality possible in an anime encoding and for compatibility with my raspberry-pi I'm not using 10bit,
I've been testing with crf from 16 to 18 and aq-strength from 1.2 to 1.3 on kmod's x264.
When facing the problem with gradients encoding I first bumped up aq and/or crf but at the cost of a LOT of bitrate,
then I tested "--fade-compensate" and it really looks like it's helping,
I used values of 5 then 20 by mistake in my first tests, but the help information indicates safe range is 0 to 1, but it sure looks a lil better at 20 and does not take a lot of extra bitrate,
I can take some screeshots later to show the thing but could someone tell if there's some known bug/side effects when using fade-compensate (and high values of it) ?

Thanks guys

Last edited by r4dius; 20th April 2016 at 03:12.
r4dius is offline   Reply With Quote
Old 20th April 2016, 19:19   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
If you change a settings that affects the resulting file size (average bitrate), then any visual comparison of the files of differing size will be unfair/tainted! The bigger file will usually look better, yes, simply because it was allowed to use more bits. But you could, just as well, have used a higher target bitrate (or lower CRF), instead of changing that setting, to get the same (or very similar) effect. So, in the end, you didn't learn anything about the setting you wanted to test

For a proper visual comparison, always use 2-Pass mode with same target bitrate for all files. This will allow for a proper fair/unbiased visual comparison of the resulting files. And, of course, the bitrate you choose for the test should neither be too high (where the differences fade away and all files just look very good) nor too low (where all files look equally bad). Just use something "sane" that you would use for you normal encodes.

If you do this kind of "fair" test, then the effect of --fade-compensate becomes more clear: It moves more bits to "fades" - or to where the encoder "thinks" there are fades. And, of course, these bits will be missing somewhere else! So, you get better looking fades (hopefully), but the "side effect" is that you get (somewhat) reduced quality everywhere else! Whether this gives more pleasant overall result - at a certain target bitrate (target file size) - is up for debate

I think this is also the reason why the --fade-compensate patch was never officially committed into x264: It's more a workaround for the symptom ("throw more bits at it and hope it helps") rather than a proper fix of the underlying problem.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 20th April 2016 at 19:51.
LoRd_MuldeR is offline   Reply With Quote
Old 20th April 2016, 21:31   #3  |  Link
r4dius
Registered User
 
Join Date: Mar 2013
Posts: 6
Quote:
Originally Posted by LoRd_MuldeR View Post
If you change a settings that affects the resulting file size (average bitrate), then any visual comparison of the files of differing size will be unfair/tainted! The bigger file will usually look better, yes, simply because it was allowed to use more bits. But you could, just as well, have used a higher target bitrate (or lower CRF), instead of changing that setting, to get the same (or very similar) effect. So, in the end, you didn't learn anything about the setting you wanted to test

For a proper visual comparison, always use 2-Pass mode with same target bitrate for all files. This will allow for a proper fair/unbiased visual comparison of the resulting files. And, of course, the bitrate you choose for the test should neither be too high (where the differences fade away and all files just look very good) nor too low (where all files look equally bad). Just use something "sane" that you would use for you normal encodes.

If you do this kind of "fair" test, then the effect of --fade-compensate becomes more clear: It moves more bits to "fades" - or to where the encoder "thinks" there are fades. And, of course, these bits will be missing somewhere else! So, you get better looking fades (hopefully), but the "side effect" is that you get (somewhat) reduced quality everywhere else! Whether this gives more pleasant overall result - at a certain target bitrate (target file size) - is up for debate

I think this is also the reason why the --fade-compensate patch was never officially committed into x264: It's more a workaround for the symptom ("throw more bits at it and hope it helps") rather than a proper fix of the underlying problem.
Ahah yeah it looks dumb sorry I didn't explain the crf thing but I'm varying AQ and CRF so the sizes match, for exemple I get a 1Gb file with crf 16.5 + aq 1.0 and same with crf 18 + aq 1.2,
as for the effect of fade-compensate on bitrate I'll get and extra 100Mb from 1 to 20 value so I don't really care as it's a low bump compared to AQ or CRF changes,
btw I'm not sure if I can say I'm only getting extra quality and no loss somewhere else (as it's the same CRF) at the cost of 100MB.
I actually feel like I need to use higher CRF and AQ at the point the final result is a 2 GB file, to get a near perfect gradiants (like source),
but really I don't like the idea of doubling the bitrate on everything for some gradiants .. I'll test with 2pass as you said and some crazy fade-compensate values too ^^
Thanks
r4dius is offline   Reply With Quote
Old 22nd April 2016, 21:07   #4  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
But how will you know if a frame looks better/worst for fade-compensate or the increased AQ and CRF?
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Reply

Tags
fade-compensate, gradient, x264

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:02.


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