Obs config

From damionrashford/media-os · View interactive version

Obs config is an AI agent skill from the GitHub repository damionrashford/media-os. Install and configure OBS Studio programmatically: install via brew cask / winget / Flatpak / apt, author profiles (basic.ini, streamEncoder.json, recordEncoder.json), author scene collections (scenes JSON), manage global.ini, set defaults for encoder / output / audio / hotkeys, cross-platform confi

How to use this skill

Skill file

obs-config

Context: $ARGUMENTS

Install OBS Studio and author its on-disk configuration (profiles, scene collections, encoder JSON, global.ini, service.json) without touching the GUI. Everything lives in a single per-user config directory whose location differs per OS — get that wrong and OBS will silently create a blank second install.

Quick start

When to use

Do NOT use this skill to remote-control a running OBS — that is obs-websocket. Do NOT use it to write a Python/Lua script that runs inside OBS — that is obs-scripting. Do NOT use it to build a compiled C++ plugin — that is obs-plugins.

Step 1 — Install OBS per platform

Run the right installer for your OS. scripts/obsconfig.py install --platform auto will pick and print the command (use --dry-run first).

Step 2 — Locate the config dir

OBS uses ONE per-user config root. Everything else is relative to it.

| Platform | Path |

|----------|------|

| macOS | ~/Library/Application Support/obs-studio/ |

| Linux (native) | ~/.config/obs-studio/ |

| Linux (Flatpak) | ~/.var/app/com.obsproject.Studio/config/obs-studio/ |

| Windows | %APPDATA%\obs-studio\ (i.e. C:\Users\<you>\AppData\Roaming\obs-studio\) |

Layout inside it:

<CONFIG_DIR>/
  global.ini                        # last-used profile, collection, version
  basic/
    profiles/
      <ProfileName>/
        basic.ini                   # video/output/audio settings
        streamEncoder.json          # encoder-specific JSON for streaming
        recordEncoder.json          # encoder-specific JSON for recording
        service.json                # streaming service (Twitch/YouTube/custom)
    scenes/
      <SceneCollection>.json        # scene graph, sources, transitions
  plugin_config/<plugin_id>/...     # per-plugin JSON/INI
  logs/                             # rolling logs (last ~10 sessions)
  crashes/                          # crash dumps

<ProfileName> is a directory; <SceneCollection>.json is a single file whose basename equals the collection's display name. DO NOT hardcode ~/.config/obs-studio on macOS — that path does not exist there and OBS will not read from it.

Step 3 — Create/edit a profile

A profile is a directory under basic/profiles/. At minimum it needs basic.ini.

[General]
Name=Streaming

[Video]
BaseCX=1920
BaseCY=1080
OutputCX=1920
OutputCY=1080
FPSType=0
FPSCommon=60

[Output]
Mode=Advanced
RecFilePath=~/Videos
RecFormat2=mkv
RecEncoder=obs_x264
StreamEncoder=obs_x264

[SimpleOutput]
VBitrate=6000
ABitrate=160
RecQuality=Stream

[AdvOut]
TrackIndex=1
RecType=Standard
RecTracks=1

[Audio]
SampleRate=48000
ChannelSetup=Stereo

Encoder-specific settings live as JSON siblings (NOT inside basic.ini):

// streamEncoder.json — for obs_x264
{
  "bitrate": 6000,
  "keyint_sec": 2,
  "preset": "veryfast",
  "profile": "high",
  "rate_control": "CBR",
  "tune": "zerolatency",
  "x264opts": ""
}

NVENC / QSV / VideoToolbox use different keys — see references/config.md.

Service (streaming destination) lives in service.json alongside basic.ini:

{
  "type": "rtmp_custom",
  "settings": {
    "server": "rtmp://live.example.com/app",
    "key": "STREAM-KEY-HERE",
    "use_auth": false
  }
}

For built-in services use "type": "rtmp_common" with {"service":"Twitch","server":"auto","key":"live_..."}.

Step 4 — Create/edit a scene collection

A scene collection is ONE JSON file at basic/scenes/<Name>.json. Filename basename = collection display name. Minimum viable file:

{
  "current_scene": "Main",
  "current_transition": "Fade",
  "transition_duration": 300,
  "transitions": [
    {"id": "fade_transition", "name": "Fade"}
  ],
  "scene_order": [{"name": "Main"}],
  "sources": [
    {
      "id": "scene",
      "name": "Main",
      "uuid": "11111111-1111-4111-8111-111111111111",
      "settings": {
        "items": [
          {
            "source_uuid": "22222222-2222-4222-8222-222222222222",
            "visible": true,
            "locked": false,
            "pos": {"x": 0, "y": 0},
            "scale": {"x": 1.0, "y": 1.0},
            "bounds_type": 0,
            "align": 5
          }
        ]
      }
    },
    {
      "id": "browser_source",
      "name": "Overlay",
      "uuid": "22222222-2222-4222-8222-222222222222",
      "settings": {
        "url": "https://example.com/overlay",
        "width": 1920,
        "height": 1080,
        "fps_custom": false,
        "reroute_audio": false
      },
      "filters": [],
      "flags": 0,
      "volume": 1.0,
      "balance": 0.5,
      "hotkeys": {}
    }
  ],
  "groups": [],
  "quick_transitions": [],
  "modules": {}
}

Source kinds accepted by top-level id (platform-specific noted):

scene, group, image_source, color_source_v3, text_gdiplus_v3 (Windows), text_ft2_source_v2, browser_source, ffmpeg_source, vlc_source,

dshow_input / wasapi_input_capture / monitor_capture / window_capture / game_capture (Windows),

av_capture_input_v2 / coreaudio_input_capture / display_capture / window_capture / macos_game_capture (macOS),

v4l2_input / pulse_input_capture / xshm_input / pipewire-screen-capture-source (Linux).

See references/config.md for the full catalog and platform availability.

Step 5 — Verify and point OBS at the new config

Close OBS FIRST — if OBS is running while you edit, it will overwrite your changes on quit.

Set the default profile + collection so OBS picks them up on next launch. Edit global.ini:

[Basic]
Profile=Streaming
ProfileDir=Streaming
SceneCollection=Main
SceneCollectionFile=Main

Or launch with CLI flags (equivalent, one-off):

obs --profile "Streaming" --collection "Main"
# Other useful flags:
# --studio-mode            launch with Studio Mode on
# --startstreaming         begin streaming immediately
# --startrecording         begin recording immediately
# --startreplaybuffer      begin replay buffer immediately
# --startvirtualcam        begin virtual cam immediately
# --minimize-to-tray       hide window on launch
# --portable               force portable mode (looks for config next to the binary)
# --multi                  allow multiple OBS instances (single-instance lock override)
# --safe-mode / --disable-shutdown-check

Then from the checker:

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py check --verbose

Available scripts

Workflow

  1. See what's already there:

```bash

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py check

```

  1. Install OBS if missing:

```bash

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py install --platform auto --dry-run

```

  1. Create profile + collection from templates:

```bash

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py profile create --name Streaming --template 1080p60_stream

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py collection create --name Main --template browser-overlay

```

  1. Wire streaming destination:

```bash

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py service set --profile Streaming \

--type rtmp_custom --server rtmp://live.example.com/app --key KEY

```

  1. Make them default:

```bash

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py profile set-default --name Streaming

uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py collection set-default --name Main

```

  1. Launch OBS and verify.

Reference docs

Gotchas

Examples

Example 1: Provision a 1080p60 Twitch streamer on macOS

brew install --cask obs
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py profile create \
  --name Twitch1080p60 --template 1080p60_stream
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py encoder set \
  --profile Twitch1080p60 --codec x264 --bitrate 6000 --preset veryfast
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py service set \
  --profile Twitch1080p60 --type rtmp_common --server auto --key live_XXX
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py collection create \
  --name Main --template webcam
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py profile set-default --name Twitch1080p60
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py collection set-default --name Main
open -a OBS

Example 2: Clone a working setup to a second machine

# On machine A
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py export \
  --profile Twitch1080p60 --output twitch.zip

# Copy twitch.zip to machine B, then:
uv run ${CLAUDE_SKILL_DIR}/scripts/obsconfig.py import --archive twitch.zip

Example 3: One scene with a browser overlay on top of a display capture (macOS)

Write basic/scenes/Main.json with two sources (display_capture + browser_source) inside a scene whose items[] references both by UUID. See Step 4 for the shape — add a second items[] entry and a second top-level source with matching UUIDs.

Troubleshooting

Error: OBS launches but shows "Untitled" profile, ignores my new one

Cause: global.ini still points at the default, OR the profile directory name doesn't match [Basic] ProfileDir=.

Solution: Open global.ini, set both Profile=Name AND ProfileDir=Name to your profile's directory name (case-sensitive on macOS/Linux). Close OBS fully before editing.

Error: Scene collection loads but a source is missing or shows "Source not found"

Cause: UUID mismatch between sources[].uuid and the referencing items[].source_uuid, or an invalid (non-v4) UUID.

Solution: Regenerate UUIDs with python -c "import uuid; print(uuid.uuid4())" and make sure every items[].source_uuid appears exactly once as a top-level sources[].uuid.

Error: Encoder falls back to x264 on a machine with an NVIDIA GPU

Cause: Wrong encoder ID in basic.ini (StreamEncoder/RecEncoder) or streamEncoder.json keys don't match the NVENC encoder.

Solution: Use jim_nvenc (modern) or ffmpeg_nvenc (legacy). The JSON keys for NVENC are different from x264 — see references/config.md.

Error: Recording file path is wrong / recordings go to Desktop

Cause: RecFilePath under [Output] (Advanced) or [SimpleOutput] (Simple) is empty or points somewhere else.

Solution: Set Mode=Advanced plus RecFilePath=/absolute/path, AND RecFormat2=mkv. Restart OBS.

Error: "Cannot launch, another instance is already running" on CI

Cause: Single-instance lock from a stale session.

Solution: Pass --multi to the CLI, OR delete the lock file (~/.config/obs-studio/safe_mode.txt / macOS equivalent) before launch.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.