First you need to install ffmpeg.
Open up terminal window CTRL + T
and type in the following command:
sudo apt-get install ffmpeg
Then you need to add OBS repository for Ubuntu:
sudo add-apt-repository ppa:obsproject/obs-studio
Then you need to update software packages:
sudo apt-get update
Then you need to install OBS:
sudo apt-get install obs-studio
When running the command sudo, be sure to type in your password.
Be safe by not running unknown commands from the web.