Log in

View Full Version : X264 encoding Ringing around subtitles


MatLz
14th August 2009, 00:53
Hello everyone. In X264, is there a parameter to adjust to limit ringing artifacts around subtitles?

Inspector.Gadget
14th August 2009, 00:56
Why not use softsubs?

wyti
14th August 2009, 00:57
you can try to disable Adaptative quantization and psy-rdo (--aq-mode 0 --psy-rd 0:0) to help preventing them, but your whole video may look worse because of desactiving thoses options, the best way (if possible) is to use softsub with external subtitle files.

LoRd_MuldeR
14th August 2009, 01:01
Before you completely disable AQ and/or Psy-RDO and loose powerful features of x264, you may want to try lowering them a bit!

BTW: Did you use Psy-Trellis? If so, you should be really careful with strength here...

MatLz
14th August 2009, 01:10
In fact I recode animes with subtitles incrusted (euh...I'm french...Must I say "hardsubbed" ?)
I always use high parameters like tesa, subme 9-10, always trellis....so yes I can try without aqmode and psyrdo. Thanks

LoRd_MuldeR
14th August 2009, 01:12
In fact I recode animes with subtitles incrusted (euh...I'm french...Must I say "hardsubbed" ?)
I always use high parameters like tesa, subme 9-10, always trellis....so yes I can try without aqmode and psyrdo. Thanks

Use UMH and save a lot of time! Also try lowering the strength of AQ/PsyRDO before you completely disable ;)

BTW: Where is the hardsubbed content from?

Dark Shikari
14th August 2009, 01:16
Psy-RD likely has nothing to do with it.

Lowering AQ strength will improve the subtitles, but at the cost of everything else.

MatLz
14th August 2009, 01:29
In fact the artifacts are around the subtitles in the bottom and around the japanese symboles in the introduction...so when there is a black and white contraste.
And about quant matrices? Can it do something to that? (Sorry if I'm slow...I use a phone to post)

Dark Shikari
14th August 2009, 01:40
In fact the artifacts are around the subtitles in the bottom and around the japanese symboles in the introduction...so when there is a black and white contraste.
And about quant matrices? Can it do something to that? (Sorry if I'm slow...I use a phone to post)Custom quantization matrices aren't generally recommended with anime, but a very lowpass-y matrix will help avoid ringing (but at the cost of blurring).

LoRd_MuldeR
14th August 2009, 01:40
And about quant matrices? Can it do something to that? (Sorry if I'm slow...I use a phone to post)

You usually don't need to use a custom quantization matrix.

The things that people tried to achieve with custom matrices in the past are now done by x264's AQ and Psy RDO/Trellis - only in a better and more general way ;)

Also I think it was said that x264's Psy-opts are tuned for the "flat" (default) matrix and may not perform that well with other (extreme) matrices...

poisondeathray
14th August 2009, 01:48
A higher bitrate usually helps too :)

What are your source specs? dimensions? and what did you use for bitrate?

MatLz
14th August 2009, 02:02
I downscale 1280x720 perfect sources to 1024x576. Just to limit size. The resulting bits/pixel.frame is higher than the source. I will do Dark_Shikari and Lord_Mulder say about aq.....and try try try.

MatLz
14th August 2009, 02:39
Custom quantization matrices aren't generally recommended with anime, but a very lowpass-y matrix will help avoid ringing (but at the cost of blurring).

If after that I use negative values for deblock, it will sharpen the blurring result? Or deblock is before quant matrices?... How is the order chain?

LoRd_MuldeR
14th August 2009, 02:42
Quantization happens when a frame is compressed. The deblocking is applied after the frame has been decompressed.

Also negative numbers for the Loop-Deblocking won't "sharpen", they will just deblock/smooth less aggressive and hence preserve more detail/sharpness (at the risk of more blocking).

It's seems that negative Deblocking numbers like -1:-1 are helpful for "Film" material, while "Anime" likes positive values like +1:+1. Compare "--tune film" vs. "--tune animation" ;)

MatLz
14th August 2009, 03:35
Thanks a lot for all your explanations. I will do tests and tests and give the results in this thread of course. And thanks for your softwares too.

nakTT
14th August 2009, 06:20
Custom quantization matrices aren't generally recommended with anime, but a very lowpass-y matrix will help avoid ringing (but at the cost of blurring).
May I know how can I set this lowpass-y matrix? I planned to backup my animation video in a couple of week.

:thanks:

MatLz
14th August 2009, 17:02
Hi nakTT, I think "Y" is Luma, so we need to find a lowpass-luma matrix.
--aq-mode 0 seems to do good results but I will try more tests with lower values of --aq-strength with/without --psy-rd.

Dark Shikari
14th August 2009, 19:26
Hi nakTT, I think "Y" is LumaNo, it's the part of the word that makes a verb into an adjective ;)

MatLz
14th August 2009, 20:13
No, it's the part of the word that makes a verb into an adjective ;)

In that case of technical discussion it's chinese for the poor multilingal I am! :'(
I found some quant matrix but I don't know if they are lowpass-y or not!

Dark Shikari
14th August 2009, 20:15
In that case of technical discussion it's chinese for the poor multilingal I am! :'(
I found some quant matrix but I don't know if they are lowpass-y or not!Something with much bigger numbers in the bottom, right, and bottom-right than the top-left is a lowpassy matrix.

MatLz
14th August 2009, 20:30
Ok, thanks Dark Shikari. It speaks to me a little more! However, are these "custom" matrix compatible with multimedia hard disk? (I have bad memories with custom matrix for Xvid not compatibles with some dvd players)

nm
14th August 2009, 21:44
Ok, thanks Dark Shikari. It speaks to me a little more! However, are these "custom" matrix compatible with multimedia hard disk?If you mean a mobile playback device, probably not unless it supports high profile. Most standalone boxes that play HD H.264 video do support HP and therefore CQMs though.

MatLz
14th August 2009, 23:28
Thanks nm, good to know.
So... for the ringing artifacts around subtitles, after few tests....the winner is.....?......are --aq-mode 0 --psy-rd 0.00:0.00
I have try CQM lowpass to but without real effects.