Log in

View Full Version : (Faces/People) Change aq-strength & aq-sensitivity while still using ffmpeg


expresspotato
21st November 2009, 08:44
Hi,

I've been testing and enjoying H.264 for quite some time now, through the use of libx264 and ffmpeg to convert some existing video.

However I'm starting to notice a bit of a problem and I think aq-strength & aq-sensitivity are the answer.

When a person is standing behind a picture or background deemed to be complex, x264 takes too many bits away from the person, thinking its a simple, flat area.

Yes the background looks great, but it detracts from the my center focus, the person.

Editing common/common.c isn't probably the best solution, unless I know exactly where to place the edits.

There was an old post on there that mentions how to change the aq method. I've tried using that thread to disable aq all together, but it seemed to have no effect and I'm not sure why.

Dark Shikari
21st November 2009, 08:46
I'm pretty sure you can figure out where in common.c to edit, since there's only one line that assigns the default value of AQ strength ;)

Also, there is no option called AQ sensitivity and hasn't been for over a year.

Finally, you could also try AQ mode 2.

(And you could also try using a frontend less crappy than ffmpeg.)

expresspotato
21st November 2009, 08:54
Hi,

I really appreciate the quick response.


param->rc.i_aq_mode = X264_AQ_VARIANCE;


Was the only parameter related to aq_mode I could find. However, reading up on this old thread suggests ffmpeg might overwrite the value set here regardless...

http://forum.doom9.org/showthread.php?t=149650

Also while I'm here, do I need to recompile both after changing this setting?

Dark Shikari
21st November 2009, 08:56
Hi,

I really appreciate the quick response.


param->rc.i_aq_mode = X264_AQ_VARIANCE;


Was the only parameter related to aq_mode I could find. However, reading up on this old thread suggests ffmpeg might overwrite the value set here regardless...

http://forum.doom9.org/showthread.php?t=149650

Also while I'm here, do I need to recompile both after changing this setting?No, ffmpeg doesn't overwrite it. You can change AQ strength by adjusting... AQ strength. And AQ mode can be changed to AUTOVARIANCE instead of VARIANCE; see the #defines in x264.h.

expresspotato
21st November 2009, 08:59
Dark Shikari... Really appreciate it!

I'll give it a try and report back tomorrow evening.

dvy
21st November 2009, 11:59
Yes,background and NON-background not always distinguish correctly,I suggest importing wise algorithm and parameter to cleverly distinguish .

expresspotato
22nd November 2009, 04:26
Just an update... Using AUTOVARIANCE did fix the odd issue concerning peoples faces with a really dark and detailed background. However videos that didn't have this problem originally had a loss in quality.