Sorry to hear you can't record. Error 22 can come up when the video encoder's back-end initialization fails. 

Try these possible solutions: 

Reinstalling video drivers, including Intel video drivers (even if you think they are OK, some key libraries may be missing):

If you have an Intel CPU, you should ensure that your Intel display drivers are up-to-date.

You can do that here: Intel Download Center


Additionally, make sure your video card drivers are up to date:

If you have an AMD video card: AMD Drivers and Support

If your video card is from Nvidia: NVidia Drivers and Downloads


 This error can happen when the video card is missing some important system component. Windows system file component check & repair can help:

If none of the above are helpful, please submit the logs as described in the following article:  

How to submit logs via the Feedback tool.