Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The OBS Replay Buffer
#1
The OBS replay buffer is a method of recording in OBS where instead of recording to a file on disk, you run a continuous recording to memory, and have a hotkey to dump that recording to disk at any time. This is extremely useful, since instead of recording hours and hours of footage, you can use replay buffer to keep, say, 600 seconds of video in memory at all times, and if something happened that you want to save as a recording, you can dump that 600 seconds into a file on disk.

Recording Settings

(these steps aren't in any particular order)

To use the replay buffer, you need to go to the output tab and set the output mode to advanced in the top. Replay buffer isn't enabled in simple mode.

Set your recording format to mkv (mp4 also works fine, but is less robust against crashes or problems with saving the recording), and if you have an NVIDIA GTX or RTX graphics card, set the encoder to NVENC. If you have both the NVENC and the NVENC (new) option, use the new option. The NVENC encoder uses the video encoder that is integrated into almost all GTX graphics cards or any RTX graphics card to process video instead of using a large chunk of the CPU, meaning that framerate is not affected nearly as much. If you do not have a GTX or RTX card, use x264. Next, you can follow this guide to dial in settings for recording under the rate control section. The left side is for NVENC, the right side is for x264. I recommend loading up a map and testing your recording settings by moving and jumping around for a few seconds, then watching it back. If your recording is blurry and blocky, increase the bitrate by a couple thousand if you're using NVENC, or if you're using x264 increase either the CPU usage preset or bitrate.

Make sure you adjusted these settings on the Recording tab and not the Streaming tab. In advanced mode, they look exactly the same.

To set the resolution and framerate, move to the video tab. The canvas resolution should be the screen resolution of your monitor, and the scaled resolution should be whatever resolution you want the recorded video to be. 1280x720 works perfectly without making a giant file. The downscale filter works fine on either 16 or 36 samples, but 36 samples may use more computer resources. Unless you have a good computer, disk space to spare and absolutely love 60 fps, leaving the framerate at 30 fps is fine. I record at 60 because 60 looks awesome.

You want to add a scene in OBS and use the "Game Capture" to capture only Garry's Mod. Do not use "Display Capture", because capturing the entire display will load your CPU/GPU a lot more than Game Capture.

Configuring Replay Buffer

The more seconds you want to record to replay buffer, the more memory OBS will use to store the video.

To enable the replay buffer, go to the output tab, then the replay buffer tab. Click enable replay buffer, and set the number of seconds you want to record for. Next, you need to set a hotkey to dump your recording in the hotkeys tab. The hotkey is called "Save Replay". Insert is the key I use because nothing elseuses insert.

For players that want to save funny clips, I recommend at least a 60 second replay buffer. I personally would be more comfortable with a 150 second replay buffer (2.5 minutes). For staff members, I would recommend a longer replay buffer of 300-600 seconds (5-10 minutes). For recording players for evidence, I have a million gigabytes of RAM, so I do a replay buffer of 1200 seconds (20 minutes) "just in case™."

If you're running out of memory, you either need to decrease your recording bitrate, decrease your recording resolution, or decrease the number of seconds on your replay buffer. Windows will constantly try to move memory that isn't actively being used to your hard drive, such as a Google Chrome tab you haven't opened in the last 3 hours. If you notice that your computer is using 50% of memory and you only have 4GB free and don't think that will be enough, don't worry, because as soon as OBS starts eating memory for recording, Windows will try to make space in memory for it. You most likely won't run out very easily.

Remux MKV Recordings

MKV is used as opposed to MP4 because if you're recording using MP4 and OBS crashes, or the file fails to write completely for whatever reason, the entire recording is gone. The only downside to this is that many video editing programs don't support MKV files. Luckily, OBS has a built in method to convert between MKV and MP4, and unlike a complete rerender, takes almost no time at all.

To remux a recording, go to File > Remux Recordings. Here, you can select a recording, or multiple recordings, to convert to MP4. When you select them, just press remux, and it should complete fairly quickly. The remuxed MP4 files are saved to your recording folder. To differentiate between the old MKV files and the new MP4 files, I recommend using Windows Explorer to sort by file type.

Shrinking Files with Rerendering

If you're struggling with large files being uploaded to YouTube, or have a video editor that doesn't like what OBS Remux spits out, you can use a tool called Handbrake to rerender files in h264 MP4 files, which basically anything can use. It has a ton of presets, I personally use Fast 720p for uploading to YouTube. Files that get spat out by this thing are usually compressed very efficiently.

Note that Handbrake sometimes likes to export files as .M4V files instead of .MP4 files. They're the exact same file, and you can just change the extension.

Using a Second GPU for NVENC

If you have a second GTX GPU installed in your system, you can use it specifically for video recording, and keep your main graphics card free for playing games. To do this, go to the output tab, move to the recording tab, and change the "GPU" box from 0 to 1. You can use the task manager to verify that your second GPU is actually being used for recording. The nice thing about doing this is that the graphics card you use for this doesn't have to be particularly powerful. In my case, I upgraded to a GTX 1660 Super, and I have my old GTX 1050 Ti plugged in below it. The 1050 Ti is only at 25% capacity while recording, while the primary GPU is completely free to run games.

..

I know there's a ton of guides on this already, but I've been battling with OBS for probably four years now, and I'd figure I'd share what works for me and hopefully some useful information. This was written in about 45 minutes at 3AM, so if there are typos or some weird grammar.. oops I guess.

If you need any help getting this working, feel free to contact me through the Discord or forum PM
[Image: horizontal-design-element-3.png]
  Angel I CRAHSED MY CAR
find out more at https://russefarmer.com/
Garry's Mod Performance Tuning Guide
#2
godspeed, gonna set this up when its not 4am
#3
Figured I'd bump this up after I saw someone complaining about audio desync issues, audio desync is a problem for a lot of people.. I don't have time to condense down the fixes into something a bit better because I'd like to sleep soon, but here are some support threads and snippets:

Main fix: Uncheck use device timestamps under your Microphone properties in OBS
[Image: unknown.png]

Configure audio sampling rates https://streamershaven.blog/stream-tutor...es-in-obs/

Sync audio with webcam footage manually (doesn't fix gameplay audio desyncs) https://www.youtube.com/watch?v=KTrS5l0zKQg
[Image: horizontal-design-element-3.png]
  Angel I CRAHSED MY CAR
find out more at https://russefarmer.com/
Garry's Mod Performance Tuning Guide


Forum Jump:


Users browsing this thread: 1 Guest(s)

About Us
    This is Dinkleberg's GMod, a gaming community based in Garry's Mod. We have a Trouble in Terrorist Town, Prop Hunt, Murder, and Deathrun Server. Come check them out sometime.