Code:
Video stopped, number of skipped frames due to encoding lag: 2654/31289 (8.5%)
You're on the edge of being able to do it, change your Reference frames from 5 to 4 by entering the following text in the Custom x264 parameter section.
ref=4
For reference, Medium is 3, Slow is 5, 4 may help reduce encoding time just enough to not skip frames.
_______________________________________________________________________________
Before you try that though, set your PC up for to get the most out of it, if you just installed Windows 10 you're missing a lot of Ryzen tweaks.
Latest AMD AM4 Chipset Drivers -
https://www2.ati.com/drivers/amd_chipset_drivers_18.10_1018.exe
Set your Power Plan to Ryzen Balanced or High Performance
(There is a difference between the two, they change how XFR and PBO work on Ryzen chips.)
Ryzens have XFR and PBO to overclock the chips over base clock of 3.7GHz. XFR is the equivalent to Intels Turbo boost, PBO is like Nvidias GPU Boost, it overclocks core automatically past the normal XFR clock. PBO is the feature that allows you to reach 4.3GHz on single and low core loads.
There's settings in your BIOS that control how high and how many cores Precision Boost Overdrive will boost, on my ASUS board it's called Performance Enhancer - Levels 1-4.
Level 2 is max AMD limits, 3 and 4 push the settings past the limits, they require watercooling, overclocking tweaks and other fun stuff and may be unstable. Level 2 is generally safe.
Ryzen Balanced lets XFR/PBO do their thing, boost single/multiple cores beyond the normal "turbo levels" based on cooling and other factors.
High Performance will all core boost at all times but disables XFR2/PBO for single/low core load overclocking. Your max clock will most likely be 3.9 or 4.0 GHz on all cores.
Encoding is an all core task so
High Performance is probably best and you can ignore pretty much everything above, but you should do your research on XFR2/PBO, it is fairly new and information is mixed and they are crucial for getting the most out of your chip.
Hit Windows+i>Goto Gaming
Turn off Game Mode
Turn off Game Bar
Turn off Game Capture/DVR
In OBS>Settings>Advanced
Set the process priority to High
Set your YUV Color Matrix to 709
This section is so you don't spend cycles re-sampling your audio
OBS>Settings>Audio
48000 Hz
Windows Sound Devices/Playback and Recording
Set all of them to 48000 Hz under Properties>Advanced on each device.