if you plan to discuss this with me please do so under this thread located here:
https://obsproject.com/forum/thread...fection-suggestions.121717/page-2#post-458408
I duplicated my post there as well. so it can be tracked there.
It has taken me 9 months of testing to get to those settings, and they are specific to each PC/iuse case. I will be happy to assist if you find yourself in need.
I can give you a few pointers. The goal I had was squeezing 1080p@60fps fast motion content into 6000kbps so it looked good as possible. I can tell you no matter how much CPU you have at some point you play a balancing game between encoder lag/dropped render frames and quality.
Here are the settings that matter most on fast motion content. I will explain my understanding of each. and their encoder speed impact. when testing these if you start your stream and get immediate dropped encoder or render frames you set them too high. and you need to back them off as even if it stops immediately after initial drop during your stream you WILL get encoder overload.
My current x264 options separated by spaces.
threads=21
b_adapt=1
direct-pred=temporal
me=tesa
trellis=2
bframes=16
ref=1
subme=5
analyse=all
rc-lookahead=120
me_range=16
aq-mode=3
partitions=all
Explanation:
threads=21
(1-32) you can go higher, but don't... get this as low as possible. preferably equal to the number of real CPU cores you have for best quality. If you raise the other settings below and start to get encoder dropped frames raising this can thwart that in some cases.
b_adapt=1
(values are 1 or 2) two being newer and significantly slower. two is not necessary. yet preferred. if you use bframes greater than two, the speed decrease significantly and I mean SIGNIFICANTLY. so I leave it at 1. I prefer more brames at 16 for better bitrate compression and overall quality gains. badapt two and brames >3 will give your CPU a heart attack.
direct-pred=temporal
(spatial or temporal) spatial is perfectly fine. temporal is better looking and searches a more complex pattern for motion vectors
temporal has a quite significant speed impact dependent on other settings. leave this at spatial, get the other settings as high as possible and if temporal then works use it.. otherwise use spatial. the quality gain using temporal is almost insignificant.
me=tesa
(dia, hex, umh, esa, tesa) do not use dia or esa. if you are going to use esa you might as well use tesa. this setting is the most impact in my opinion of fast moving content. tesa is the best you can get, and dropping to umh has a significant impact on quality during fast motion. so set this to tesa and then raise everything else after.
trellis=2
(0, 1, or 2) zero is off, one is ok, and 2 is superb. speed impact is little. it helps to use 2 so that you get better bitrate usage about 5-10% savings overall on the video as a whole. so you get better quality out of less bitrate, say the 6000 preferred.
bframes=16
(0-50) but you can go higher. these help with video quality. do not go too high as playback issues for viewers may arise. 16 is great. you can test up to around 30 IMO. you will read they have a significant impact on bitrate usage. but the quality gain is immense. B frames look great. IMO using 6000kbps you have plenty of headroom for bframes. use them!
ref=1
Reference frames are tough. they take A LOT of cpu to process. I use 1, as I have found they are simply not necessary in my use case. (fast motion looking good). obviously for recording you want higher, and higher is better. but the speed impact going from 1 to 2 is HUGE. especially using me=tesa from above. leave this at 1. if you get the other settings where you want them and can raise it, do it.. but your CPU will have a heart attack as will dropped encoder frames. this one settings is why most people cannot encode using the slow preset but can do medium. hell most people can use placebo as long as they make ref=1...
subme=5
(0-11) you wont read about 11 anywhere. 10 is insane. 8-9 is preferred but very CPU intensive/ 6-7 is superb. 5 is premium and a great overall look. 4 is perfectly fine. I started with 4. perfected everything then moved to 5 in the end. but again. 4 looks wonderful! and the speed at 4 is superb. moving to 5 has a significant speed impact and may cause dropped frames.
analyse=all
This setting seems to smooth the content overall. I have found very little information about this setting. if you find something let me know. I leave it on "all" but you can remove this one if you feel the need.
rc-lookahead=120
(0-240) if you stream at 60fps, then 120 lookahead is two seconds worth of forward seeking for frame type determination. 120 @60fps is IMO preferred. 240 is outrageous. 60 is sufficient in most cases. speed impact is negligible, but quality is affected at lower than FPS out numbers.
me_range=16
(0-???) this has a significant impact on speed but is the depth of motion vector search when using me>= umh, esa, or tesa. this is locked at 16 using hex and cannot be raised higher. significant impact on fast motion smoothness. I use 16. 24 is top dog, but SIGNIFICANTLY slower.
aq-mode=3
(0, 1, 2, or 3) 3 is preferred. and is what you should use for visual perception quality.
- 0: Do not use AQ at all.
- 1: Allow AQ to redistribute bits within each frame.
- 2: Allow AQ to redistribute bits across the whole video.
- 3: Auto-variance AQ with bias to dark scenes.
partitions=all
allows the usage of all partition sizes of macroblocks. all is best, or default setting of slow-placebo will also work just fine. slightly less fast and slightly better quality, just a tad.. and I mean a tad.
resources:
en.wikibooks.org