OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
        • Load Balancing
          • Build Redundant Load-Balanced Gateways
          • Load Balance Services with NAT or DSR
          • Build an HA HTTPS Load Balancer
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Installation and First Boot
          • Complete the First 30 Minutes After Installation
          • Check Hardware Compatibility Before Installing
          • Bootstrap Wi-Fi Firmware Without Ethernet
          • Run OpenBSD as a Virtual Machine Guest
          • Install OpenBSD on a VPS or Cloud Server
          • Install OpenBSD with Full-Disk Encryption
          • Run FreeBSD on OpenBSD with vmd
          • Dual-Boot OpenBSD on a UEFI System
          • Automate OpenBSD Installation with Autoinstall and PXE
        • Desktops and Laptops
          • Set Up OpenBSD as a Laptop or Workstation
          • Configure Laptop Power Management
          • Troubleshoot Web Browsers on OpenBSD
          • Use Plan 9 Tools on OpenBSD
          • Build a Minimal Desktop with suckless Tools
          • Install Z shell (zsh)
        • Networking and Remote Access
          • Create an Administrator Account with doas and SSH Keys
          • Configure Secure Remote Access with OpenSSH
          • Use FIDO Security Keys with OpenSSH
          • Configure Wi-Fi Roaming and Wired Failover
          • Troubleshoot PF, NAT, and Routing
          • Route Multiple VLANs with PF
          • Configure a Road-Warrior WireGuard VPN
          • Route IPv6 Networks without NAT
          • Test OpenBGPD with Two Providers
          • Unlock an Internal Service with an SSH Key
          • Build a Simple Router and Firewall
        • Servers and Services
          • Set Up WordPress on OpenBSD
          • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Security, Maintenance and Recovery
          • Establish a Conservative Security Baseline
          • Recover Access and Reset the Root Password
          • Collect OpenBSD Diagnostic Evidence
          • Troubleshoot Package Installation and Update Failures
          • Schedule Recurring Maintenance
          • Monitor an OpenBSD System
          • Back Up and Restore an OpenBSD System
          • Configure softraid RAID1
          • Recover an OpenBSD System That Does Not Boot
        • Building, Automation and Virtual Machines
          • Manage OpenBSD with Ansible
          • Build Third-Party Software from Ports
          • Build OpenBSD from Source
          • Plan a Docker Workload Migration to OpenBSD
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Handbook Style Guide
    • OpenBSD Architectures
      • OpenBSD Package Search
        • Synopsis
        • Identify Audio and Video Devices
        • Verify sndiod and Playback
        • Enable Audio Recording
        • Enable a Webcam
        • Install Media Applications
        • Test Video Playback and Capture
        • Record the Screen
        • Unsupported and External Interfaces
        • Troubleshoot by Layer

        Multimedia

        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.

        Check audio playback, enable microphone or camera recording, configure device access, and install media applications. Read the installed package README for application-specific setup.

        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:

        doas rcctl check sndiod
        

        If it is configured but stopped, inspect /var/log/daemon and its rcctl(8) flags before restarting it. Manage persistent sndiod startup through rcctl, rather than leaving it running in an interactive terminal.

        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 #

        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:

        doas 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 #

        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:

        doas sysctl kern.video.record=1
        

        Grant one logged-in account access to the selected device rather than making every camera world-accessible:

        doas 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
        

        Check the installed browser or conferencing package README for required pledge, unveil, or session settings.

        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:

        doas 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
        doas 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
        

        Test playback with aucat or capture with ffplay before troubleshooting a browser or streaming application. See Troubleshoot Web Browsers and Collect OpenBSD Diagnostic Evidence for further checks.

        Report a bug
        • Synopsis
        • Identify Audio and Video Devices
        • Verify sndiod and Playback
        • Enable Audio Recording
        • Enable a Webcam
        • Install Media Applications
        • Test Video Playback and Capture
        • Record the Screen
        • Unsupported and External Interfaces
        • Troubleshoot by Layer