Log in

View Full Version : Encoding artefacts in fog scene


BlackSand
17th October 2010, 08:49
Hi, I'm trying to encode movie Baraka (source - BDRip 1080p, to 1024x464) and have some problems. I use StaxRip 1170 with x264 r1732 and settings are: Quality 21; Preset Slower; Tune Film; Device DivXPlus. Also I set AQ Strength 1.3. The result quality is very decent for most of the movie except some scenes like this sample: http://rapidshare.com/files/424469843/Baraka.rar (I include result file too)
There are easy visible blocking/warping aroung and esp. after peoples moves at 0-25s, and very ugly warping around man's head at 20-21s. :(
I understand that CRF 21 is not "transparent" quality but I got high enough overall bitrate and bpp so I was hope for more artefact free result. This scene is not so blurry and I thought codec will handle it without much problem.
If I set AQ strength even 2, resulting more than twice filesize (more than with CRF18), the only better things are wall and building textures but artefacts around peoples still here. Where the double bitrate effect? :-/

Also I was trying to tweak placebo preset, b-pyramid and some other settings but the only real quality gain I've got with lower CRF like 18.

So, my questions are:
Is it possible to get more artefact free result with CRF 21 or so? I don't understand why AQ strength are do so little in this particular sample because in other similar situation it can work very well.
If not AQ, what settings may I use to force codec pay more attention to flat areas like objects in fog, smoke, dark areas etc.?
Thanks! :)

Blue_MiSfit
17th October 2010, 21:27
Hi BlackSand! Welcome!

1) bpf is totally meaningless. stop using it. right now ;)

2) AQ mode 2 works very differently from mode 1. If you want an apples to apples comparison, you can't use CRF.

3) Placebo is a placebo. Don't use it :) Back off to slower or veryslow and increase bitrate or reduce resolution.

4) I'd suggest maybe adding some light denoising, but that's just me... You could also add a zone, and tell x264 to use a higher bitrate / lower CRF on this section.

Derek

BlackSand
18th October 2010, 12:09
Hi Blue_MiSfit!

I don't use AQ mode 2, just set different AQ Strength up to 2.

Perhaps using zones are good solution for my case. But as I know, I can't use CRF in zones, only QP or bitrate multiplier. Which one will perform better or more optimal? And I'm getting error when trying to encode with zones: "x264 failed with exit code -1073741515".

Edit: Error solved - broken x264.exe

Dark Shikari
18th October 2010, 12:56
There are easy visible blocking/warping aroung and esp. after peoples moves at 0-25s, and very ugly warping around man's head at 20-21s.Hey, there's artifacts in places that AQ lowers quality!

I don't use AQ mode 2, just set different AQ Strength up to 2.So... we'll make AQ even stronger. Nothing could go wrong.

Sharktooth
18th October 2010, 14:08
why did you mess with AQ parameters? if you dont know what they do, dont touch them!

BlackSand
18th October 2010, 20:16
@Dark Shikari

So... we'll make AQ even stronger. Nothing could go wrong.


As I said, when I set CRF21 and AQ Strength=2 (just for experiment), the result file size is even bigger than with CRF18 and AQ Strength=1 (normal), but artifacts are still here. CRF18 with lower file size looks much better. I just want to say that in this particular sample IMHO AQ works strange and may perform better. :)

@Sharktooth

why did you mess with AQ parameters? if you dont know what they do, dont touch them!


Well, in my little experience :) sometime tweaking AQ strength can be useful. If I set CRF low enough (18-19), codec have enough bitrate for all and I have good quality in both high-contrast and low-contrast areas. If I set higher CRF (21), codec start to lose some detail in low-contrast areas, it's normal. But in some cases I can set AQ strength a little more, resulting better quality in low-contrast areas (shadows, fog, smoke, sunset...), still good quality in high-contrast areas and a small gain of overall file size (much smaller than with just lowering CRF for such visual quality).

kypec
18th October 2010, 20:56
You know that CRF value can be specified with decimal numbers like 18.43, right? Perhaps you can fine tweak the value of CRF and do not mess with AQ at all...just a thought.

nm
18th October 2010, 21:49
So... we'll make AQ even stronger. Nothing could go wrong.

As I said, when I set CRF21 and AQ Strength=2 (just for experiment), the result file size is even bigger than with CRF18 and AQ Strength=1 (normal), but artifacts are still here. CRF18 with lower file size looks much better.

DS was being sarcastic there: decreasing AQ strength would be a better choice because the artifacts were caused by AQ in the first place.

jethro
19th October 2010, 00:27
IMO setting AQ strength around 2.0 is asking for trouble. If you feel low contrast areas need more detail try LOWERING psy-rd. If you want to remove macroblocks from low contrast parts raise deblocking, 0:0 is a good start.

BlackSand
19th October 2010, 12:07
@kypec
Yes, I know and it's useful

@nm
Decreasing AQ strength further destroy building details & textures but does not help with artifacts around people. On the contrary this toward to worse image quality overall.

@jethro
Agree, lowering psy-rd may help, but I don't want to make such changes on the whole movie, so I need to use it with zones.

Just tried to encode sample with --zones and b=1.5 and very pleased with result. May be this is a good workaround.