View Full Version : Good x264 settings
Thunderbolt8
22nd November 2011, 01:55
Im looking for good settings I can use with x264 when my aim is a lossless encode (=good PQ) and minimal filesize at the same time. (for testing and the lulz, so please no debate about how useful this is)
I'd just go and choose crf 0, placebo profile and then tick all boxes I can / increase all numbers to the max. but from what I can see does activating (ticking) the boxes not in all cases automatically mean that the best setting for my purpose is selected, in some cases it seems that not ticking a box seems to be the better choice.
in other cases, it might be questionable if one setting or the other might provide the better result in the end (maybe the deblockling settings)
since I am a complete noob with x264, is anyone able to tell which settings these are, which boxes I have to tick, values I have to set to max? or maybe the other way round if thats shorter, so which few settings not to tick or not to set to max?
Groucho2004
22nd November 2011, 02:06
tick all boxes
x264 is a console program, there are no boxes to tick. You have to pass the options via the command line.
Lossless encoding as per cli help is "--qp 0". So, the command line would be:
x264 --qp 0 -o <output> <input>
There is more info about the options here (http://mewiki.project357.com/wiki/X264_Settings).
Keiyakusha
22nd November 2011, 02:14
Thunderbolt8
With lossless encode you don't need to "tick all boxes", cause they don't have a lot of meaning anyway. Some options that is most usefull for normal encoding are disabled at all. So leave everything at defaults. "best PQ possible" -> you can't say that about lossless encode. Lossless is always the SAME as the original in terms of quality. In other words, if you got some filesize with lossless encode, you can't really make it noticeably smaller. You can try to apply some heavy denoising before encoding, that will make file smaller.
gyth
22nd November 2011, 02:33
Here is another set of option explanations. (http://www.avidemux.org/admWiki/doku.php?id=tutorial:h.264)
Most of the options are about how to choose where the loss will occur, so possibly have no effect in a lossless situation.
crf 0 isn't lossless, use qp 0.
Groucho2004
22nd November 2011, 02:38
Here is another set of option explanations. (http://www.avidemux.org/admWiki/doku.php?id=tutorial:h.264)
Almost forgot about that. It's an excellent reference.
Keiyakusha
22nd November 2011, 02:48
crf 0 isn't lossless
it is.
kemuri-_9
22nd November 2011, 03:31
it is.
only in 8bit output, in >8bit crf goes negative.
Thunderbolt8
22nd November 2011, 06:33
was thinking about being in megui that would make it easier for me to find out about all the stuff I can apply. Id just copy the command line over then.
Thunderbolt8
Lossless is always the SAME as the original in terms of quality. In other words, if you got some filesize with lossless encode, you can't really make it noticeably smaller. You can try to apply some heavy denoising before encoding, that will make file smaller.what does noticeable mean? can I or cant I make it a bit smaller? so do (all) other settings about -crf 0 or -qp have effects on quality of the outcome or not and basically it doenst matter if I afterwards specify i.e. 16 ref frames or only 2?
and what about the difference of a lossless encode in 8 or 10-bit? do they differ in terms of quality or filesize?
vrpatilisl
22nd November 2011, 08:03
hi
I also intrested in lossles dvd backup .so i started reading threads frm forum. The conclusion may help u.
Dvd is compresed lossily,so when u decompres it size wij go upto 130gb. (one guy frm ths forum showd ths with calculation ,which i dönt understand.)so when u use crf 0 it will go upto. 56gb or somethng around. And as u said u want less size it is fruitless. so from all above discusion the following setting give visualy lossles bakup.
In megui use sharktöots x264 insane prest with 18crf. Or use bitrate of 3k to 4k.
i thnk ths will help u .further comment are welcome.
Mr Alpha
22nd November 2011, 08:56
Im looking for good settings I can use with x264 when my aim is a lossless encode (=good PQ) and minimal filesize at the same time. (for testing and the lulz, so please no debate about how useful this is)Are you talking about lossless "for realz", where the post encode video, when decoded, is mathematically identical to the pre encode one, or are you simply interested in visually transparent, ie you can't see any difference? You can still do a lossy encode but get a result where you won't be able to see a difference when you compare it to the original.
J_Darnley
22nd November 2011, 11:05
what does noticeable mean? can I or cant I make it a bit smaller? so do (all) other settings about -crf 0 or -qp have effects on quality of the outcome or not and basically it doesn't matter if I afterwards specify i.e. 16 ref frames or only 2?
To increase compression, use slower presets. There is nothing special in this case about lossless encoding other than the fact that it is huge and in general will not be smaller than any lossy-compressed input.
and what about the difference of a lossless encode in 8 or 10-bit? do they differ in terms of quality or filesize?
If you have an 8-bit input, as I understand it, will have no difference of the highest 8-bits so you are just wasting time and space by losslessly encoding in 10-bit due to the extra two bits and the dither applied.
With a 10-bit input, 8-bit clearly won't retain everything. 10-bit will.
To all: if you want a transparent encode, use crf 18 or possibly lower, depending on what you find is transparent. Transparent in this context means that you should not be able to tell the the difference between the input and the output when it is playing at regular speed in your regular viewing situation. This is a whole different concept to lossless.
Thunderbolt8
22nd November 2011, 14:08
im not just talking about a transparent encode, simply as good as theoretically possible.
from what I heard 10-bit encoding (with 8-bit input) can help to preserve grain and also help to decrease banding when using a rather "normal" amount of bitrate. so when doing a lossless encode, I guess this advantage will be void anyway, right?
infoeater
28th November 2011, 19:36
hi
I also intrested in lossles dvd backup .so i started reading threads frm forum. The conclusion may help u.
Dvd is compresed lossily,so when u decompres it size wij go upto 130gb. (one guy frm ths forum showd ths with calculation ,which i dönt understand.)so when u use crf 0 it will go upto. 56gb or somethng around. And as u said u want less size it is fruitless. so from all above discusion the following setting give visualy lossles bakup.
In megui use sharktöots x264 insane prest with 18crf. Or use bitrate of 3k to 4k.
i thnk ths will help u .further comment are welcome.
Why didn't you just losslessly remux MPEG-2 content from DVD to desired container and get much lower file size and higher compatibility?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.