# obs studio freebsd set up



## NapoleonWils0n (Jun 23, 2020)

Setting up obs studio on freebsd






Boot up with the external usb mic plugged in

+ install obs and obs browser plugin


```
# pkg install obs-studio-25.0.4 obs-qtwebkit-g2018090201_2
```

+ set the xdg_runtime_directory directory to /tmp/username for pulseaudio

edit your shell config file,  replace vi with the text editor of your choice


```
vi ~/.zshrc
```


```
# XDG_RUNTIME_DIR = /tmp/${USER} for obs studio and pulseaudio
if [ -z "$XDG_RUNTIME_DIR" ]; then
    export XDG_RUNTIME_DIR="/tmp/${USER}"
    if [ ! -d  "$XDG_RUNTIME_DIR" ]; then
        mkdir "$XDG_RUNTIME_DIR"
        chmod 0700 "$XDG_RUNTIME_DIR"
    fi
fi
```

+ source your shell config file


```
source ~/.zshrc
```

+ After logging in run dmesg as root to make sure the device is recognised


```
# dmesg
```

+ Check /dev/dsp* for the device


```
ls /dev/dsp*
```

in my case my mic is listed as /dev/dsp4

+ un mute the mic

un mute the volume for the devices mixer,  the mixer number for dsp4 will be mixer4


```
mixer -f /dev/mixer4 mic 100
```

+ start pulse audio

obs studio use pulseaudio so we need to start pulseaudio before opening obs studio,  
otherwise the mic wont show up


```
pulseaudio --start
```

stop pulseaudio


```
pulseaudio --kill
```


----------

