PDA

View Full Version : max references frames in x264


pyrates
12th November 2006, 04:23
What is the maximum amount of references frames I can put in a x264 encoding so that it can compress it the best? Also is setting the amount of b-frames to 3 a good number to use too? Thanks.

Blue_MiSfit
12th November 2006, 05:26
IIRC, 4 references or so is where you start getting diminishing returns. Also, the more references the slower, so I suggest no more than 5 or 6. I usually do 4 as I find it to be a good balance.

3 bframes is a pretty 'standard' setting. A lot of people use it. In the XviD days I used to always use 3 bframes for tighter compression, and 1 only for high bitrate stuff (along with adjusting the bframe quantizer ratio). Haven't played with this in x264 though.

It's all up to you, of course :)

Romario
12th November 2006, 16:23
I often use 3 or 5 reference frames, which depends on material. Of course, you always should use ref frames together with mixed refs, especially if you use 4 or 5 reference frames.

I use 3 B-frames, sometimes 4 or 5.

Sharktooth
12th November 2006, 16:27
a sane value is from 3 to 5 refs.
for anime and toons you may want to rise it a bit

imcold
12th November 2006, 18:05
Of course, you always should use ref frames together with mixed refs, especially if you use 4 or 5 reference frames.
Why is that?

Sharktooth
12th November 2006, 18:14
the x264 mixed reference frames option.

arfster
12th November 2006, 20:55
With mixed frames, will x264 always select an appropriate number of reference frames even if you select an insane max? I'm not bothered about decoding requirements.

bond
12th November 2006, 21:13
mixed ref allows to refer to different macroblocks and not just whole frames.

akupenguin
13th November 2006, 00:17
With mixed-refs, we fully exercise the "multiple reference frames" feature of the standard. Each 8x8 block picks one of the available reference frames. Increasing the number of references increases the amount of choice that the encoder has, and thus improves compression ratio at a cost of encoder speed. It also forces the decoder to keep around all those frames, thus costing memory but not much difference in decoding speed.

Without mixed-refs, the situation is exactly the same, except that x264 performs the reference frame decision only on a whole 16x16 block, and uses the result for the component 8x8 blocks. This improves encoding speed at a cost of some compression ratio. It has no effect on decoding speed or memory requirements.

I didn't expect mixed-refs to affect compatibility, since it's not a separate feature in the standard, just a encoder-side optimization in x264. But it turns out that Apple's decoder doesn't support mixed-refs.

pyrates
13th November 2006, 02:42
Well I'm trying it with 6 b-frames and 32 references frames with the usual insane profile settings. Let's hope it enables for some good compression. :) I decided to use the DTS track which is 1.2 GB so I gotta have some good compression on the 1080p video. I planned to fit this on a dvd so that's why I had to up the b-frames and the reference frames.

Sharktooth
13th November 2006, 03:25
max refs are 16... and 16 is useless and will slow down to death the encoding speed...

Al79
13th November 2006, 06:19
max refs are 16... and 16 is useless and will slow down to death the encoding speed...

mmm, so what value its correct for "anime", i know i need a bigger value than 5, and u profile Maxquality is 16 so :confused:

i use ur profile, maybe a 10 value its better???? or still continue with 16??

foxyshadis
13th November 2006, 11:47
For anime type stuff 10 is the highest I'll go, and even that's usually overkill; 6-8 is the most that'll often make a noticeable difference.

You can always find out for yourself by running 16 crf encodes, one for each, timing them, and plotting them on a graph. That's been done for other types before.

Al79
13th November 2006, 19:44
For anime type stuff 10 is the highest I'll go, and even that's usually overkill; 6-8 is the most that'll often make a noticeable difference.

You can always find out for yourself by running 16 crf encodes, one for each, timing them, and plotting them on a graph. That's been done for other types before.

Ty^^, i doing, right now, and yes is a big diference. thanks by the advice