View Full Version : x264 settings for 1080p
Razorholt
22nd January 2008, 17:49
Hi All,
I'm trying to encode 1080p videos to play on my 3Ghz PC. Like most people I was experiencing shoppiness until I came up with that setting:
--pass 2 --bitrate 2950 --stats ".stats" --keyint 14 --min-keyint 2 --deadzone-inter 10
--deadzone-intra 6 --ref 3 --mixed-refs --no-fast-pskip --bframes 2 --b-rdo --direct auto
--nf --subme 6 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.25
--vbv-bufsize 14745 --vbv-maxrate 20000 --vbv-init 1.0 --ratetol 2.0 --qcomp 0.75
--me umh --threads 3 --thread-input --progress --no-dct-decimate --no-psnr
--no-ssim --output "output" "input" --aq-strength 1.0 --mvrange 511
Is there any room for improvement?
Thanks,
-Dan
CruNcher
22nd January 2008, 18:14
--deadzone-inter 10
--deadzone-intra 6
this can end bad for overall qualitiy (it can go exactly in the different direction you wan't to achive with lower settings, especialy for low bitrate), at least it costs alot of QP steps more then 3 most probably for alot of scenes, less compression is what you forceing with it but you compensate it a little with --subme 6 so the loss gets smaller, but im still not sure myself if this is sooo bad and in wich situations it is and in wich not (Visually). I wish we would have an Adaptive aproach like used in VC-1 finaly to not take care of this anymore (i think a good estimation for now is the higher the bitrate target the lower the deadzones) and if you go ultra low bitrate what you doing @ 1080p 3 Mbit this low values could have side effects on the overall quality and 2 pass won't even help to compensate this then anymore :D
Dark Shikari
22nd January 2008, 18:15
Hi All,
I'm trying to encode 1080p videos to play on my 3Ghz PC. Like most people I was experiencing shoppiness until I came up with that setting:
--pass 2 --bitrate 2950 --stats ".stats" --keyint 14 --min-keyint 2 --deadzone-inter 10
--deadzone-intra 6 --ref 3 --mixed-refs --no-fast-pskip --bframes 2 --b-rdo --direct auto
--nf --subme 6 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.25
--vbv-bufsize 14745 --vbv-maxrate 20000 --vbv-init 1.0 --ratetol 2.0 --qcomp 0.75
--me umh --threads 3 --thread-input --progress --no-dct-decimate --no-psnr
--no-ssim --output "output" "input" --aq-strength 1.0 --mvrange 511
Is there any room for improvement?
Thanks,
-Dan1. MVrange is unnecessary, as 511.75 is the default.
2. Keyint 14 is going to waste a lot of bitrate.
akupenguin
22nd January 2008, 18:18
--nf is very bad for quality. The only possible justification would be if your pc is too slow to decode the video otherwise, and even then I'd reduce resolution instead.
CruNcher
22nd January 2008, 18:26
--nf is very bad for quality. The only possible justification would be if your pc is too slow to decode the video otherwise, and even then I'd reduce resolution instead.
yeah even if the entropy of the source is low enough you should at least use some sane low setting instead of no deblocking at all like -1,-1 or -2,-2 can allready help in getting a better compression factor without a big loss in sharpness (but a win in overall detail preservation) and especialy very low encoding speed loss and also this lower setting is allready less decoding complex :)
1. MVrange is unnecessary, as 511.75 is the default.
2. Keyint 14 is going to waste a lot of bitrate.
if you look @ his settings it's clear for me that he want's to stay HD-DVD compatible and then he has no other chance then 14 (for 23.976)
Razorholt
22nd January 2008, 18:51
1. When I enable deblocking the video gets laggy - on a slow 3Ghz PC.
2. Should I keep the default deadzone?
3. What's the recommended value for Keyint?
Thanks all,
- Dan
CruNcher
22nd January 2008, 18:58
1. When I enable deblocking the video gets laggy - on a slow 3Ghz PC.
2. Should I keep the default deadzone?
3. What's the recommended value for Keyint?
Thanks all,
- Dan
1. Try to use CoreAVC it has faster deblocking then libavcodec (or maybe it's time to invest in some cheap hardware decoding?)
2. I can't answer that im sure it's situation specific, but changeing it to much can hurt more then help so yes Alex_ thought something when deciding for this settings they are balanced for most situations.
3. The standard is fine for most intentions, but not if you have a special target like Blu-Ray or HD-DVD compatibility.
Razorholt
22nd January 2008, 19:17
How about p4x4? Is it a matter of taste of is it crucial here?
Sagekilla
22nd January 2008, 19:39
Personally, I don't know if p4x4 needs to be disabled to ensure compatibility. But, I don't use it because I see very little improvement (PSNR, bitrate, SSIM) and it ends up slowing the encoding more. I don't use it because I don't think the PS3 will let you playback a file with it enabled. I'm not 100% sure on that though.
Dark Shikari
22nd January 2008, 19:54
p4x4 will not affect compatibility, but its generally useless except at pretty high bitrates (and lower resolutions, also).
For a sample of 1080p that I encoded at 5 megabits, see this link (http://mirror05.x264.nl/Dark/force.php?file=./PlanetEarthSample.mkv). I used my AQ at static sensitivity 20.
Sharktooth
22nd January 2008, 22:19
p4x4 actually hurts quality at higher res...
Dark Shikari
22nd January 2008, 22:23
p4x4 actually hurts quality at higher res...I've never noticed such a thing... remember, x264 will not make a decision unless it improves objective quality.
Atak_Snajpera
22nd January 2008, 23:50
Does anybody know why above certain level p4x4 is not allowed?
Dark Shikari
22nd January 2008, 23:57
Does anybody know why above certain level p4x4 is not allowed?In the standard, its actually the "maximum number of motion vectors per two consecutive macroblocks," which isn't set for up to Level 2.2, and is 32 for Level 3, and 16 for all higher levels. I have yet to figure out exactly why they made this decision.
I don't know anything that actually obeys this restriction.
Sagittaire
23rd January 2008, 01:15
If you want HDDVD NTSC profil compatibility (and hardware decoding) use this profil:
x264.exe --threads 3 --thread-input --keyint 14 --min-keyint 2 --vbv-maxrate 24000 --vbv-bufsize 14745 --mvrange 511 --level 4.1 --bframe 1 --bime --weightb --ref 3 --mixed-refs --direct auto --deblock -1:-1 --crf 22 --stats "x264_stat.log" --qcomp 0.50 --ipratio 1.10 --pbratio 1.10 --partitions "all" --8x8dct --me "umh" --subme 7 --trellis 0 --deadzone-intra 6 --deadzone-inter 6 --no-fast-pskip --no-dct-decimate --aud --nal-hrd --pulldown 32 --sar 1:1 --cqmfile Sagittaire.cfg --aq-strength 0.25 --aq-sensitivity 0 --progress -o 1080p_3.h264 test2.avs
I use x264 with particular patch for compatibility:
patch < x264_hrd_pulldown.04.diff -p0
for hrd flag
patch < x264_2pass_vbv.3.diff -p0
for better vbv compliancy
patch < AQ_RDRC_0.45.diff -p0
I test this new AQ from Dark Shikary
I use x264 with particular setting:
--threads 3 --thread-input
High speed with c2d
--keyint 14 --min-keyint 2
compatibility with scenarist
--vbv-maxrate 24000 --vbv-bufsize 14745 --qcomp 0.50
better vbv compliancy
--ipratio 1.10 --pbratio 1.10
default value for Iframe is too high for short GOP at 14 and I choose low ratio with rdo drop for high quality bframe (good for grain retention).
survivant001
23rd January 2008, 02:27
@Sagittaire
can you post your x264.exe I'll test it for scenarist. I have one particular movie that I'm unable to get it to work in Encore CS3 and Scenarist.
I'll try your command line.. hope that will work.. :) Bien hate de l'avoir la solution pour ce film.. il n'est pas facile :)
Razorholt
23rd January 2008, 06:18
@Sagittaire: seems to be working quite well on my slow 3Ghz dell machine :) btw, can you give us access to your secret build with --pulldown ?
Thanks,
- Dan
Sagittaire
23rd January 2008, 08:43
x264 build 721
http://jfl1974.free.fr/upload/x264_HDDVD_BD.rar
Patch:
AQ_RDRC_0.45.diff
x264_hrd_pulldown.04.diff
x264_2pass_vbv.3.diff
Sharktooth
23rd January 2008, 14:16
who did that build? AFAIK AQ and HRD patches cant be applied together withouth some handwork.
Sagittaire
23rd January 2008, 22:44
who did that build? AFAIK AQ and HRD patches cant be applied together withouth some handwork.
Well I make this build and ES mux correctly with scenarist ... ?
survivant001
23rd January 2008, 23:56
thanbks for the build. can you add me to your list when you will release a new build :)
Sharktooth
24th January 2008, 14:31
Well I make this build and ES mux correctly with scenarist ... ?
did you modify the patches? (however D_S released a new VAQ patch - 0.46)
Dark Shikari
24th January 2008, 18:27
did you modify the patches? (however D_S released a new VAQ patch - 0.46)Yes, this patch should be much simpler (no RCRD) and so should be much easier to use.
Razorholt
25th January 2008, 05:05
@Sagittaire: Can you pls release a new build with DS 0.47 update?
Thanks,
-Dan
Atak_Snajpera
25th January 2008, 12:19
http://forum.doom9.org/showthread.php?p=1091535#post1091535
Razorholt
25th January 2008, 13:43
I meant a new build with x264_hrd_pulldown.04.diff and x264_2pass_vbv.3.diff patches.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.