+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------

Audio capture with sndio
-------------------------

OBS uses the "Sndio Input Client" source to read audio through
sndio(7). There is no automatic device list; you must type the device
name yourself. The three names you will typically use are:

    snd/mon   Desktop audio (a "monitor" stream, i.e. a loopback of
              everything being played back). This is NOT a microphone.
              Use this if you want to capture the sound your desktop
              is producing, e.g. together with XSHM/Xcomposite screen
              capture.

    snd/0     Microphone input, built-in audio device.

    snd/1     Microphone input, USB audio device (if present).

Microphone input (snd/0, snd/1) works out of the box with sndiod's
default configuration; no setup is required for it. The step below
is only needed if you also want desktop audio via snd/mon. Without
it, snd/mon simply will not exist, but your microphones will keep
working normally.

To additionally expose a monitor device (for desktop audio) alongside
the normal full-duplex device, configure sndiod(8) like this:

    # rcctl set sndiod flags "-s default -m play,mon -s mon"
    # rcctl restart sndiod

The order of the flags matters: "-m play,mon" only applies to the
sub-device declared right after it (mon), not to the one declared
before it (default). This is why "default" (snd/0) still supports
recording (play,rec, the sndiod default) while "mon" (snd/mon) is
play+monitor only. If you flatten this into a single "-m play,mon"
for the whole server, you will lose microphone recording entirely.

You can check what is actually configured with:

    $ rcctl get sndiod flags

Kernel recording permissions
-----------------------------

For privacy reasons, OpenBSD silences audio/video recording by
default at the kernel level, independently of any sndio/mixer
settings. Both microphone and webcam sources will otherwise produce
silence/black frames.

To allow audio recording:

    # sysctl kern.audio.record=1

To allow video (webcam) recording:

    # sysctl kern.video.record=1

To make these persist across reboots, add both lines to
/etc/sysctl.conf:

    kern.audio.record=1
    kern.video.record=1

Disabled features
-------------------

The following upstream features are not built in this port:
browser source (requires CEF), WebRTC output, MPEG-TS/SRT/RIST
output, obs-websocket, and virtual camera output.
