Synopsis #
OpenBSD provides audio through the audio(4) device layer and sndio(7) framework. Video capture devices use drivers such as uvideo(4) and the video(4) interface. Recording is deliberately disabled by default at the kernel layer.
This chapter verifies base audio, enables microphone or camera recording only when required, grants camera-device access narrowly, and installs applications through packages. Application names and capabilities can change between releases; the installed package README remains authoritative for package-specific integration.
Identify Audio and Video Devices #
Review kernel attachment messages:
$ dmesg | grep -Ei 'audio|azalia|uaudio|video|uvideo|drm'
Common audio drivers include azalia(4) for High Definition Audio and uaudio(4) for supported USB audio devices. Driver availability depends on architecture and exact hardware.
List relevant device nodes without changing them:
$ ls -l /dev/audio* /dev/video* 2>/dev/null
An absent device node can indicate unsupported hardware, a driver attachment failure, or a device node that has not been created. Do not create a node with guessed major and minor numbers. Use MAKEDEV(8) only with the documented target for the architecture.
Verify sndiod and Playback #
The base sndiod(8) service normally provides shared audio access. Confirm its state:
# rcctl check sndiod
If it is configured but stopped, inspect /var/log/daemon and its rcctl(8)
flags before restarting it. Do not replace the packaged service with an interactive foreground sndiod command as a persistent configuration.
Display audio controls with sndioctl(1) :
$ sndioctl
Inspect hardware mixer controls with mixerctl(8) :
$ mixerctl -av
Control names and ranges vary by driver and codec. Change only a control reported by the local device.
Play a known-good WAV file through aucat(1) :
$ aucat -i test.wav
If playback fails, separate device attachment, sndiod, mixer mute or level, per-user session, and application-format problems.
Enable Audio Recording Deliberately #
OpenBSD records silence by default when kern.audio.record is 0. Read the current value:
$ sysctl kern.audio.record
Enable recording for the current boot only when microphone access is required:
# sysctl kern.audio.record=1
Some devices also expose a record.enable mixer control. Inspect local controls before changing it:
$ mixerctl -av | grep record
Test recording with a short file:
$ aucat -o recording.wav
Stop the command after a short sample and play the result. If recording is a permanent host requirement, add this line to /etc/sysctl.conf:
kern.audio.record=1
This is a system-wide recording capability, not a per-browser permission. Disable it again when the host does not require recording.
Enable a Webcam Deliberately #
OpenBSD blanks video capture by default when kern.video.record is 0. Confirm the device and policy:
$ dmesg | grep uvideo
# Confirm that a supported USB video device attached
$ sysctl kern.video.record
# Display the global video-recording policy
$ ls -l /dev/video*
# Display device ownership and mode
Enable video recording for the current boot:
# sysctl kern.video.record=1
Grant one logged-in account access to the selected device rather than making every camera world-accessible:
# chown alice /dev/video0
Replace alice and /dev/video0 with the intended account and verified device. Device ownership is separate from the global recording sysctl. Revisit the assignment when users change, device nodes are recreated, or the machine becomes multi-user.
If video recording is a permanent host requirement, add this line to /etc/sysctl.conf:
kern.video.record=1
The installed browser or conferencing package README can require additional pledge, unveil, or session configuration. Apply only the documented narrow change.
Install Media Applications #
Search the packages available for the running release:
$ pkg_info -Q mpv
# Search for a media player package
$ pkg_info -Q ffmpeg
# Search for media conversion tools
Install only the selected package:
# pkg_add mpv
Read installation messages and any file under /usr/local/share/doc/pkg-readmes/ before launching the application or enabling a daemon. Do not assume a Linux audio backend, capture format, hardware-acceleration flag, streaming service, or digital-rights-management component exists on OpenBSD.
Test Video Playback and Capture #
Test a known-good local media file before diagnosing network streaming:
$ mpv test-video.mkv
For a webcam, use the input format documented by the installed FFmpeg package. OpenBSD’s video(4) layer implements the supported V4L2 interface used by current FFmpeg packages. A typical test is:
$ ffplay -f v4l2 -i /dev/video0
Confirm the local ffplay -devices output and package documentation before adding format-specific options. Browser capture additionally depends on site permission and browser policy.
Record the Screen #
Screen capture reads pixels from the current X session and does not use the camera privacy control. Confirm that the installed FFmpeg package provides the x11grab input, then record from the current display as the logged-in graphical user:
$ ffmpeg -f x11grab -i "$DISPLAY" screen.mkv
Stop the command after a short test and inspect the result. Screen recording can capture passwords, messages, notifications, and private windows. Close unrelated applications and protect the output file. Adding microphone audio is a separate recording path and requires the audio privacy control described above.
Unsupported and External Interfaces #
OpenBSD does not provide a Bluetooth stack for Bluetooth audio devices. Use a supported USB audio device, a wired interface, or a network protocol supported by an installed application.
Commercial streaming services can require unavailable DRM modules or change their browser requirements without notice. Package availability does not guarantee that a third-party service supports OpenBSD.
Troubleshoot by Layer #
Collect focused evidence:
$ dmesg | grep -Ei 'audio|azalia|uaudio|video|uvideo|drm'
# Confirm driver attachment
# rcctl check sndiod
# Confirm the shared audio daemon
$ sndioctl
# Inspect sndio controls
$ mixerctl -av
# Inspect hardware mixer state
$ sysctl kern.audio.record kern.video.record
# Confirm recording privacy policy
$ ls -l /dev/video*
# Confirm camera device access
Then reproduce with the smallest base or packaged tool before testing a browser, desktop portal, or streaming application. See Troubleshoot Web Browsers and Collect OpenBSD Diagnostic Evidence for the next layer.