View Full Version : X264 Configuration
[DSL]Sensenman
15th June 2005, 21:10
Hi, since I'm using x264 for the first time now (used XviD), i wanted to ask if somebody could give me a good configuration (for the advanced menu, e.g. what boxes to check and the best values for rate-control, b-frames and so on).
In the Doom9-Guides there's only an old guide for x264 (some functions aren't explained here).
So if anybody could give me some advice, I'd be happy (since i don't have to experiment with the values myself :) )
Thanks in advance
PS.: I'm encoding a movie (no animated content, if that matters) @ ~1200Kbps
Leo 69
15th June 2005, 21:36
You may increase the number of reference frames up to 5 or 6 and use 2 or 3 b-frames in pyramid with bi-prediction. All other options leave @ default. And don't forget to enable 8x8 DCT. These are my personal settings for now.
Sharktooth
16th June 2005, 03:32
3 refs are enaugh. more than 5 is an overkill.
[DSL]Sensenman
16th June 2005, 08:54
That's all? All other options @ default? What about 3-pass encoding, is the increase in quality considerable or is it just a waste of time?
But anyway, thanks for the replies :)
Sharktooth
16th June 2005, 12:18
That's all. 3 pass encoding is needed if the rate control goes nutz and the encode doesnt hit the desired filesize OR to better distribute the bitrate (but it wont always improve).
Remember to enable also i8x8, 8x8dct (high profile) and RDO (--subme 6 in cli or Partition decision quality = 6 in vfw) if you want superiror quality ;)
[DSL]Sensenman
16th June 2005, 13:11
OK, I'll do this, thanks Sharktooth
GUTB
17th June 2005, 08:22
Does i8x8 and dct REALLY improve quality?
hellgauss
17th June 2005, 08:50
It's the first time for me too..... i just want to ask how multi pass work....
When i choose first pass i can select a stat file for output. When i chose Npass the stat txt is ghost.
I think i should be able to choose an input stat file and an output stat file if i want an update pass..... how does it work?
Tnx
celtic_druid
17th June 2005, 12:42
Update pass stats naming is auto done. You get
x264-1.stats, x264-2.stats, etc. If you leave the stats settings from your 1st pass then they will be ok for nth.
Ishan
17th June 2005, 13:07
I personnaly use:
--ref 3 --subme 6 --bframe 2 --weightb --b-pyramid --8x8dct --analyse i4x4,p4x4,p8x8,b8x8,i8x8,
using x264cli I get very good result on 2mbps DVD res 3 passes encodes
Sharktooth
17th June 2005, 13:43
Does i8x8 and dct REALLY improve quality?
Yes, for mid and high bitrate encodings i8x8 preserve more details. For fow bitrate encodings 4x4 is better.
Remember i consider those low, mid and high bitrates in function of AVC efficiency so they're not related ASP in any way.
I mean, i consider 900Kbps a mid bitrate for AVC and low bitrate for ASP.
thed33p
17th June 2005, 16:23
@ Sharktooth
So should I read that as: "Leave i8x8 off for single CD full movie encodes?"
I know there's no universal "best" setting... I just mean in general
GUTB
18th June 2005, 01:40
I wish x264 gave you the option to turn off qpel as it just adds to file size in many of my applications. On the other hand, most of those pixel area search options don't appear to effect overhead much if at all. Are they actually doing something?
berrinam
18th June 2005, 02:08
On the other hand, most of those pixel area search options don't appear to effect overhead much if at all.
If I'm not mistaken, this is due to the efficiency of CABAC.
akupenguin
18th June 2005, 03:38
I wish x264 gave you the option to turn off qpel as it just adds to file size in many of my applications. There used to be such an option (subq=0). Disabling qpel search increased bitrate by about 15% and increased speed by about 5%.
On the other hand, if you wished that H.264 allowed you to disable qpel, then I agree.
Sharktooth
18th June 2005, 15:24
@ Sharktooth
So should I read that as: "Leave i8x8 off for single CD full movie encodes?"
I know there's no universal "best" setting... I just mean in general
No, i mean 8x8 is useless at 400kbps with DVD resolutions...
Ishan
18th June 2005, 19:22
Anyone can explain how to setup the inloop filter?
I've trouble understanding how it works :confused:
(I'll mainly do PAL DVD anamorphic backups for my home video server -> 2mbps)
Sergejack
19th June 2005, 15:39
3 refs are enaugh. more than 5 is an overkill.
What do you mean with "overkill" ?
CPU usage ? Bit waisted ? Both ?
I always set max 15 ref for my low bitrate (+/-160kbit/s) encodes.
IRMA1024
24th June 2005, 19:41
maybe overkill means no big improvements on PSNR, that's mean human eye can't see the difference (improvements) while encoding time increased (it is wasting of time for nothing)
Sharktooth
24th June 2005, 20:26
maybe overkill means no big improvements on PSNR, that's mean human eye can't see the difference (improvements) while encoding time increased (it is wasting of time for nothing)
Exactly... and the decoding complexity rises...
Rash
26th June 2005, 19:39
I have a question about the quantizers. It is set by default quantizer 10 as the lowest. Wouldn't it be better a quantizer 2 as the lowest, just like XviD, for example?
bond
26th June 2005, 19:50
I have a question about the quantizers. It is set by default quantizer 10 as the lowest. Wouldn't it be better a quantizer 2 as the lowest, just like XviD, for example?
the quants are different in asp (xvid) than in avc (x264), so you cant compare quant 2 in xvid with quant 2 in x264
Rash
26th June 2005, 20:25
Alright. I did test with quant 2 (as lowest quant) and it didn't produce a significant better image. But the final filesize wasn't so accurate as with the default values.
So I'll stick to the default. ;)
SirCanealot
27th June 2005, 01:40
I might note that in early x264 anime tests, setting 10-15 reference frames decreased the filesize slightly on short single-pass encodes.
It was actually a suprising decrease in some situations — would be handy if seeking for 140/175 meg filesizes.
But *shrugs* do you own tests if you're working with anime, I guess ^^
Selur
27th June 2005, 08:24
about comparing quantizers, this might help:
The mapping is approximately H264QP = 12 + 6*log2(MPEGQP). For example, MPEG at QP=2 is equivalent to H.264 at QP=18.
source: http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.txt
Cu Selur
dvbm
27th June 2005, 11:28
what about webcasting streams 300-400kbps (video only) ?
i made some tests with my very basic knowledge of mpeg encoding and started using frame size and bandwidths considered as standards nowdays..
the results with x264 are really interesting much better than anything quicktime, real or divx/xvid can produce but wmv is still pretty close and i'm quite surprise by that..
so i was wondering what kind of "profile" should be used with x264 and what kind of parameters should be used for low bandwidth streams..
The video sources are Movie trailers from retail DVDs.. beware that trailers usually have a poor master quality, especially for old movies, compared to the actual movie quality.
The idea is to produce streams for basic DSL lines (512kbps) that can be viewed in fullscreen mode.. maybe i'll also try to offer a lower bitrate version like 200-250kbps (video)..
for the moment i use a video size of 320x, all the resizing, deinterlacing, pre-processing work is done with avisynth..
any tips would be greatly appreciated
thx
.dvbm
Igor Kharchenko
29th June 2005, 13:32
How can I select optimal bitrate for 2-pass encoding? For xvid DVD backup I use to make compressibility test with GKnot 0.35. But for x264 GKnot suggestes higher bitrate for the same compressibility. Should I use lower compressibility?
berrinam
29th June 2005, 13:47
@Igor Kharchenko: Yes, you should use a lower compressibility. Keep in mind, of course, that compressibility test isn't meant as a comparison between the quality of two codecs.
The optimal bitrate depends on many things, mostly what medium you want to put the output on, and what quality you are happy with. So, for the best results, you should do your own tests.
Igor Kharchenko
30th June 2005, 11:40
Yes, you should use a lower compressibility.
How much approximately? For xvid backup (704xXXX) I use ~80%. I made several tests and I think for x264 ~70%.
The optimal bitrate depends on many things, mostly what medium you want to put the output on,
usually 1/2 or 1/3 DVD5
and what quality you are happy with.
HQ :)
So, for the best results, you should do your own tests.
Can I use PSNR, which I obtain during comp.test, for bitrate selection? Does this parameter correlate with bitrate and what is approx. formula?
berrinam
30th June 2005, 12:43
@Igor Kharchenko: Can I just ask for what reason you want to use the compressibility test? If you have a fixed output size (ie, 1/2 or 1/3 DVD), then you can't vary the bitrate anyway, and if you want to keep the same quality in all movies, then you may want to use the Quantizer-based approach to encoding.
Anyway, to answer your questions as well as I can:
How much approximately? For xvid backup (704xXXX) I use ~80%. I made several tests and I think for x264 ~70%.
I'm afraid I have no idea, but if you think 70% gives you roughly equal quality to XviD 80%, then great. If you are not sure, see later in this post.
Can I use PSNR, which I obtain during comp.test, for bitrate selection? Does this parameter correlate with bitrate and what is approx. formula?
Yes, PSNR will give you a measure of the quality (although this may not always agree with you). Yes, PSNR will increase as the bitrate increases. By how much, I do not know. You can use PSNR as a simple test for quality to see how x264 compares with XviD.
Sorry I can't be of more help, but as I said earlier, the best way to find out is your own testing.
Igor Kharchenko
30th June 2005, 14:15
Can I just ask for what reason you want to use the compressibility test? If you have a fixed output size (ie, 1/2 or 1/3 DVD), then you can't vary the bitrate anyway, and if you want to keep the same quality in all movies, then you may want to use the Quantizer-based approach to encoding.
From comp. test I wil see what I must do to obtain desired size. May be I may keep selected bitrate and slightly decrease resolution or apply more aggressive filters, when the movie is noisy or high motion. Or if this doesn't help I must greatly increase bitrate and thus size (1/3 DVD -> 1/2 DVD).
With GKnot comp.test for xvid I make 1 test and decide what to do (according to Gknot guide ~80% compressibility is high quality).
As I understand I must do more tests myself to decide what compressibility value is mine :)
Yes, PSNR will give you a measure of the quality (although this may not always agree with you). Yes, PSNR will increase as the bitrate increases. By how much, I do not know. You can use PSNR as a simple test for quality to see how x264 compares with XviD.
Yes, I will do more tests and try to analyse results with MSU Video Quality Measurement Tool.
Sorry I can't be of more help, but as I said earlier, the best way to find out is your own testing.
Thank you.
Maybe more people share their experience about DVD-backup with x264 ;)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.