1. Run OBS as Administrator. Right click on the OBS shortcut, properties, advanced, check box, ok, apply, ok.
2. Custom FFMPEG output is in use. Only absolute professionals should use this. If you got your settings from a YouTube video advertising "Absolute best OBS settings" then we recommend using one of the presets in Simple output mode instead. Does this error happen if you use QSV/Quick Sync?
3. Only use Display Capture if you need to capture Windows stuff such as the Start menu or desktop.
4. Your GPU is maxed out and OBS can't render scenes fast enough. Are you playing a game?