If you get an encoder error in OBS, all you need to do is select a different encoder. To do the same, open OBS and go to its Settings. go to Output and then change Encoder to Quicksync (QSV) or Software(x264) or some other x264 encoder. This will do the job for you.