Resource icon

OBS Lua Auto mute/unmute audio in Scene 1.03

Lua Source Script to either Mute if Unmuted or Unmute if Muted, a selected Audio Source when the scene becomes active in the stream and replaces the prior Mute state of the selected Audio Source when the scene is no longer active in the stream.

Load the "automute.lua" script then add an "Audio Mute/Unmute" source to the scene. In that new source's properties select the Audio Source to Mute/Unmute. Default is to mute the selected audio source when active. Check the Unmute if Muted box to unmute instead.

Because OBS loads a new source before removing an old source, including this source in adjacent scenes will cause it to "see" the audio source as already muted when it became active. Because the audio source was muted to start, it will not be unmuted when it exits unless the force mute/unmute box is also selected for the last adjacent scene.

NOTE: The Audio Mute/Unmute source that is added to the scene will be renamed to either: "Mute: {selected audio source name}", or "UnMute: {selected audio source name}" for clarity as to what it is doing in the scene.
First release
Last update
0.00 star(s) 0 ratings

More resources from DCStrato

Latest updates

  1. Renamed Source bug fix

    OBS requires unique source names and this update enumerates renamed sources to ensure compliance.
  2. Auto mute/unmute audio source in a Scene

    Filtering Audio Sources based on Source Output Flags