Log in

View Full Version : Adaptive DCT and aud


Chengbin
25th January 2009, 23:39
What does Adaptive DCT and aud do? Should I turn it on? Does it make the output video high profile?

Dark Shikari
25th January 2009, 23:40
Should I turn it on?yes.Does it make the output video high profile?yes.

Chengbin
25th January 2009, 23:42
Thank you for the quick response, I edited my question to include the setting aud.

BTW, is there any way to improve the quality of the output video in this setting without making it high profile? BTW this is the setting used to encode anime. BTW, should I turn on psy rd for movies like Wall-E or Kung Fu Panda?

<?xml version="1.0"?>
<VideoProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>2 pass Balanced</Name>
<EncodingMode>4</EncodingMode>
<BitrateQuantizer>1000</BitrateQuantizer>
<KeyframeInterval>1000</KeyframeInterval>
<NbBframes>4</NbBframes>
<MinQuantizer>10</MinQuantizer>
<MaxQuantizer>51</MaxQuantizer>
<Turbo>true</Turbo>
<NoDCTDecimate>false</NoDCTDecimate>
<PSNRCalculation>false</PSNRCalculation>
<noFastPSkip>false</noFastPSkip>
<NoiseReduction>0</NoiseReduction>
<MixedRefs>true</MixedRefs>
<X264Trellis>2</X264Trellis>
<NbRefFrames>6</NbRefFrames>
<AlphaDeblock>-1</AlphaDeblock>
<BetaDeblock>-1</BetaDeblock>
<SubPelRefinement>9</SubPelRefinement>
<MaxQuantDelta>4</MaxQuantDelta>
<TempQuantBlur>0</TempQuantBlur>
<BframePredictionMode>3</BframePredictionMode>
<VBVBufferSize>14000</VBVBufferSize>
<VBVMaxBitrate>25000</VBVMaxBitrate>
<METype>tesa</METype>
<MERange>32</MERange>
<MinGOPSize>25</MinGOPSize>
<Level>4.1</Level>
<IPFactor>1.4</IPFactor>
<PBFactor>1.3</PBFactor>
<ChromaQPOffset>0</ChromaQPOffset>
<VBVInitialBuffer>0.9</VBVInitialBuffer>
<BitrateVariance>1.0</BitrateVariance>
<QuantCompression>0.6</QuantCompression>
<TempComplexityBlur>20</TempComplexityBlur>
<TempQuanBlurCC>0.5</TempQuanBlurCC>
<SCDSensitivity>40</SCDSensitivity>
<BframeBias>0</BframeBias>
<Deblock>true</Deblock>
<Cabac>true</Cabac>
<WeightedBPrediction>true</WeightedBPrediction>
<AdaptiveBFrames>2</AdaptiveBFrames>
<BFramePyramid>true</BFramePyramid>
<ChromaME>true</ChromaME>
<P8x8mv>true</P8x8mv>
<B8x8mv>true</B8x8mv>
<I4x4mv>false</I4x4mv>
<I8x8mv>true</I8x8mv>
<P4x4mv>false</P4x4mv>
<AdaptiveDCT>false</AdaptiveDCT>
<SSIMCalculation>false</SSIMCalculation>
<Interlaced>false</Interlaced>
<Width>false</Width>
<Sar>false</Sar>
<aud>false</aud>
<nal-hrd>false</nal-hrd>
<pulldown>0</pulldown>
<aq-mode>1</aq-mode>
<aq-strength>1</aq-strength>
<deadzone-inter>false</deadzone-inter>
<deadzone-intra>false</deadzone-intra>
<pre-scenecut>false</pre-scenecut>
<psy-rd>false</psy-rd>
<fpel-cmp>false</fpel-cmp>
<me-prepass>false</me-prepass>
<extra1>false</extra1>
<QuantizerMatrixType>0</QuantizerMatrixType>

Dark Shikari
25th January 2009, 23:45
<I4x4mv>false</I4x4mv> :scared:

Chengbin
25th January 2009, 23:49
:scared:

Clarify please. Thanks.

Sagekilla
25th January 2009, 23:52
i4x4 partition is helpful. That's why he's surprised you have it off.

Esurnir
26th January 2009, 00:06
aud is useless unless your aiming to make it a bd9/avc-hd (which you don't seeing the profile)

Since I see you got TESA on. Here are some hints.
<Name>2 pass Placebo</Name>
<NbBframes>16</NbBframes>
<Turbo>false</Turbo>
<noFastPSkip>true</noFastPSkip>
<NbRefFrames>16</NbRefFrames>
<VBVBufferSize></VBVBufferSize> (note : are you trying to make it dxva compatible ?)
<VBVMaxBitrate></VBVMaxBitrate>
<METype>tesa</METype>
<MERange>32</MERange>
<I4x4mv>true</I4x4mv>
<I8x8mv>false</I8x8mv> (you want main profile)
<P4x4mv>true</P4x4mv>
<psy-rd>true</psy-rd>(note : maybe the correct syntax is 1:0, I don't know your gui)

With this profile, your grandchild will enjoy maybe the greatest quality x264 can offer :D

(the bold part are the only serious suggestion, all others increase the quality a ridicule ammount, save maybe the turbo for the first pass, but I haven't been able to really witness the effect of a good first pass)

Chengbin
26th January 2009, 00:35
I'm encoding this for my Archos 5, which doesn't support 16 b and ref frames. It only supports 4 b frame and 6 ref frame (it might support more, but I think those numbers are safe). I'm using AutoMKV.

I thought it is not a good idea to enable psy-rd for anime.

How much improvement in quality do I get with turbo off?

Esurnir
26th January 2009, 00:37
I'm encoding this for my Archos 5, which doesn't support 16 b and ref frames. It only supports 4 b frame and 6 ref frame (it might support more, but I think those numbers are safe)

I thought it is not a good idea to enable psy-rd for anime.

Psy-RD is a bad idea (http://i170.photobucket.com/albums/u260/frenchgaljackie8/anime%20couples/Anime_couple.jpg)

Psy-RD is a good idea (http://mirror05.x264.nl/Dark/website/original_57.png)

CG and 3d animation work fine with psy-rd.

Dark Shikari
26th January 2009, 00:40
Psy-RD is a bad idea (http://i170.photobucket.com/albums/u260/frenchgaljackie8/anime%20couples/Anime_couple.jpg)

Psy-RD is a good idea (http://mirror05.x264.nl/Dark/website/original_57.png)

CG and 3d animation work fine with psy-rd.I've found psy-rd works fine on anime at higher bitrates, especially when you're trying to avoid banding in flat areas.

Chengbin
26th January 2009, 00:42
Define higher bitrates.

I'm encoding at around 300-500Kbps for anime. 1000Kbps for movies.

Should I reencode all my movies and anime for the I4x4 improvement? I have lots of time. Does I4x4 provide a noticeable improvement with low bitrates like what I'm using?

EDIT: You know what, I'm gonna reencode all my videos again since I have nothing better to do with my computer (except for F@H). I didn't buy a quad core for nothing. I'm gonna turn off turbo do everything right this time.

Dark Shikari
26th January 2009, 00:51
i4x4 provides an enormous benefit... I can't imagine why anyone would turn it off...

Esurnir
26th January 2009, 00:56
Define higher bitrates.

I'm encoding at around 300-500Kbps for anime. 1000Kbps for movies.

Should I reencode all my movies and anime for the I4x4 improvement? I have lots of time. Does I4x4 provide a noticeable improvement with low bitrates like what I'm using?

EDIT: You know what, I'm gonna reencode all my videos again since I have nothing better to do with my computer (except for F@H). I didn't buy a quad core for nothing. I'm gonna turn off turbo do everything right this time.

If you don't really want a set size, maybe you should encode your files using CRF. (also called constant quality).

You use one pass, you don't know what's the resulting file size but you know the quality.

Personaly I never had anyone make me any remark (more like "wow blu-ray are indeed high quality") from a crf 20 encode.

P.S. Keep the vbv settings since you encode for a device.

Chengbin
26th January 2009, 01:01
I'm using 2 pass because I want to hit a specific size. I have too many videos and too little space on my Archos 5 250GB.

Chengbin
26th January 2009, 01:02
i4x4 provides an enormous benefit... I can't imagine why anyone would turn it off...

No wonder you were "scared"

Chengbin
26th January 2009, 22:03
Turning turbo off doesn't seem to make encoding slower???

Esurnir
26th January 2009, 22:10
Turning turbo off doesn't seem to make encoding slower???

Turbo really depends on the gui, in megui turbo means that the first pass will use the settings of the second pass. for other software your mileage will vary.

Chengbin
26th January 2009, 22:16
Turbo really depends on the gui, in megui turbo means that the first pass will use the settings of the second pass. for other software your mileage will vary.

I'm using AutoMKV.

Sharktooth
28th January 2009, 01:47
Turbo really depends on the gui, in megui turbo means that the first pass will use the settings of the second pass. for other software your mileage will vary.
nope... turbo in megui lowers the settings of the first pass to a level they will speed up the encoding but wont hit the quality in a noticeable way.

Esurnir
28th January 2009, 01:54
nope... turbo in megui lowers the settings of the first pass to a level they will speed up the encoding but wont hit the quality in a noticeable way.

Sorry for the screwup. It is indeed the opposite of what I said.

AntiJw
28th January 2009, 15:29
About x264's --aud
//forum.doom9.org/showthread.php?t=144241

Ranguvar
28th January 2009, 20:05
So, given what the above said about turbo, I'd recommend you leave it on. It'll save a lot of time for very little quality hit, which could be spent elsewhere.

Chengbin
29th January 2009, 01:29
So, given what the above said about turbo, I'd recommend you leave it on. It'll save a lot of time for very little quality hit, which could be spent elsewhere.

As I said, turning turbo off didn't seem to affect encoding speed, it is still at around 10fps. I have lots of time anyway.

LoRd_MuldeR
29th January 2009, 04:53
turning turbo off didn't seem to affect encoding speed.

Then "--b-adapt 2" may be the bottleneck in your first pass...

Chengbin
29th January 2009, 05:15
Is b-adapt 2 better than 1?

Esurnir
29th January 2009, 05:33
Is b-adapt 2 better than 1?

Short answer : yes.
Long answer YEEESSSSSSSS

LoRd_MuldeR
29th January 2009, 05:33
Is b-adapt 2 better than 1?

Much better and significant slower.

With the old method (--b-adapt 1) you could use "--bframes 16" safely. Now with the new method (--b-adapt 2) you should limit "--bframes" to a sane value like "4" or you waste a lot of time for no benefit!
Even if you allow up to 16 b-frames, x264 will almost never decide to actually use 4 (or even more) consecutive b-frames. At the same time "--b-adapt 2" becomes slower with each b-frame your allow.

Note: Since b-adapt is part of lookahead, which is not multi-threaded yet, it can easily become the performance bottleneck of your first pass...

kemuri-_9
29th January 2009, 05:45
With the oldNow with the new method (--b-adapt 2) you should limit "--bframes" to a sane value like "4" or you waste a lot of time for no benefit!

depends on your source how much you'll get out of 16 bframes on b-adapt 2.

usually there will be diminishing returns with further increases...
but as i work with anime... i often get significant %s of bframe sequences being >4 bframes
i.e.

x264 [info]: consecutive B-frames: 6.3% 18.7% 29.8% 13.9% 7.8% 5.9% 2.4% 2.8% 1.5% 2.5% 0.8% 1.6% 0.7% 2.2% 1.3% 0.8% 1.1%

LoRd_MuldeR
29th January 2009, 05:51
Well, Anime is a special case then. For "real life" footage it looks more like that:

x264 [info]: slice I:13 Avg QP:23.57 size: 19686 PSNR Mean Y:39.68 U:43.74 V:44.51 Avg:40.69 Global:40.52
x264 [info]: slice P:1053 Avg QP:25.58 size: 3150 PSNR Mean Y:37.20 U:42.17 V:42.83 Avg:38.32 Global:38.12
x264 [info]: slice B:1196 Avg QP:28.13 size: 628 PSNR Mean Y:37.00 U:41.98 V:42.64 Avg:38.13 Global:37.89
x264 [info]: consecutive B-frames: 8.4% 52.2% 33.7% 2.8% 0.7% 0.8% 0.3% 0.0% 0.0% 0.4% 0.0% 0.0% 0.0% 0.6% 0.0% 0.0% 0.0%
x264 [info]: mb I I16..4: 2.4% 53.1% 44.5%
x264 [info]: mb P I16..4: 0.0% 0.6% 0.3% P16..4: 35.3% 13.5% 13.6% 1.4% 1.5% skip:33.7%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 25.7% 1.6% 2.6% direct: 3.2% skip:66.9% L0:28.5% L1:58.9% BI:12.6%
x264 [info]: 8x8 transform intra:56.2% inter:48.0%
x264 [info]: direct mvs spatial:98.8% temporal:1.2%
x264 [info]: ref P L0 79.3% 8.0% 5.1% 1.9% 1.7% 1.5% 1.5% 1.0%
x264 [info]: ref B L0 80.9% 7.5% 4.9% 2.3% 1.9% 1.4% 1.1%
x264 [info]: ref B L1 94.8% 5.2%
x264 [info]: SSIM Mean Y:0.9691649
x264 [info]: PSNR Mean Y:37.108 U:42.078 V:42.739 Avg:38.234 Global:38.006 kb/s:382.33

Not worth going any higher than 4, even 3 would be sufficient here...

kemuri-_9
29th January 2009, 06:36
Well, Anime is a special case then. For "real life" footage it looks more like that:

yes... encoding is full of 'special cases' so don't generalize as it tends to lead to falsities!

Chengbin
29th January 2009, 13:49
Fantastic

Is trellis 2 better than 1? I heard from Dark Shikari that trellis 2 has the tendency to kill fine details.

Sagekilla
29th January 2009, 15:47
Trellis 2 without psy-trellis enabled tends to kill off fine details, because it's PSNR optimal. Once you turn on psy-trellis, trellis will try to keep details. In terms of compression though, trellis 2 always provides better compression because it acts at all stages of encoding, not just the final MB encode.

Dark Shikari
29th January 2009, 15:54
Trellis 2 without psy-trellis enabled tends to kill off fine detailsNot even that. The "killing off fine details" was from before AQ. More trellis would tend to kill details in flat blocks because the lambda in those blocks was badly chosen anyways, and by optimizing more for that lambda, they would tend to reduce detail. Of course, with AQ, the problem no longer really exists IMO.