Skip to content

About

OBS Studio plugin for macOS with customizable VideoToolbox H.264/HEVC hardware encoders, per-encoder settings, and automatic Multitrack Video integration.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

OBS macOS VideoToolbox Encoders

A plugin for OBS Studio on Mac that adds two extra hardware encoders — Custom Apple VT H264 Hardware Encoder (Default) and Custom Apple VT HEVC Hardware Encoder (Default) — plus a settings window to tune their latency/quality trade-offs, and lets OBS use them automatically for Multitrack Video streaming. You can add more H264/HEVC pairs with their own alias and settings, for example one tuned for streaming and one for recording.

Why would I want this?

OBS already ships Apple's VideoToolbox hardware encoders. This plugin adds "Custom" versions of the same H.264 and HEVC encoders that expose settings OBS's own encoders don't:

  • RealTime — asks the hardware encoder to keep pace with real time instead of taking extra time per frame. This is what streaming services expect from hardware encoders on live tracks.
  • Prioritize Encoding Speed Over Quality — lets the encoder trade quality for extra speed if it's struggling to keep up.
  • Omit Expected Frame Rate — stops telling VideoToolbox the expected frame rate, so it encodes each frame as fast as it can instead of pacing itself. This leaves more headroom when several outputs share the hardware encoder, for example Multitrack Video plus a recording.
  • Custom Lookahead Frame Count (macOS 15 Sequoia or newer) — controls how many upcoming frames the encoder studies before compressing, which can claw back some of the quality RealTime mode gives up.
  • Submit Frames From a Dedicated Thread — queues each frame (up to a configurable depth, 4 by default) and hands it to VideoToolbox from the encoder's own thread, so an overloaded encoder drops frames on its own instead of making OBS skip frames on every output of the canvas.

All of them default to off, so a freshly installed Custom encoder behaves exactly like OBS's own native hardware encoder until you turn something on. You configure them once, from Tools → macOS VideoToolbox Encoders…, for each codec — the setting isn't per OBS profile, it applies to every use of that encoder on this Mac. When different outputs need different settings, add another set of custom encoders and pick each one where it's needed.

This also lets OBS's Multitrack Video feature — used by Twitch Enhanced Broadcasting, Amazon IVS Multitrack Video, and Dolby OptiView Real-time Enhanced Broadcasting (also known as Dolby Millicast) — automatically pick the Custom encoder instead of the standard one, with no manual setup per stream.

You can also select either Custom encoder directly and use it like any other encoder in OBS, for outputs outside of Multitrack Video.

Requirements

  • macOS 13 (Ventura) or newer, on a Mac with Apple Silicon (macOS 15 Sequoia or newer for the Custom Lookahead Frame Count setting)
  • OBS Studio 31.1.0 or newer
  • A Mac whose chip supports hardware H.264/HEVC encoding (all Apple Silicon Macs do)

Installing

  1. Download the latest .pkg installer from the Releases page.
  2. Double-click the downloaded file and follow the installer.
  3. Restart OBS Studio if it was running.

The installer places the plugin in your user's OBS plugin folder, so it only affects your own OBS installation — it does not require admin rights beyond the standard installer prompt, and it does not touch OBS Studio itself.

Uninstalling

Quit OBS, then delete this folder:

~/Library/Application Support/obs-studio/plugins/obs-macos-videotoolbox-encoders.plugin

Using it

Configuring the encoders

Open OBS's Tools menu and choose macOS VideoToolbox Encoders…. The window has one tab per set of custom encoders, starting with Default. Each tab has a section for H264 and a section for HEVC, each with the same toggles described above; the Default tab also has the sections to enable using these encoders for Multitrack Video, to log encoder timing statistics, and to check for updates. Every toggle shows a short description and a tooltip with a more detailed explanation of what it does and when to use it. These settings apply to this Mac, independent of the OBS profile in use.

OBS Tools menu with macOS VideoToolbox Encoders selected

macOS VideoToolbox Encoders settings window with Default, Recording and Streaming tabs

Adding more custom encoders

Click the + tab to add a new H264/HEVC pair. Give it an alias at the top of its tab; the encoders appear in OBS as Custom Apple VT H264 Hardware Encoder (alias) and Custom Apple VT HEVC Hardware Encoder (alias). New encoders become selectable in OBS after restarting it; renaming an alias takes effect right away. Remove Encoders on a tab deletes that set after the next restart, so switch any output still using it to another encoder. Multitrack Video always uses the Default encoders.

Diagnostics

Log encoder timing statistics writes per-encoder timing to the OBS log every 10 seconds: time spent in encode(), copying the frame and blocked inside VideoToolbox, plus frames in flight, output queue depth and the time from submission to encoded packet. Use it to find out which encoder causes "skipped frames due to encoding lag". Only encoders from this plugin are measured, and it applies to encoders started after the change.

Updates

With Check for updates when OBS starts enabled, the plugin looks at this project's GitHub releases at most once a day and tells you when a newer version exists, with options to open the release page, read the release notes, postpone, or skip that version. Nothing is downloaded or installed automatically and no personal data is sent. You can also check manually with the Check for updates button. Turn the option off to disable the startup check.

As a Multitrack Video encoder (automatic)

Enable Use these encoders for Multitrack Video in the settings window. The next time you start streaming with Multitrack Video enabled for a supported service (Twitch, Amazon IVS, or Dolby OptiView), OBS swaps in the Custom encoder automatically for any track that was using Apple's regular H.264/HEVC hardware encoder. Every other output or stream is left untouched. If the Custom encoder isn't available or compatible for some reason, OBS quietly falls back to the encoder you already had selected — streaming is never blocked by this.

As a regular encoder (manual)

In Settings → Output, pick Custom Apple VT H264 Hardware Encoder (Default) or Custom Apple VT HEVC Hardware Encoder (Default) — or one of your additional custom encoders — from the encoder list, the same way you'd pick any other encoder.

OBS encoder list showing the Default, Recording and Streaming Custom Apple VT H264 and HEVC hardware encoders

Frequently asked questions

Does this replace or modify OBS's own encoders? No. It adds new encoders alongside the ones OBS already ships. Your existing encoders and settings are never changed.

Will this affect streams or recordings that don't use Multitrack Video? No. The automatic replacement only applies to Multitrack Video outputs for the supported services, and only while that option is turned on in the settings window. Everything else in OBS behaves exactly as before.

What happens if the Custom encoder can't be used for some reason? OBS falls back to the encoder it would have used anyway, so a stream never fails to start because of this plugin.

Should I turn RealTime on or off? On for live streaming, where a hardware encoder that reliably keeps up with the incoming frame rate matters more than squeezing out the best possible quality per bit — this is what Twitch, Amazon IVS, and Dolby OptiView expect. Off (the default) for local recording or any non-latency-sensitive use, where the encoder is free to spend more effort per frame; this matches how OBS's own native hardware encoder already behaves.

When would I need Prioritize Encoding Speed Over Quality, Omit Expected Frame Rate or Custom Lookahead Frame Count? Apple's hardware encoders already favor quality by default, even with RealTime on, so most people never need to touch these. Turn on Prioritize Encoding Speed Over Quality only if you see dropped or delayed frames at your chosen resolution, bitrate, or frame rate; Omit Expected Frame Rate helps in the same situation when several outputs share the encoder. Custom Lookahead Frame Count is the opposite knob — raising it can recover some of the quality RealTime mode gives up, at the cost of a bit more latency and memory; it requires macOS 15 (Sequoia) or newer.

When would I need Submit Frames From a Dedicated Thread? OBS feeds every encoder of a canvas one after another from a single thread, and VideoToolbox blocks that thread when the hardware encoder falls behind. If one encoder is overloaded, OBS reports "skipped frames due to encoding lag" on every output — stream, recording and replay buffer alike. With this setting on, only the overloaded encoder drops frames, and the OBS log says so. It does not add hardware capacity, and it applies the next time the output starts.

Does this work on Intel Macs? The published installer targets Apple Silicon. Some rate-control modes (CBR, CRF) require Apple Silicon and automatically fall back to ABR when they're not available.

Does the plugin contact the internet? Only for the update check described above, which you can turn off. It makes a single request to the project's GitHub releases and sends nothing else.

Is this an official OBS or Apple product? No, it's an independent, open-source plugin. It uses only public OBS Studio and Apple VideoToolbox APIs.

How do I know which OBS version this supports? OBS Studio 31.1.0 or newer. The plugin checks the OBS version it's built against and won't build against older versions.

License

GPL-2.0. The encoder implementation is based on OBS Studio's GPL-licensed VideoToolbox module.

About

OBS Studio plugin for macOS with customizable VideoToolbox H.264/HEVC hardware encoders, per-encoder settings, and automatic Multitrack Video integration.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages