OBS Studio Tutorial for SA-MP

CrazyBob's Cops And Robbers game information, help, faqs and guides. If you need help with something in game, this is the place!
Post Reply
User avatar
Rashon
CnR Admin
Posts: 7014
Joined: Sun Aug 01, 2010 11:37 am
Gender: Male
Personal Saying: You can have all my shine, I'll give you the light
Location: Small square state of Connecticut
Contact:

OBS Studio Tutorial for SA-MP

Post by Rashon »

I made a topic like this in 2017 here but funny that a month or two later, an update with either OBS, Windows, or SA-MP happened and it completely broke everything. Meant to revise it back then but got lazy.

1. Download OBS Studio from here: https://obsproject.com/download

2. Should look something like this: Image

3. Next go to Settings at the bottom right and for Output Mode at the top, it shows, Simple. Change that to Advanced because we aren't bitches out here.
Image

4. Move down to Encoder and if you have a NVIDIA graphics card, you can and likely should switch to NVIDIA NVENC H.264 (new) encoding. I suppose if you have an AMD graphics card, there'll be something for it.
You might ask here 'this is where I'd use Shadowplay or ReLive.' Yeah, but you may one day have a specalized use case for OBS Studio rather than the others.

If you don't have a graphics card and use integrated graphics then you must use x264 which will likely tax your CPU and give you FPS drops. Conversely, if you have 6-8+ cores, then why not use x264 if it makes sense to you.
Image

5. Next you need to set your bitrate. The higher the bitrate, the more higher the file size will be. YouTube has bitrate recommendations where even if you upload a video with a huge bitrate, it will be compressed to this list when you view it there.
This is entirely your preference but I wouldn't record in anything below 20k bitrate.
ImageImage

6. Switch to the Audio tab and look for Desktop Audio under Devices and find the source SA-MP will be running under. Same goes for Mic/Auxillary Radio for your microphone. Once you do that and apply, you can also activate whether or not you want a Push-To-Talk with Enable Push-to-talk.
Image

7. Switch to the Video tab and there's where you enter your recording resolution and FPS. If your desktop and game resolution are different, then Base (Canvas) Resolution is your desktop resolution and Output (Scaled) Resolution is your game resolution and it should adjust itself when you see the picture.
Image

8. Switch to the Hotkeys tab and you can select a button to start and stop a recording. You can also scroll lower to make a push-to-talk button for your mouse.
Image
Image

9. Now you gotta get stuff on the screen so X out of all that and on the main screen on the bottom left under Scenes, click the + sign to add a scene.
Image

10. After you name a scene, click on the + sign under Sources and click Display Capture. Game Capture and Window Capture have not worked for SA-MP since 2017 for whatever reason and yes, Display Capture records whatever is on your screen at the current moment, like your desktop if it is showing. This is the determining factor of using Shadowplay instead unless you have a special use case.
Image

When you click it, a window pops up and you can Create new and name the Display Capture.
Image

Once the source is made, you can right click on it then on Properties, then the window on the right will show and you can pick whether or not to show your cursor incase for some weird reason, it shows when you don't want it to.
Image

11. Now it's simple, you go in-game, record for 5-10 seconds while there and end it. Alt-tab and check the folder where the video is saved and it should show your game.

There ya go, cocksucka. I'll make a double-post with a couple of advanced stuff in a bit.
Image
User avatar
Rashon
CnR Admin
Posts: 7014
Joined: Sun Aug 01, 2010 11:37 am
Gender: Male
Personal Saying: You can have all my shine, I'll give you the light
Location: Small square state of Connecticut
Contact:

Re: OBS Studio Tutorial for SA-MP

Post by Rashon »

1.2 Replay Buffer

In the Output tab over from the Recording tab, click on Replay Buffer and you can set the amount of seconds you want OBS to record your gameplay before it drops off.
For example here I have it set to 300 seconds which means it will always record the last 5 minutes of your gameplay from the current moment.
If your PC isn't that good, it may be resource intensive and as it shows, you'll need RAM reserved in order for it to be optimal.
Image

To turn on the Replay Buffer, on the main screen, click on Start Replay Buffer before you start playing.
Image

In order to make a recording of your last X minutes of gameplay, you have to make a hotkey for it so go under the Hotkey tab in Settings and assign a key to Save Replay under Replay Buffer.
Image

1.3 Audio Tracks

Let's say you're trying to make a video of a specific type but you're also in Discord and you got fogs talking and yourself talking which will impact how the video is edited. You got Audio Tracks for that.

Under the Output tab in Settings and under the Recordings tab, next to Audio Track, you can select how many Audio Tracks you want to have. The simplest way is just to have one but let's say you also have a microphone. I'd suggest checking boxes 1, 2, and 3 for 3 audio tracks. Again, assuming you've already gone into the Audio tab under Settings and set your audio and microphone.
Image

(Scenario for 3 Audio Tracks)
Now the tracks have to be differentiated. What I do is this:
Track 1: Both Desktop Audio and Mic
Track 2: Desktop Audio
Track 3: Mic

In order to do that, go to the main screen and click on one of the gears on either Desktop Audio or Mic/Aux and click on Advanced Audio Properties.
Image

When you do that, move over to tracks and as you can see, Track 1 has both checkmarks for Desktop Audio and Mic, Track 2 only has a checkmark for Mic, and Track 3 only has a checkmark for Desktop Audio.
If you have Sony Vegas for example, when you drop your video into it, you will see the video plus 3 audio tracks. You can remove them as you see fit from there.
Image
Image

(Scenario for 4 Audio Tracks)
This may be useful if you are talking in Discord and you don't want a certain audio source to display in your video without muting all of it. The problem is you are going to need two different audio sources (like a speaker AND headphones).
Here's an example of how it'd look and Desktop Audio (1) in this case are headphones and Desktop Audio 2 is a speaker.
Image

Open up Advanced Audio Properties again and it's shown as follows:
Track 1: Every Track Combined
Track 2: Mic Only
Track 3: Desktop Audio 1 (Only headphones)
Track 4: Desktop Audio 2 (Only speakers)

Next what you need to do is decide which audio you want to output to which device. San Andreas will always play through your Default Device unless you cast it with that other Windows 10 functionality. Here, it is set to play to my headphones.
Image

Then you can set the other audio source to play through your speakers on Discord.
Image
Image
User avatar
MessedUpSmiley
CnR Admin
Posts: 3032
Joined: Mon Apr 22, 2013 9:39 am
Gender: Male
Personal Saying: I'm secretly a robot.
Location: The Netherlands

Re: OBS Studio Tutorial for SA-MP

Post by MessedUpSmiley »

Nice guide Rashon, I remember using your old one before AMD Radeon recording stuff and ReLive was a thing.
Something you could cover in the 'advanced stuff'; the replay buffer - it might save a lot of people - who tend to record their whole game-weeks - unnecessary disk space, as they could just save the buffer when something has happened instead of just recording the whole week.
With Regards,
MessedUpSmiley
User avatar
Rashon
CnR Admin
Posts: 7014
Joined: Sun Aug 01, 2010 11:37 am
Gender: Male
Personal Saying: You can have all my shine, I'll give you the light
Location: Small square state of Connecticut
Contact:

Re: OBS Studio Tutorial for SA-MP

Post by Rashon »

MessedUpSmiley wrote: Tue Apr 14, 2020 3:36 am Nice guide Rashon, I remember using your old one before AMD Radeon recording stuff and ReLive was a thing.
Something you could cover in the 'advanced stuff'; the replay buffer - it might save a lot of people - who tend to record their whole game-weeks - unnecessary disk space, as they could just save the buffer when something has happened instead of just recording the whole week.
Yeah, that's the first thing I was gonna do.
Image
User avatar
codeshadow
CnR Admin
Posts: 403
Joined: Fri Jul 18, 2014 12:39 am
Gender: Male
Location: New York

Re: OBS Studio Tutorial for SA-MP

Post by codeshadow »

Thank you for the detailed guide.
Image
Generate your signature here: https://www.cbcnrapp.xyz/
User avatar
Pure
Sergeant
Posts: 162
Joined: Wed Aug 11, 2010 11:24 pm
Gender: Male
Personal Saying: wake and bake
Location: USA, TN

Re: OBS Studio Tutorial for SA-MP

Post by Pure »

Awesome! Thanks Rashon for solving my audio issue!
Image
Post Reply