Log in

View Full Version : Very odd result


bxyhxyh
18th July 2012, 14:17
I tested 47:54 source in different presets using x264 r2200
Avisynth script was just
DirectShowSource()
Spline64Resize(704, 528)
Sharpen(0.2)
--crf 20 --tune animation

--preset ultrafast -> 460 mb
--preset superfast -> 381 mb
--preset veryfast -> 187 mb
--preset faster -> 189 mb
--preset fast -> 204 mb
--preset medium -> 201 mb
--preset slow -> 183 mb
--preset slower -> 176 mb
--preset veryslow -> 158 mb
--preset placebo -> 136 mb

Why veryfast is so small sized?
So it means that i have to change my setting for every source to get small sized and fast encode even though i found my crf?

detmek
18th July 2012, 15:04
No. CRF will give you (more or less) the same quality if you use the same settings. Different settings with same CRF will give you different quality.
So, if you want same quality across different encodes, pick the settings that will give you acceptable speed and then pick CRF that will give you acceptable quality for that speed.

bxyhxyh
18th July 2012, 15:25
Isn't visual quality all the same for same CRF (may little difference)? I think only difference is file size.

detmek
18th July 2012, 15:42
No, its not. Anyway, add --tune ssim --ssim to commandline and compare SSIM values to see if there is a difference and how much it is.

bxyhxyh
18th July 2012, 15:59
Edit: Double Post please remove this post

bxyhxyh
18th July 2012, 16:00
Thank you for reply. I'm newbie here.

@Moderators please move this thread to Newbies

bxyhxyh
18th July 2012, 16:27
I just tested first 1000 frames by using ssim 0.25 by Lefungus.
ssim(source.spline64resize(704,528).sharpen(0.2).Trim(0,1000), result.Trim(0,1000), "frames.txt", "average.txt", lumimask=1)
ultrafast -> Average SSIM= 89.11584754
superfast -> Average SSIM= 90.83998876
veryfast -> Average SSIM= 88.71193610
faster -> Average SSIM= 89.82614131
fast -> Average SSIM= 90.15330341
medium -> Average SSIM= 90.31213679
slow -> Average SSIM= 90.14146874
slower -> Average SSIM= 90.24917878
veryslow -> Average SSIM= 89.89653503
placebo -> Average SSIM= 89.97911930

I can say random. But they are close.

detmek
18th July 2012, 23:47
Preset veryfast has the lowest value and preset superfast has the highest. Quality difference among those is 24,5%. Not so drastic but its there.

LoRd_MuldeR
19th July 2012, 00:02
Also be aware that if you want to compare SSIM or PSNR (or whatever quality metric) values, then you have to compare files of identical file size (i.e. identical average bitrate).

Otherwise your comparison will be flawed! So you have to use 2-Pass mode for this kind of test, not CRF mode.

Furthermore it should be noted that objective metrics like SSIM or PSNR are not the same as visual quality either. They provide a more or less useful approximation of perceived quality.

After all, you should trust on eyes first ;)

detmek
19th July 2012, 00:11
Also be aware that if you want to compare SSIM or PSNR (or whatever quality metric) values, then you have to compare files of identical file size (i.e. identical average bitrate).

Otherwise your comparison will be flawed! So you have to use 2-Pass mode for this kind of test, not CRF mode.


Usually yes but not in this case. The point is to measure quality difference for the same CRF at different settings. Question is: Does same CRF at different settings gives same quality but different file size?

blubb444
19th July 2012, 01:49
No, as far as I understand (I'm also relatively new to it all), the same CRF value only applies to a specific setting, so let's say CRF 20 with superfast should give more artefacts than crf 20 at veryslow. There was a similar discussion here not too long ago (found it!): http://forum.doom9.org/showthread.php?t=164540 My personal guess is that CRF mode is only optimised to give vaguely the same quality only if the preset (=all the related params) and the resolution are the same (generally lower resolution requires lower CRF to achieve the same quality - when it comes to issues like visual macroblocking, banding etc - as high-res video). Other factors might play a role too.

nibus
19th July 2012, 02:18
Usually yes but not in this case. The point is to measure quality difference for the same CRF at different settings. Question is: Does same CRF at different settings gives same quality but different file size?

No, because the presets control other factors such as --merange, --subme, --me, etc.

For example, preset placebo uses --subme 11 while the faster presets use faster, less accurate --subme settings.

vivan
19th July 2012, 02:36
Question is: Does same CRF at different settings gives same quality but different file size?roughly same quality, not exactly.

bxyhxyh
19th July 2012, 07:16
After all, you should trust on eyes first ;)

My amateur eye is telling they are all the same.

http://www.hotimg.com/direct/FNTummX.png - UltraFast
http://www.hotimg.com/direct/xxyrPgW.png - SuperFast
http://www.hotimg.com/direct/AB5wmEp.png - VeryFast
http://www.hotimg.com/direct/Z33M3GC.png - Faster
http://www.hotimg.com/direct/f5gaP58.png - Fast
http://www.hotimg.com/direct/Yx3wqdS.png - Medium
http://www.hotimg.com/direct/TjfkpUq.png - Slow
http://www.hotimg.com/direct/zT39uqh.png - Slower
http://www.hotimg.com/direct/BctQ9jT.png - VerySlow
http://www.hotimg.com/direct/tJXt2gY.png - Placebo

kypec
19th July 2012, 08:29
My amateur eye is telling they are all the same.

You can't judge the motion video quality by comparison of static images only. You should watch it played back in realtime.

bxyhxyh
19th July 2012, 09:51
My main question is "Why preset veryfast result is so small file?" . There are not too much difference in quality (my eyes couldn't find its difference and SSIM test result).

LoRd_MuldeR
19th July 2012, 10:23
Usually yes but not in this case. The point is to measure quality difference for the same CRF at different settings. Question is: Does same CRF at different settings gives same quality but different file size?

But what do you want to conclude from that? The same CRF value obviously results in a different file size (average bitrate), as soon as we change other influential settings. If the "quality" also comes out differently, then we have files of different quality and different size/bitrate. You don't learn much from that. Well, you might calculate something like "SSIM per Bitrate", but I would be very careful to trust such "magic" numbers! If, on the other hand, you compare files of the same size (bitrate), you can easily compare quality and conclude which one looks better or worse (if any). Alternatively you may compare the size (bitrates) of files of the same "quality" - but this is much harder to establish...

My main answer is "Why preset veryfast result is so small file?" . There are not too much difference in quality (my eyes couldn't find its difference and SSIM test result).

As said before, you have to compare videos of the same size (average bitrate), otherwise their quality can't be compared anyway. Also, if you pick a bitrate which is so high that even the "worst" settings under test still give an acceptable result, then there is not much room for the "better" settings to improve things - obviously. Still, concluding that there is "no difference" between those settings would be wrong. And indeed, looking at still images isn't enough.

BTW: Why is the "veryfast" file so small? Because all you know about using a "faster" (or "slower") preset is that it will degrade (or improve) the "quality per bit" ratio. But you can not know how the absolute number of bits will change - at a given CRF value. At 2-Pass mode with target bitrate X, however, the absolute number of bits is "fixed" and thus it will be easier to compare the results...

detmek
19th July 2012, 12:35
Guys, just read first three posts. OP thought that same CRF will always give the same quality no matter what settings are used and that the only difference will be file size. Because that is not correct the only way to prove it is to measure quality for the same CRF at different presets, not for the same file size.
To conclude - same CRF with stronger compression settings can provide:
-higher quality and bigger file (Superfast has higher quality and bigger file size then most of presets)
-higher quality and smaller file (Medium vs. Fast, Slower vs. Slow, Slower vs. Fast)
-lower quality and smaller file. (Placebo vs. Slow, Fast, Medium).

bxyhxyh
20th July 2012, 06:14
Guys, just read first three posts. OP thought that same CRF will always give the same quality no matter what settings are used and that the only difference will be file size
Yes i think that way, and they must be same tune too.

Same tune and same crf will always give the same quality no matter what settings are used and that the only difference will be file size

detmek
20th July 2012, 14:08
And, as you can see, that is not correct.