Log in

View Full Version : x264: CG encoding-settings?


Forteen88
21st November 2009, 20:37
Hey,
can I get some recommendation for clear (no grain) HD-resolution CG encoding-settings on x264?

My current encoding-setting for clear HD CG:
x264.exe --pass 1 --b-adapt 2 etc...
x264.exe --pass 2 --profile high --level 4.1 --ref 4 --bframes 8 --direct auto --deblock -3:-3 --subme 10 --me umh --no-dct-decimate --partitions all --psy-rd 0.8:0.0 --merange 32 --aq-strength 0.8 --mixed-refs --no-fast-pskip --trellis 2 --rc-lookahead 50 --sar 1:1 --output "video.mkv" "video.avs"

I kept rather high AQ-strength to make it better against banding.
Is bframes 16 good for this type of source? Is mb-tree good for CG, or mostly for cartoon/anime?
Thanks

Dark Shikari
21st November 2009, 20:45
Hey,
can I get some recommendation for clear (no grain) HD-resolution CG encoding-settings on x264?

My current encoding-setting for clear HD CG:
x264.exe --pass 1 --b-adapt 2 etc...
x264.exe --pass 2 --profile high --level 4.1 --ref 4 --bframes 8 --direct auto --deblock -3:-3 --subme 10 --me umh --no-dct-decimate --partitions all --psy-rd 0.8:0.0 --merange 32 --aq-strength 0.8 --mixed-refs --no-fast-pskip --trellis 2 --rc-lookahead 50 --sar 1:1 --output "video.mkv" "video.avs"

I kept rather high AQ-strength to make it better against banding.
Is bframes 16 good for this type of source? Is mb-tree good for CG, or mostly for cartoon/anime?
Thanks0.8 is high? The default is 1.

I'd use --preset veryslow --tune film and be done with it ;)

(Film tune seems to work well enough for CG)

Forteen88
21st November 2009, 20:58
0.8 is high? The default is 1.

I'd use --preset veryslow --tune film and be done with it ;)

(Film tune seems to work well enough for CG):)
Thanks DS, but veryslow uses 16 refs, which doesn't allow DXVA :P I can set that option (--ref) to lower though.

I thought that CG is slightly close to cartoon/anime, so a high AQ-strength isn't necessary, am I wrong in thinking so?

Is it true that trellis 2 isn't good for cartoon or CG, and that setting low (at ~5) deadzones is better? I read that in a forum.

EDIT: Ok, thanks DS. I'll use trellis 2 on CG and anime/cartoon then.

Dark Shikari
21st November 2009, 21:01
I thought that CG is slightly close to cartoon/anime, so a high AQ-strength isn't necessary, am I wrong in thinking so? No, if anything, it's the opposite. Anime is a situation in which flat areas generally have nearly no detail and all the bits are concentrated on edges. In CG, you can have extreme detail in flat areas--even more than in live-action--because you don't have a noisy camera to interfere.Is it true that trellis 2 isn't good for cartoon or CG, and that setting low (at ~5) deadzones? I read that in a forum.That's retarded. The place where trellis 2 gives the most benefit is in anime.

Blue_MiSfit
22nd November 2009, 01:01
Also, if you want to limit refs for DXVA, but still use --preset veryslow, add --level 41 and it will all comply with the proper ref count for 1080p or 720p, whichever you choose.

Heck, do it all in 1 pass CRF mode, and set a 40mbps VBV ;)

~MiSfit

Audionut
22nd November 2009, 01:19
It was my understanding that setting level only set a flag, it didn't change options to make it compliant.

Dark Shikari
22nd November 2009, 01:34
It was my understanding that setting level only set a flag, it didn't change options to make it compliant.No, it doesn't change the options if you explicitly set them.

masterkivat
22nd November 2009, 06:38
The place where trellis 2 gives the most benefit is in anime.

Just a quick doubt regarding trellis 2: Is trellis=2 a good choice for live-action content?

Dark Shikari
22nd November 2009, 06:59
Just a quick doubt regarding trellis 2: Is trellis=2 a good choice for live-action content?If it wasn't, it wouldn't be in the presets.

Sub-zero
23rd November 2009, 07:16
a curious newbie question :p (and maybe wrong place to ask(?))

program --tune animation --qp 0 -o "output.mp4" "input.avs"

why does these encoding settings disable bframes (by default)?

Stephen R. Savage
23rd November 2009, 07:25
Because B-frames in lossless mode aren't implemented.

Sub-zero
23rd November 2009, 07:34
Because B-frames in lossless mode aren't implemented.
even if set them explicitly? I mean does it really not help in lossless mode? because (i noobly think) bframes can take place (and take refs) and deciding to use bframes or not is not related to the quantization phase, but rather to the analyzing phase.

if there is any link that help me understand it is also o.k

nurbs
23rd November 2009, 08:07
commit 6a4a9beae060d69bbeaeb8c1c3056fb6ae6765f6 r1073
Author: Jason Garrett-Glaser <darkshikari@gmail.com>
Date: Tue Jan 6 16:55:44 2009 -0500

Disable B-frames in lossless mode
They hurt compression anyways, and direct auto was bugged with lossless.

ajp_anton
23rd November 2009, 11:13
even if set them explicitly? I mean does it really not help in lossless mode? because (i noobly think) bframes can take place (and take refs) and deciding to use bframes or not is not related to the quantization phase, but rather to the analyzing phase.

if there is any link that help me understand it is also o.kB-frames are good because they can be even more lossy without destroying the overall quality compared to p-frames. Lossless b-frames aren't very useful.

Dark Shikari
23rd November 2009, 11:16
B-frames are good because they can be even more lossy without destroying the overall quality compared to p-frames. Lossless b-frames aren't very useful.No, they're good because in lossy mode, it is better to code as much residual as possible in a single location (a P-frame at the end of a B-frame group) than to spread it among many frames. This isn't true in lossless mode.