Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 22nd November 2011, 01:55   #1  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,205
Good x264 settings

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?
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)

Last edited by Guest; 22nd November 2011 at 03:10. Reason: rule 12: don't ask what's best
Thunderbolt8 is offline   Reply With Quote
Old 22nd November 2011, 02:06   #2  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Thunderbolt8 View Post
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:
Code:
x264 --qp 0 -o <output> <input>
There is more info about the options here.
Groucho2004 is offline   Reply With Quote
Old 22nd November 2011, 02:14   #3  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
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.

Last edited by Keiyakusha; 22nd November 2011 at 02:19.
Keiyakusha is offline   Reply With Quote
Old 22nd November 2011, 02:33   #4  |  Link
gyth
Registered User
 
Join Date: Sep 2011
Posts: 86
Here is another set of option explanations.

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.
gyth is offline   Reply With Quote
Old 22nd November 2011, 02:38   #5  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by gyth View Post
Almost forgot about that. It's an excellent reference.
Groucho2004 is offline   Reply With Quote
Old 22nd November 2011, 02:48   #6  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by gyth View Post
crf 0 isn't lossless
it is.
Keiyakusha is offline   Reply With Quote
Old 22nd November 2011, 03:31   #7  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by Keiyakusha View Post
it is.
only in 8bit output, in >8bit crf goes negative.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 22nd November 2011, 06:33   #8  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,205
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.

Quote:
Originally Posted by Keiyakusha View Post
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?
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)
Thunderbolt8 is offline   Reply With Quote
Old 22nd November 2011, 08:03   #9  |  Link
vrpatilisl
Registered User
 
Join Date: Sep 2011
Posts: 144
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.
vrpatilisl is offline   Reply With Quote
Old 22nd November 2011, 08:56   #10  |  Link
Mr Alpha
Registered User
 
Join Date: Jul 2008
Posts: 75
Quote:
Originally Posted by Thunderbolt8 View Post
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.
Mr Alpha is offline   Reply With Quote
Old 22nd November 2011, 11:05   #11  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
Quote:
Originally Posted by Thunderbolt8 View Post
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.

Quote:
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.
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.
J_Darnley is offline   Reply With Quote
Old 22nd November 2011, 14:08   #12  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,205
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?
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)
Thunderbolt8 is offline   Reply With Quote
Old 28th November 2011, 19:36   #13  |  Link
infoeater
Registered User
 
Join Date: May 2007
Posts: 53
Quote:
Originally Posted by vrpatilisl View Post
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?

Last edited by infoeater; 29th November 2011 at 00:30.
infoeater is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.