View Full Version : x264 configuration with HD-input
leon1789
13th August 2014, 17:19
Hello
I use a version 8 bits version of x264 ( 0.142.2453 ea0ca51 )
I will compare two configurations of x264 with this original.mp4 (https://mega.co.nz/#!tk9RwKIZ!1XAR_PuUEo4C6ld9MfUOfU_nLDCWc5D2Sd4XjBpB6M8) (thanks to sneaker_ger here (http://forum.doom9.org/showthread.php?t=170986) )
First configuration is:
x264.exe --preset veryslow
--crf 22.2 -o script1.264 input1.avs
where input1.avs is
ffmpegsource("original.mp4")
Computation : 1.84 fps (you see why I don't use x265...), 3951 kb/s , video (http://leon1789.perso.sfr.fr/x264/script1.mp4)
With a second configuration (faster), I expect to obtain the same quality that the first configuration: see my new configuration here (http://forum.doom9.org/showthread.php?p=1691879#post1691879)
(...cleared...)
where input0.avs is
ffmpegsource("original.mp4").ASharp(0.6,6)
Computation : 8.82 fps (like preset medium), 3986 kb/s , video (http://leon1789.perso.sfr.fr/x264/script0.mp4)
Some pictures :
Original
configuration 1
configuration 2
#64,
input1.avs (http://leon1789.perso.sfr.fr/x264/Image64.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image64_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image64_0.png)
#606
input1.avs (http://leon1789.perso.sfr.fr/x264/Image606.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image606_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image606_0.png)
#1326
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1326.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1326_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1326_0.png)
#1472
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1472.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1472_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1472_0.png)
#1610
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1610.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1610_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1610_0.png)
#1831
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1831.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1831_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1831_0.png)
#2068
input1.avs (http://leon1789.perso.sfr.fr/x264/Image2068.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image2068_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image2068_0.png)
Problem: the second configuration produces blocking (and some blurring to, but I don't mind about it). Please, how can I reduce the problem of blocking?
detmek
13th August 2014, 20:32
And why do you expect to obtain same quality? I mean, you reduced efficiency by using lower quality settings and you want to get same quality at same bitrate? That is not going to work. Not to mention that your parameters do not make much sence.
If you want same quality with faster settings increase bitrate or reduce CRF to get higher bitrate. And don't use your settings. You crippled motion estimation and turned off psy. You increased deblocking and lowered deadzones. And trellis 2 is not that cost-effective to use it with this settings.
If you get same speed using preset medium then use preset medium. Yours won't work.
Sparktank
13th August 2014, 20:59
EDIT: looking at the MediaInfo (for the source), the title for the avc stream matches a trailer of another source.
The fps rate (24fps) and the display size (1920x1038) are also identical.
That trailer is available in higher quality at a trailer forum.
The source encoder used DCP.mxf trailers to convert to x264/mkv.
The actual original trailer is about "18.0 Mbps" while the mp4 one is around "10.8 Mbps".
Not sure where sneaker_ger got his from.
I suspect a website that hosts HD trailers for free.
The 18Mbps one I got (2nd gen encode only, from MXF->MKV) from a forum requires a paid subscription.
I know one HD trailer site that gets their trailers from that subscription forum and re-encodes yet again (3rd generation; MXF->MKV->MP4).
They re-encode for maximum compatibilty with slow internet connections and mobile browsing.
So, it seems to me, everyone's doing a 4th generation re-encode.
I was going ponder to sneaker_ger about his source.
The original trailers also have DTS-HD Master Audio (converted from PCM audio in the DCP/MXF).
F J Walter
14th August 2014, 03:29
In the second configuration you have " --partitions i8x8,p8x8". This will effectively disable 4x4 partitions, which is one of the major ways h.264 reduces blockiness (I don't know if disabling 4x4 partitions also disables 4x4 block transform, but if so, that will REALLY harm quality).
Also going to harm quality: "--qpmin 15"
Probably going to harm quality: "--chroma-qp-offset 9"
Probably not going to harm quality too much, but is very slow (and may bias towards a softer image when you have psy disabled): "--trellis 2"
Also going to bias towards a softer image: "--deblock 1:1"
These are some unusual settings. Where did you get the idea to use them?
leon1789
14th August 2014, 10:20
And why do you expect to obtain same quality? I mean, you reduced efficiency by using lower quality settings and you want to get same quality at same bitrate? That is not going to work.
That's sur, I agree with you: hope is not reality. I mean, preset veryslow is a reference, a target. The quality will never be the same, that's true. The problem is that I have limited time (fps) and space (bits). So I try to have a good deal with parameters.
If you get same speed using preset medium then use preset medium. Yours won't work.
You think my setting is wrong. What do you think about these screenshots?
#110
input1.avs (http://leon1789.perso.sfr.fr/x264/Image110.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image110_0.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image110_2.png)
#389
input1.avs (http://leon1789.perso.sfr.fr/x264/Image389.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image389_0.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image389_2.png)
#1279
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1279.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1279_0.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1279_2.png)
#1991
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1991.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1991_0.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1991_2.png)
where images are respectively from
original
configuration 2 (above, video (http://leon1789.perso.sfr.fr/x264/script0.mp4))
x264.exe --crf 23 -o script2.264 input1.avs (3970 kb/s, video (http://leon1789.perso.sfr.fr/x264/script2.mp4))
Do you say the preset medium is better?
leon1789
14th August 2014, 10:21
In the second configuration you have " --partitions i8x8,p8x8". This will effectively disable 4x4 partitions, which is one of the major ways h.264 reduces blockiness (I don't know if disabling 4x4 partitions also disables 4x4 block transform, but if so, that will REALLY harm quality).
ok, but 4x4 (and b8x8) is expensive for time computation.
Also going to harm quality: "--qpmin 15"
I don't think so because I-frame are about QP 20.
Probably not going to harm quality too much, but is very slow (and may bias towards a softer image when you have psy disabled): "--trellis 2"
I think trellis 2 is better than trellis 1 (better managing the distribution of B-frames, I think).
Also going to bias towards a softer image: "--deblock 1:1"
Yes but some movies are noisy...
These are some unusual settings. Where did you get the idea to use them?
Initially these are a treatment for movies in SD resolution only (DVD Backups in bitrate range 600-900kbps). I looked for a good balance between computation time, image quality, and especially compression ratio. The result is not so bad for my eyes.
For fun, I just tested in HD resolution... Thank you for your comments. HD is not SD (of course!), I have to review my work for that.
Asmodian
14th August 2014, 21:26
I looked for a good balance between computation time, image quality, and especially compression ratio. The result is not so bad for my eyes.
This really is exactly the goal of the preset system.
Single screen shot images of one source is not a good way to judge quality, especially for picking very different settings.
Problem: the second configuration produces blocking (and some blurring to, but I don't mind about it). Please, how can I reduce the problem of blocking?
Use a preset or at least something much closer to one.
ok, but 4x4 (and b8x8) is expensive for time computation.
But this is time well spent.
I don't think so because I-frame are about QP 20.
Why bother setting it then?
I think trellis 2 is better than trellis 1 (better managing the distribution of B-frames, I think).
But this time could be better spent elsewhere.
Yes but some movies are noisy...
Try --nr 100 instead.
leon1789
14th August 2014, 22:19
Single screen shot images of one source is not a good way to judge quality, especially for picking very different settings.
I agree with you.
Thanks for all your comments.
detmek
15th August 2014, 21:34
I did a small test. Instead of just --preset medium I added --aq-mode 2 --trellis 2. AVS script was just ffvideosource(). Here is video (https://mega.co.nz/#!jl4BjRbR!ri8HlKTD2N1IOHguC6RAuz3zkoP0atE5rhYGUBWg_Pw).
I also encoded video (https://mega.co.nz/#!vwRAjD7a!vrKl9lHm3doUp3UhZeXyN1w9Kl1hjleTH-3Blhg0Awc) using your settings, but without ASharp(). It is hard to compare x264 settings if input is not the same.
http://dc392.4shared.com/img/TK9f0RUYba/147db518e88/c000135.png (http://www.4shared.com/photo/TK9f0RUYba/c000135.html)http://dc392.4shared.com/img/_LSSIxiUce/147db51e478/c000136.png (http://www.4shared.com/photo/_LSSIxiUce/c000136.html)http://dc392.4shared.com/img/ty9IT71Wba/147db522ac8/c000137.png (http://www.4shared.com/photo/ty9IT71Wba/c000137.html)
http://dc392.4shared.com/img/AjG-548dba/147db4dae58/c000648.png (http://www.4shared.com/photo/AjG-548dba/c000648.html)http://dc392.4shared.com/img/4WeEcYewba/147db4de508/c000649.png (http://www.4shared.com/photo/4WeEcYewba/c000649.html)http://dc392.4shared.com/img/QfXNjn3hba/147db4d9300/c000650.png (http://www.4shared.com/photo/QfXNjn3hba/c000650.html)
http://dc392.4shared.com/img/uujfQEoGba/147db526948/c001488.png (http://www.4shared.com/photo/uujfQEoGba/c001488.html)http://dc392.4shared.com/img/76JFrf1jce/147db52bf38/c001489.png (http://www.4shared.com/photo/76JFrf1jce/c001489.html)http://dc392.4shared.com/img/erXoL4W-ba/147db530588/c001490.png (http://www.4shared.com/photo/erXoL4W-ba/c001490.html)
http://dc392.4shared.com/img/5ppSdmy2ba/147db533850/c002658.png (http://www.4shared.com/photo/5ppSdmy2ba/c002658.html)http://dc392.4shared.com/img/dCSXwNjRba/147db535f60/c002659.png (http://www.4shared.com/photo/dCSXwNjRba/c002659.html)http://dc392.4shared.com/img/McTVEhjTba/147db5376d0/c002660.png (http://www.4shared.com/photo/McTVEhjTba/c002660.html)
http://dc392.4shared.com/img/ZVWMz427ba/147db538a58/c002991.png (http://www.4shared.com/photo/ZVWMz427ba/c002991.html)http://dc392.4shared.com/img/zHwd0bUsce/147db53dc60/c002992.png (http://www.4shared.com/photo/zHwd0bUsce/c002992.html)http://dc392.4shared.com/img/OXtAgXdhba/147db541310/c002993.png (http://www.4shared.com/photo/OXtAgXdhba/c002993.html)
http://dc392.4shared.com/img/IxpwvSY6ba/147db50dad8/c005019.png (http://www.4shared.com/photo/IxpwvSY6ba/c005019.html)http://dc392.4shared.com/img/WGRjvN_Qce/147db513898/c005020.png (http://www.4shared.com/photo/WGRjvN_Qce/c005020.html)http://dc392.4shared.com/img/DMzK1s2Iba/147db516778/c005021.png (http://www.4shared.com/photo/DMzK1s2Iba/c005021.html)
leon1789
16th August 2014, 08:54
thank you for the time spent to do this test. I will see again. ... and I will be back ;)
leon1789
16th August 2014, 18:28
Well, the most important parameters seem to be --subme --psy-rd --aq-mode 2 --trellis 2 --b-adapt 2 --debloc --qcomp
and for the rest, I will see how I can do in order to have the same speed as --preset medium...
F J Walter
19th August 2014, 01:40
I think trellis 2 is better than trellis 1 (better managing the distribution of B-frames, I think).
trellis 2 is very, very slow for the benefit it gives. Given you were complaining about speed of other options, it seems strange that you would pick this option, as it falls very far towards the "very slow option that gives small benefit" end of things and will slow your whole encode down (for example, trellis 2 significantly slows down many of the existing steps in the motion estimation process). Use trellis 0 for speed, it will work fine and won't harm quality very much in comparison to some of the other odd options you've chosen.
Edit: are you confusing this with b-adapt 2? Also a slow option that gives a small benefit, and your "better managing the distribution of B-frames" comment made me think that's what you meant.
but some movies are noisy...
The deblock setting is not about softening a noisy source if that's what you are trying - it would be better to do some denoising prior to compression. deblock settings are a bias between detecting artefacts that fall on block edges as artefacts and smoothing them, vs detecting them as a wanted detail and skipping smoothing. Positive values for deblock will just detect more detail as block edges and wrongly smooth them. This means you will end up with an overall software image as a side effect but positive deblock settings soften progressively harder and harder details.
F J Walter
19th August 2014, 01:51
If using presets isn't enough for you and you want to venture into tweaking individual settings, this page can be helpful in teaching what sane combinations of settings are:
http://dev.beandog.org/x264_preset_reference.html
Here you can see that "trellis 2" is the sort of option only worth using in the slowest of settings.
But that "partitions p8x8,b8x8,i8x8,i4x4" are worth using even in "very fast" presets. Hell even "superfast" includes i4x4. To not use i4x4 is to not really benefit at all from what h.264 gives.
It shows how backwards your choice of options (in the first post) was.
leon1789
19th August 2014, 07:05
Thank you very much for these two messages. I will try trellis 1 today!
leon1789
21st August 2014, 19:58
Hello,
I have seen all your comments. Now, I see my mistakes and after several comparisons (with DVD sources), sometimes, I often agree with you, sometimes not.
I propose this configuration:
x264.exe --keyint 500 --direct spatial --b-pyramid normal --subme 7 --me dia --merange 16 --no-chroma-me --weightp 2 --qpmin 10 --scenecut 40 --rc-lookahead 40 --partitions i8x8,p8x8,b8x8 --no-mixed-refs --psy-rd 0.8:0.1 --aq-mode 1 --ref 4 --trellis 1 --b-adapt 2 --bframe 5 --b-bias 10 --qpstep 4 --deblock -1:-1 --deadzone-inter 14 --deadzone-intra 4 --non-deterministic --qblur 0.6 --qcomp 0.6 --aq-strength 1.1 --ipratio 1.4 --chroma-qp-offset 13 --nr 10
--crf 21.9 -o script0.x264 original.mp4
or simply (without the values already by default):
--keyint 500 --me dia --no-chroma-me --qpmin 10 --partitions i8x8,p8x8,b8x8 --no-mixed-refs --psy-rd 0.8:0.1 --ref 4 --b-adapt 2 --bframe 5 --b-bias 10 --deblock -1:-1 --deadzone-inter 14 --deadzone-intra 4 --non-deterministic --qblur 0.6 --aq-strength 1.1 --chroma-qp-offset 13 --nr 10
10 fps (9 fps for --preset medium), 3956 kb/s (video (http://leon1789.perso.sfr.fr/x264/script0.mp4))
I compare with this one:
x264.exe --preset veryslow --crf 22.2 -o script1.264 original.mp4
2 fps, 3939 kb/s (video (http://leon1789.perso.sfr.fr/x264/script1.mp4))
Please, what do you think about this config?
leon1789
21st August 2014, 20:21
For interest, here are some numerical evaluations for the videos above (some informations (http://compression.ru/video/quality_measure/info_en.html#start))
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config PSNR-Y : 45,06545 , PSNR-U : 46,39995 , PSNR-V : 45,63270 (more homogenous)
veryslow SSIM (precise) : 0,98121
my config SSIM (precise) : 0,98217 (higher, best)
veryslow VQM : 0,63574
my config VQM : 0,60830 (lower, best)
veryslow MSU Blocking : 47,13407
my config MSU Blocking : 44,78241 (lower, best)
versyslow MSU Blurring-Y : 3,99433
my config MSU Blurring : 4,04408 (higher, best)
versyslow MSAD-Y : 0,92386
my config MSAD-Y : 0,88050 (lower, best)
versyslow Delta-Y : -0,04987
my config Delta-Y : -0,04217 (closer to 0, best)
versyslow MSE-Y : 2,17966
my config MSE-Y : 2,02551 (lower, best)
versyslow MSU Noise : 1,36673 (lower, best)
my config MSU Noise : 1,38406
foxyshadis
21st August 2014, 20:38
The only difference I can see is that one has psy turned on, the other has psy turned off, it stands out so much. And with it on, the faster encode still looks much better than the very slow one. Basically, psy is more important than speed.
leon1789
21st August 2014, 21:04
I don't understand what you said psy turned on/off : the preset veryfast has psy on (--psy-rd 1:0) and my config too (--psy-rd 0.8:0.1 ) .
foxyshadis
22nd August 2014, 03:11
Ah, I'm out of date then. script1 looks so much smoother than script0 that it looks as if psy isn't even on.
leon1789
22nd August 2014, 08:03
My config (script0) is 5 times faster and you said the preset veryslow (script1) looks smoother.
Well, that's pretty good for me ;)
leon1789
22nd August 2014, 18:25
An other configuration n°2, with more values of the preset medium :
x264.exe --keyint 500 --me dia --no-chroma-me --no-mixed-refs --psy-rd 0.8:0.1 --ref 4 --b-adapt 2 --bframe 5 --b-bias 10 --deblock -1:-1 --deadzone-inter 14 --non-deterministic --aq-strength 1.1 --nr 10 --chroma-qp-offset 13
--crf 21.95 -o script0.x264 original.mp4
10 fps, 3941 kb/s
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config n°2 PSNR-Y : 45,00992 PSNR-U : 46,26233 PSNR-V : 45,59814 (more homogenous)
veryslow SSIM (precise) : 0,98121
my config n°2 SSIM (precise) : 0,98203 (higher, best)
veryslow VQM : 0,63574
my config n°2 VQM : 0,61358 (lower, best)
veryslow MSU Blocking : 47,13407
my config n°2 MSU Blocking : 44,89754 (lower, best)
versyslow MSU Blurring-Y : 3,99433
my config n°2 MSU Blurring : 4,05421 (higher, best)
versyslow MSAD-Y : 0,92386
my config n°2 MSAD-Y : 0,88708 (lower, best)
versyslow Delta-Y : -0,04987
my config n°2 Delta-Y : -0,04180 (closer to 0, best)
versyslow MSE-Y : 2,17966
my config n°2 MSE-Y : 2,05158 (lower, best)
versyslow MSU Noise : 1,36673
my config n°2 MSU Noise : 1,36629 (mathematically lower, egality)
leon1789
23rd August 2014, 06:33
You crippled motion estimation and turned off psy. You increased deblocking and
yes, but no longer: now, psy 0.8:0.1 and the motion estimation is normal.
lowered deadzones. And trellis 2 is not that cost-effective to use it with this settings.
yes, I slightly reduce deadzones (now 14:11 instead of 21:11), but I take trellis 1 now.
If you get same speed using preset medium then use preset medium. Yours won't work.
well, I think my settings is significantly better than preset medium!
And why do you expect to obtain same quality? I mean, you reduced efficiency by using lower quality settings and you want to get same quality at same bitrate? That is not going to work.
And now, what do you think about my settings config n°2 ?
Groucho2004
23rd August 2014, 08:54
I think my settings is significantly better than preset medium!
Many have claimed that their "special" x264 settings are better than what the presets deliver.
This may be true for one specific source but probably fails with another one.
With how many sources have you tried these settings? Do they provide improvement with all these sources?
MasterNobody
23rd August 2014, 09:35
cheat 1: you crippled chroma by using "--no-chroma-me" and "--chroma-qp-offset 13" and after that you use metrics that only check luma
cheat 2: you use different aq-strengh which doesn't have anything todo with speed but is fine tuning for source (can improve SSIM)
cheat 3: you use noise reduction "--nr 10"
leon1789
23rd August 2014, 11:15
Many have claimed that their "special" x264 settings are better than what the presets deliver.
This may be true for one specific source but probably fails with another one.
I agree with you!
With how many sources have you tried these settings? Do they provide improvement with all these sources?
I established this configuration by analyzing averages for seven DVD movies (in standard resolution). No manga, no animation.
leon1789
23rd August 2014, 11:34
cheat 1: you crippled chroma by using "--no-chroma-me" and "--chroma-qp-offset 13" and after that you use metrics that only check luma
you forget the first line of the test :
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config n°2 PSNR-Y : 45,00992 PSNR-U : 46,26233 PSNR-V : 45,59814 (more homogenous)
The appearance of the luma is very important. To my eyes, the treatment of x264 on luma/chroma does not seem balanced: too much bit for the chroma.
cheat 2: you use different aq-strengh which doesn't have anything todo with speed but is fine tuning for source (can improve SSIM)
You're right. Aq-strengh can improve SSIM (but decrease VQM), can improve BLUR and NOISE. It is expensive in bitrate!
cheat 3: you use noise reduction "--nr 10"
Yes, it is a very light reduction of noise. For a little gain in bitrate, it's deteriorate a little bit SSIM, VQM, BLUR and BLOC...
nevcairiel
23rd August 2014, 12:12
you forget the first line of the test :
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config n°2 PSNR-Y : 45,00992 PSNR-U : 46,26233 PSNR-V : 45,59814 (more homogenous)
But then, PSNR is a terrible metric.
leon1789
23rd August 2014, 12:14
If you prefer a configuration without --nr 10, I propose this n°3:
x264.exe --psy-rd 0.8:0.1 --deblock -1:-1 --aq-strength 1.1 --ref 4 --b-adapt 2 --bframe 5 --b-bias 10 --deadzone-inter 14 --keyint 500 --me dia --no-chroma-me --no-mixed-refs --qcomp 0.59 --non-deterministic --no-dct-decimate --chroma-qp-offset 13
--crf 21.9 -o script0.x264 original.mp4
9.5 fps, 3962 kb/s (video (http://leon1789.perso.sfr.fr/x264/script0.mp4))
I compare with this one:
x264.exe --preset veryslow --crf 22.2 -o script1.264 original.mp4
2 fps, 3939 kb/s (video (http://leon1789.perso.sfr.fr/x264/script1.mp4))
veryslow SSIM (precise) : 0,98121
my config n°3 SSIM (precise) : 0,98221 (higher, better)
veryslow VQM : 0,63574
my config n°3 VQM : 0,60779 (lower, better)
veryslow MSU Blocking : 47,13407
my config n°3 MSU Blocking : 45,04675 (lower, better)
versyslow MSU Blurring-Y : 3,99433
my config n°3 MSU Blurring : 4,05908 (higher, better)
versyslow MSU Noise : 1,36673
my config n°3 MSU Noise : 1,36379 (lower, better)
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config n°3 PSNR-Y : 45,07493 , PSNR-U : 46,26233 , PSNR-V : 45,58636 (more homogeneous)
versyslow Delta-Y : -0,04987 , Delta-U : -0,03452 , Delta-V : -0,04278 (more homogeneous)
my config n°3 Delta-Y : -0,04362 , Delta-U : -0,06310 , Delta-V : -0,09632
versyslow MSAD-Y : 0,92386 , MSAD-U : 0,49053 , MSAD-V : 0,55567
my config n°3 MSAD-Y : 0,87914 , MSAD-U : 0,75567 , MSAD-V : 0,83044 (more homogeneous)
versyslow MSE-Y : 2,17966 , MSE-U : 0,72228 , MSE-V : 0,88864
my config n°3 MSE-Y : 2,02110 , MSE-U : 1,48527 , MSE-V : 1,79657 (more homogeneous)
leon1789
23rd August 2014, 13:10
But then, PSNR is a terrible metric.
With my config n°3 above, I have add on more metrics to check chroma. Ok, x264 is more homogenous with Delta, but not with PSNR, MSAD and MSE.
I will come back...
vivan
24th August 2014, 14:45
homogenousDon't forget that chroma has halved resolution.
leon1789
25th August 2014, 10:47
I agree with you, the chroma is encoded on a half-resolution, so the chroma should be less compressed.
But human perception is more sensitive to luma, so luma should be less compressed too.
So I think we need a balance between luma and chroma.
nevcairiel
25th August 2014, 12:00
I agree with you, the chroma is encoded on a half-resolution, so the chroma should be less compressed.
But human perception is more sensitive to luma, so luma should be less compressed too.
So I think we need a balance between luma and chroma.
Luma being twice the resolution already compensates for the human perception, doing it twice results in obvious degredation.
leon1789
25th August 2014, 15:21
Luma being twice the resolution already compensates for the human perception,
I agree with you.
doing it twice results in obvious degredation.
Where do you see degradations?
Ok, I saw a degradation in chroma here :
Delta-Y : -0,04362 , Delta-U : -0,06310 , Delta-V : -0,09632
chroma is too compressed.
But, I see also three times a degradation in luma here :
PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
MSAD-Y : 0,92386 , MSAD-U : 0,49053 , MSAD-V : 0,55567
MSE-Y : 2,17966 , MSE-U : 0,72228 , MSE-V : 0,88864
luma is too compressed.
leon1789
28th August 2014, 17:53
Hello there!
To improve the result on the metric Delta UV (with damaging a little bit the other metrics), I have found nothing that reduce the chroma-qp-offset from 13 to 9 (and use chroma-me...).
So I propose a version n°4:
x264.exe --psy-rd 0.8:0.1 --deblock -1:-1 --aq-strength 1.1 --ref 4 --b-adapt 2 --bframe 5 --b-bias 10 --deadzone-inter 14 --deadzone-intra 8 --keyint 500 --me dia --no-mixed-refs --qcomp 0.59 --non-deterministic --no-dct-decimate --chroma-qp-offset 9
--crf 22.05 -o script0.264 original.mp4
9.5 fps, 3936 kb/s (video (http://leon1789.perso.sfr.fr/x264/script0.mp4))
I compare with this one:
x264.exe --preset veryslow --crf 22.2 -o script1.264 original.mp4
2 fps, 3939 kb/s (video (http://leon1789.perso.sfr.fr/x264/script1.mp4))
SSIM (precise) : higher = better
veryslow : 0,98121
my config n°4 : 0,98201
VQM : lower = better
veryslow : 0,63574
my config n°4 : 0,61332
MSU Blocking : lower = better
veryslow : 47,13407
my config n°4 : 44,99339
MSU Blurring : higher = better
versyslow : 3,99433
my config n°4 : 4,05908
MSU Noise : lower = better
versyslow : 1,36673
my config n°4 : 1,36033
PSNR : higher = better
veryslow PSNR-Y : 44,74691 , PSNR-U : 49,54377 , PSNR-V : 48,64357
my config n°4 PSNR-Y : 45,00911 , PSNR-U : 47,48713 , PSNR-V : 46,62616
Delta : closer to 0 = better
versyslow Delta-Y : -0,04987 , Delta-U : -0,03452 , Delta-V : -0,04278
my config n°4 Delta-Y : -0,04615 , Delta-U : -0,04214 , Delta-V : -0,06332
MSAD : lower = better
versyslow MSAD-Y : 0,92386 , MSAD-U : 0,49053 , MSAD-V : 0,55567
my config n°4 MSAD-Y : 0,88671 , MSAD-U : 0,65114 , MSAD-V : 0,72592
MSE : lower = better
versyslow MSE-Y : 2,17966 , MSE-U : 0,72228 , MSE-V : 0,88864
my config n°4 MSE-Y : 2,05196 , MSE-U : 1,15976 , MSE-V : 1,41405
For my setup, all metrics are good in the luma, homogeneous in the luma/chroma, except Delta-V which is unusually high... I don't understand why!
Someone has an idea about that?
Some pictures:
Original (original.mp4 (https://mega.co.nz/#!tk9RwKIZ!1XAR_PuUEo4C6ld9MfUOfU_nLDCWc5D2Sd4XjBpB6M8))
veryslow
my configuration n°4
#64,
input1.avs (http://leon1789.perso.sfr.fr/x264/Image64.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image64_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image64_0.png)
#606
input1.avs (http://leon1789.perso.sfr.fr/x264/Image606.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image606_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image606_0.png)
#1326
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1326.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1326_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1326_0.png)
#1472
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1472.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1472_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1472_0.png)
#1610
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1610.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1610_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1610_0.png)
#1831
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1831.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1831_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image1831_0.png)
#2068
input1.avs (http://leon1789.perso.sfr.fr/x264/Image2068.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image2068_1.png)
script0.264 (http://leon1789.perso.sfr.fr/x264/Image2068_0.png)
leon1789
31st August 2014, 15:31
Hello
An other good idea is to use --subme 8, for more sharpness.
mixed-refs, chroma-me, i4x4, merange 16, are interesting but they take a too long time now, because I use --subme 8...
So I propose a version n°5:
x264.exe --keyint 500 --qpstep 4 --me dia --subme 8 --merange 12 --rc-lookahead 30 --partitions i8x8,p8x8,b8x8 --psy-rd 0.7:0.15 --ref 4 --trellis 1 --b-adapt 2 --bframe 5 --b-bias 0 --deblock -1:-1 --deadzone-inter 21 --deadzone-intra 0 --qcomp 0.6 --aq-strength 0.9 --ipratio 1.25 --chroma-qp-offset 9 --no-dct-decimate --no-mixed-refs --no-chroma-me
--crf 21.55 -o script2.264 original.mp4
9.5 fps, 3939 kb/s (video (http://leon1789.perso.sfr.fr/x264/script2.mp4))
I compare with this one:
x264.exe --preset veryslow --crf 22.2 -o script1.264 original.mp4
2 fps, 3939 kb/s (video (http://leon1789.perso.sfr.fr/x264/script1.mp4))
Some pictures:
Original (original.mp4 (https://mega.co.nz/#!tk9RwKIZ!1XAR_PuUEo4C6ld9MfUOfU_nLDCWc5D2Sd4XjBpB6M8))
veryslow
my configuration n°5
#64,
input1.avs (http://leon1789.perso.sfr.fr/x264/Image64.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image64_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image64_2.png)
#606
input1.avs (http://leon1789.perso.sfr.fr/x264/Image606.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image606_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image606_2.png)
#1326
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1326.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1326_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1326_2.png)
#1472
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1472.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1472_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1472_2.png)
#1610
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1610.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1610_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1610_2.png)
#1831
input1.avs (http://leon1789.perso.sfr.fr/x264/Image1831.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image1831_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image1831_2.png)
#2068
input1.avs (http://leon1789.perso.sfr.fr/x264/Image2068.png)
script1.264 (http://leon1789.perso.sfr.fr/x264/Image2068_1.png)
script2.264 (http://leon1789.perso.sfr.fr/x264/Image2068_2.png)
Is anyone can tell me what he thinks of sharpness now (with these pictures and/or videos) ? Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.