Language
For players4 min read

Clips with OBS

When one of your chosen moments happens, Anvil saves the last few seconds from OBS and posts the video to Discord. This page sets it up, on one client or on several.

OBS 28 or newer has everything built inSource Record only if you play on more than one clientPosts to your clan’s clips channel or your own webhook
Step 1

What a clip is

#

OBS can keep the last few seconds of what it records in its Replay Buffer. When one of your chosen moments happens (a pet, a notable drop, a level and so on), or you press your clip hotkey, the Anvil plugin tells OBS to save that buffer. Anvil then posts the video to your clan’s clips channel, or to your own webhook.

Turn it on in Settings → Posts & alerts → Clips and tick the moments you want. With Share my clips with my clan on, clips go to your clan’s clips channel when it has one. Otherwise they go to your own webhooks that take clips. With neither, they stay on your computer.

Step 2

Set up OBS

#

You need OBS Studio 28 or newer, on the same computer as RuneLite. The WebSocket server Anvil talks to is built in.

  1. In OBS, open Tools → WebSocket Server Settings. Tick Enable WebSocket server. Leave Server Port on 4455, tick Enable Authentication and set a password. Press OK.
  2. In RuneLite, open the Anvil plugin’s settings and the Clips (OBS) section. Put the same port and password in OBS port and OBS password. OBS host is localhost, or this computer’s own network address. OBS on a different computer can’t be used, because the plugin has to read the saved clip file.
  3. Back in OBS, open Settings → Output and tick Enable Replay Buffer (in Advanced mode it has its own Replay Buffer tab). 30 seconds is a good Maximum Replay Time. Press OK.
  4. Make sure your scene shows the game, for example a Window Capture or Game Capture of RuneLite.

That is it. When Anvil connects to OBS it starts the replay buffer for you. Want to clip by hand too? Set Clip hotkey in the same Clips (OBS) section. It clips the last few seconds whenever Clips is on in your settings.

Step 3

Playing on more than one client

#

OBS records one picture. If you play two clients, a clip from one of them could show the other.

The fix is Source Record, a free OBS plugin by Exeldro (how to install it). Install it, then turn on I play on more than one client in the same Clips settings. Anvil adds an Anvil clips Source Record filter to each RuneLite window’s capture, with its replay buffer on and recording off, so each client clips its own window.

One capture per clienteach client needs its own Window Capture in OBS, pointed at its own window.
The window titleeach window has to show RuneLite - your name in its title, which is what RuneLite does by default. That is how Anvil finds the right capture.
On WindowsAnvil adds the captures for you. If OBS has no capture of a client’s window, Anvil makes a scene called Anvil captures with a Window Capture named Anvil your name for that client. You never need to show that scene.
On Linux and macOSadd the captures yourself, the same way: make a scene you never switch to, and put one Window Capture per client in it. Source Record keeps recording them even though that scene isn’t live, so your stream layout stays as it is.
Where clips are savedper-client clips go to .runelite/plugin-data/anvil/clips/<character name>/ in your user folder: C:\Users\<you>\.runelite\… on Windows, /Users/<you>/.runelite/… on macOS and /home/<you>/.runelite/… on Linux. Anvil sets this on the Anvil clips filter every time it connects, so it is right on every computer. Clips older than 7 days are deleted from there automatically. With one client, clips go to OBS’s own recording folder.
Without Source Recorda client only clips while its window is on screen in OBS.
Step 4

Installing Source Record

#

Download it from the Source Record page on the OBS forum or from its GitHub releases. Close OBS first, then pick the file for your system.

Windowsrun source-record-…-windows-installer.exe and follow it. Or unzip source-record-…-windows.zip and copy its folders into your OBS folder, usually C:\Program Files\obs-studio\, merging them with what is there. If OBS says the plugin failed to load, install the latest Microsoft Visual C++ Redistributable.
macOSopen the .pkg and follow it. macos-universal works on every Mac. There are also macos-arm64 (Apple Silicon) and macos-x86_64 (Intel) builds.
Linuxextract source-record-…-ubuntu-22.04.tar.gz into ~/.config/obs-studio/plugins/ (make the folder if it is not there). You should end up with ~/.config/obs-studio/plugins/source-record/bin/64bit/source-record.so. No sudo needed.
Linux, OBS as a FlatpakSource Record is on Flathub as an OBS add-on. Run flatpak install flathub com.obsproject.Studio.Plugin.SourceRecord.

Then start OBS again. Right-click any source, open Filters and press +: Source Record is in the list.

Match your OBS version

Each Source Record update is built for a range of OBS versions, and the forum page says which. Keep both up to date. If OBS won’t start after you install it, or Source Record is missing from the list, the build doesn’t match your OBS.

Step 5

When the plugin warns you

#

When clips can’t work, the plugin shows a short line in the game. Here is what each one means.

Anvil clips: set the OBS host in RuneLite (Anvil, Clips (OBS))OBS host is empty in the Anvil plugin’s Clips (OBS) settings. Put localhost there, or this computer’s own network address.
Anvil clips: OBS isn't reachableOBS isn’t running, its WebSocket server is off, or the port in Clips (OBS) doesn’t match. Check Tools → WebSocket Server Settings in OBS.
Anvil clips: OBS replay buffer is offthe replay buffer isn’t running. Press Start Replay Buffer under Controls in OBS. Anvil starts it when it connects, but if you stop it yourself it stays stopped.
Anvil clips: turn on Replay Buffer in OBS (Settings, Output)Anvil tried to start the replay buffer and OBS said no because it isn’t enabled. Tick Enable Replay Buffer under Settings → Output.
Anvil clips: OBS refused the passwordthe password in RuneLite isn’t the one OBS has. Show Connect Info in OBS’s WebSocket settings shows it, so copy it from there.
Anvil clips: OBS has a password, put it in RuneLite (Anvil, Clips (OBS))OBS’s WebSocket server needs a password and OBS password in RuneLite is empty. In OBS, open Tools → WebSocket Server Settings, press Show Connect Info, and copy the password into RuneLite.
Anvil clips: install Source Record in OBS for per-client clipsI play on more than one client is on, but OBS doesn’t have Source Record. Install it and restart OBS, or turn the switch off.
Big clips

Discord takes files up to 10 MB. A bigger clip is cut down to the moment and shrunk automatically before it posts.

Installing the plugin itself is in the player setup guide. Your other post switches are in Settings, page by page.

Stuck, or something looks wrong? Ask in the Anvil support Discord