View Full Version : please tell me the BARE MINIMUM settings for DXVA with the new x264
REDtoLINE
12th November 2009, 06:29
Now I understand according to rule #12, I'm not supposed to ask what the best settings are, and that's not necessarily what I'm asking. Basically, I downloaded MeGUI because I felt it was time to shrink the size of my blu-ray collection. I have almost filled up my 2x1TB hard drives, not to mention it would be nice to actually hard encode the .SUP files for movies with forced subtitles instead of using .SRT text subtitles (which would also allow me to decode with DXVA for those titles). The problem is, it appears that x264 has undergone some big updates lately, and MeGUI hasn't fully updated with these new settings. Plus, there are many settings that have been removed, which are giving me lots of errors when I try to use any advanced settings. Honestly, I don't care about using a GUI, the command line is fine, and honestly I'd actually prefer it because I hate installing useless programs.
So basically my problem is that I want to encode my 1080P blu-rays to around 50% of the original size and maintain DXVA compliance. I have downloaded the MeGUI profiles, but like I just said, many of the settings have changed, so these profiles appear useless. Can somebody please tell me the BARE MINIMUM settings for DXVA with the new x264, and then possibly suggest the proper settings to equal a profile around what I'm looking for. I prefer to get more quality at the sacrifice of encoding time but without really exceeding about 10 hours on my Core i7.
My plan is to encode the video with a CRF of 21 (I don't count this encode time towards the 10 hours because I'm going to throw it away) to get a good bitrate, then to use a 2 pass encode at that bitrate to get a more efficient and higher quality encode (these two passes should equal about 10 hours). So what extra settings (besides the DXVA bare minimum) would be good to squeeze out as much quality as possible in my 10 hour time frame?
Thanks for your time. ~Nick
Snowknight26
12th November 2009, 06:47
Having .srt subtitles doesn't stop DXVA from working.
Inspector.Gadget
12th November 2009, 06:50
1) DXVA works with softsubs in MPC-HC.
2) MeGUI profiles are busted. You can still set everything manually in the usual config window.
3) Use Rev. 1056, 1057 apparently has issues.
4) At CRF 21, I would be surprised if most Blu-ray content is noticeably improved by a second pass. Many people find CRF 18 completely indistinguishable from the original on a variety of sources.
5) Encoding time will vary based on the complexity of your AVS script, x264 settings used, and the characteristics of your source. You'll have to do this on a trial-and-error basis per source.
prOnorama
12th November 2009, 08:17
Bare minimum settings (well maybe not bare minimum, rather more like safe settings) for 1080p L.4.1 DXVA compatibility are:
--level 4.1
--ref 4 (or --ref 5 for 2.35:1 AR movies)
--partitions p8x8,b8x8,i4x4,i8x8 (but I think that's the default now so you don't have to specify it)
--vbv-bufsize 50000 --vbv-maxrate 62500
OK those are old settings I think the new weightp option does something to the ref frame count but I guess if you explicitly specify the # of ref frames it will stick to that (seems logical)
REDtoLINE
12th November 2009, 10:40
Having .srt subtitles doesn't stop DXVA from working.
The DXVA decoder must be directly connected to the video renderer, so the software must support overlaying. So when you use windows media center for everything, it's pretty difficult to get it to work with a custom renderer, and would probably cause problems anyway. Plus many blu-rays already come with forced subtitles encoded into the video, so what's the point in keeping the original video sources for the ones that have them in .SUP files?
1) DXVA works with softsubs in MPC-HC.
2) MeGUI profiles are busted. You can still set everything manually in the usual config window.
3) Use Rev. 1056, 1057 apparently has issues.
4) At CRF 21, I would be surprised if most Blu-ray content is noticeably improved by a second pass. Many people find CRF 18 completely indistinguishable from the original on a variety of sources.
5) Encoding time will vary based on the complexity of your AVS script, x264 settings used, and the characteristics of your source. You'll have to do this on a trial-and-error basis per source.
Those seem like very old revisions, because the x264.nl website currently has revision 1332. Also, I agree with you that CRF 21 is not noticeably better with a second pass. I was actually thinking of using CRF 23 instead to get the bitrate, and then do a 2 pass encoding. This would save even more space. After my initial tests on a 3 minute clip of Quantum of Solace, going from CRF 23 to a 2 pass of equal average bitrate seemed just a little bit better (i think it was a placebo affect though), and for the most part I couldn't notice any difference between that and the original. Finally, my AVS script doesn't contain anything. I was originally going to crop videos to 1920x816, which corresponds to the 2.35 AR listed on IMDB, but when I was playing with Quantum of Solace, it seemed that the video was 1920x800, which doesn't agree with the listed AR. So I decided to ignore cropping and not deal with it. Besides that, the only other thing I would do in AVS is use the SupTitle function for loading the .SUP files, which would only be on a few select titles. Also since I use --thread-input, AVS never seems to be slowing me down. I assumed x264.exe was the bottleneck for obvious reasons.
Bare minimum settings (well maybe not bare minimum, rather more like safe settings) for 1080p L.4.1 DXVA compatibility are:
--level 4.1
--ref 4 (or --ref 5 for 2.35:1 AR movies)
--partitions p8x8,b8x8,i4x4,i8x8 (but I think that's the default now so you don't have to specify it)
--vbv-bufsize 50000 --vbv-maxrate 62500
OK those are old settings I think the new weightp option does something to the ref frame count but I guess if you explicitly specify the # of ref frames it will stick to that (seems logical)
Since when is --vbv-maxrate 62500? I thought it was 50000? I saw someone have --weightb in their DXVA settings, and --8x8dct as well, which I have no idea what they mean, plus they are not even listed in the help.
nurbs
12th November 2009, 11:23
Those seem like very old revisions, because the x264.nl website currently has revision 1332.He is talking about 1056 version of megui, not x264.
I was actually thinking of using CRF 23 instead to get the bitrate, and then do a 2 pass encoding.At pretty much any sane CRF value quality will only be marginally better with a second pass and I doubt you would notice it. Most likely it seems to be better to you because you want it to be.
Finally, my AVS script doesn't contain anything. I was originally going to crop videos to 1920x816, which corresponds to the 2.35 AR listed on IMDB, but when I was playing with Quantum of Solace, it seemed that the video was 1920x800, which doesn't agree with the listed AR.There is no reason to encode the black bars unless you are aiming for blu-ray compatibility. If the area of the video that contains a picture is 1920x800 then that's the AR of the video regardless of what IMDB says.
Since when is --vbv-maxrate 62500? I thought it was 50000?
50000 for main profile, 62500 for high profile. You are encoding high profile.
I saw someone have --weightb in their DXVA settings, and --8x8dct as well, which I have no idea what they mean, plus they are not even listed in the help.
They are both on by default so there is no reason at all to put them in the command line. They were useful in older revisions of x264.
REDtoLINE
12th November 2009, 11:41
At pretty much any sane CRF value quality will only be marginally better with a second pass and I doubt you would notice it. Most likely it seems to be better to you because you want it to be.
Well I just see it as a 2 pass encoding being more efficient and giving more quality. When I tested CRF 25 and then did a 2 pass encoding at that bitrate, there was definitely a difference, so going from CRF to 2 pass is increasing quality for sure. Now I may not really notice a difference going from CRF 23 to a 2 pass in the small tests I am doing, but I cannot test every situation. I see it as an insurance policy to guarantee that quality is given more efficiently where needed while consuming the same amount of space. I guess I could just encode CRF 22 and call it a day, but I'm willing to put in the extra time to save the space. Although it might seem like a daunting task right now to do to all my movies, once I get it done, it's not like I am buying new movies on a daily basis.
50000 for main profile, 62500 for high profile. You are encoding high profile.
But --vbv-bufsize stays at 50000? The DXVA article on these forums that I read suggested --vbv-maxrate 50000 for the a high 4.1 level profile, were they just plain wrong?
nurbs
12th November 2009, 11:47
--vbv-bufsize is a guess most of the time. Generally people use the same bufsize as maxrate. I guess wikipedia (http://en.wikipedia.org/wiki/H264) list the correct maxrate for the levels and x264 will give you a warning if the specified maxrate exceeds the level limit. It doesn't really matter for you anyway since I doubt that with your encoding settings you are ever gonna get near it.
Chengbin
12th November 2009, 13:19
I highly, highly doubt 2 pass is better than CRF using the same settings and same file size.
Dark Shikari
12th November 2009, 13:43
Well I just see it as a 2 pass encoding being more efficient and giving more quality. When I tested CRF 25 and then did a 2 pass encoding at that bitrate, there was definitely a difference.Yes, the difference is that 2-pass wasted more time.
REDtoLINE
12th November 2009, 14:08
Well here is my big question then. Which do you think would produce better results? I could do my current idea of encoding with a CRF to obtain a good bitrate and then doing a two pass, using all default settings. Also, I could just do a single pass CRF with increased settings like --me umh --subme 9 --b-adapt 2 --direct auto --trellis 2 which should take about the same amount of time. (Dumb question: I know increasing me, subme, b-adapt, direct, and trellis usually produce a smaller filesize, but it also increases the quality, correct?)
Dark Shikari
12th November 2009, 14:22
Well here is my big question then. Which do you think would produce better results? I could do my current idea of encoding with a CRF to obtain a good bitrate and then doing a two passSure, if you like wasting time for no real benefit.
REDtoLINE
12th November 2009, 14:29
Sure, if you like wasting time for no real benefit.
That doesn't really answer either question. It doesn't tell me which method would produce better results, and it doesn't answer whether increasing those settings I listed increases quality as well. I understand you think I'm wasting my time, but I'm just going to encode a video when I go to sleep, so I can let it run for 8-10 hours no problem, so why not use all that time to get as much quality out of the encode as I can (and save space too)?
nurbs
12th November 2009, 14:34
Increasing the settings increases quality/bitrate.
Why don't you just keep your settings and decrease CRF by 0.1 and only do a one pass encode. You'll save a lot of time, the quality gain will be bigger than with running a second pass, filesize will only increase marginally and you won't have to worry about different settings giving you different bitrates in CRF mode.
Dark Shikari
12th November 2009, 14:40
That doesn't really answer either question. It doesn't tell me which method would produce better results, and it doesn't answer whether increasing those settings I listed increases quality as well. I understand you think I'm wasting my time, but I'm just going to encode a video when I go to sleep, so I can let it run for 8-10 hours no problem, so why not use all that time to get as much quality out of the encode as I can (and save space too)?I said "no real benefit". If you would use search, you would find that CRF and 2-pass at the same bitrate give roughly equivalent results.
LoRd_MuldeR
12th November 2009, 14:50
That doesn't really answer either question. It doesn't tell me which method would produce better results...
Neither produces "better" results. Both produce (almost) the same quality - at the same file size.
Only that with 2-Pass mode you know the final size in advance, while the final size is completely unpredictable with CRF mode. So if you need to hit a specific file size, then use 2-Pass mode. Otherwise use CRF mode with some CRF value that satisfies your quality needs (something around 22 should be a good starting point). The size will be as required to hit the desired quality level with the individual source clip. That means: With the same CRF value you may get files of different size for different sources (even if those sources have the same resolution, framerate and duration).
...and it doesn't answer whether increasing those settings I listed increases quality as well.
Of course "slower" options produce better quality at same file size -or- same quality at smaller file size. But that applies to both, 2-Pass and CRF mode.
However take care that using other settings (faster or slower, no matter), may also change the resulting total filesize in CRF mode at the same CRF value.
So be sure that you only (visually) compare files of identical total size!
And another hint: Instead of adjusting individual options, you should use the built-in "presets", unless you have a very good reason not to do so...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.