Pause icon in video windows.

Artsak75

New Member
Hello everyone, on my YouTube channel I paint figures and models and like other creators who make this type of content. I have to pause the video to make a color, clean the airbrush, wait for dry the model, etc. Sometimes I don't realize that I have the recording paused and I continue the painting without it recording. My suggestion is the following:
It would be possible to optionally enable the pause icon to appear on the recording window and look somewhat translucent to indicate that it is paused?. In my case it would be of great help. Thank you.

Hola a todos, en mi canal de youtube pinto figuras y maquetas y al igual que otros creadores que hacen este tipo de contenido. Tengo que pausar el video para hacer un color, limpiar el aerógrafo, esperar que seque una maqueta, etc. Algunas veces no me doy cuenta de que tengo la grabación pausada y continuo la pintura sin que se grabe. Mi sugerencia es la siguiente:

¿Seria posible habilitar de manera opcional que sobre la ventana de grabación apareciera el icono de pausa y se viera algo traslucido para indicar que esta pausado?. En mi caso seria de gran ayuda. Gracias.
 

Suslik V

Active Member
Some workarounds.

I think the "Advanced Scene Switcher" plugin can do the job for you:
It has condition/trigger "If Recording paused", "If not Recording paused" and has action "Wait" (for delay), "Scene item visibility" for show/hide (and many more other actions). Thus, you can add any picture to the top of the scene and hide it when recording paused - in OBS preview you'll see your picture only when recording is paused. Only two macros needed - to show and to hide your image.

Also, you can loop warning sound while recording is paused. It can be done with custom script by using OBS_FRONTEND_EVENT_RECORDING_PAUSED and OBS_FRONTEND_EVENT_RECORDING_UNPAUSED events (something like: https://obsproject.com/forum/threads/notification-program-during-recording.156454/#post-572955).
 

Artsak75

New Member
Some workarounds.

I think the "Advanced Scene Switcher" plugin can do the job for you:
It has condition/trigger "If Recording paused", "If not Recording paused" and has action "Wait" (for delay), "Scene item visibility" for show/hide (and many more other actions). Thus, you can add any picture to the top of the scene and hide it when recording paused - in OBS preview you'll see your picture only when recording is paused. Only two macros needed - to show and to hide your image.

Also, you can loop warning sound while recording is paused. It can be done with custom script by using OBS_FRONTEND_EVENT_RECORDING_PAUSED and OBS_FRONTEND_EVENT_RECORDING_UNPAUSED events (something like: https://obsproject.com/forum/threads/notification-program-during-recording.156454/#post-572955).
Hi I install this pluging and now ubuntu studio didnt works. I restart linux and obs dont works. Thanks for try to help.
 

Suslik V

Active Member
You can ask about the plugin in the plugin's section of the forum (don't forget to attach obs-log files):
At least some versions of the plugin were working OK in Linux OS.
 

Suslik V

Active Member
Other workaround here is to write script that will emulate hotkey press (only for OBS) for each event, and binding this hotkey to any show/hide source action in OBS.
In this case, special scene dedicated for indication (with this source inside) can be opened as Windowed Projector running on top of all windows, and if you never switch to this scene - it never be recorded. Thus, you'll have custom window which content can be modified on OBS recording pause/un-pause/start/stop events.

Edit:
Here is example of the code (save it as "hotkeys-on-obs-events.lua" to be able to use with the main menu Tools > Scripts):
Lua:
local obs = obslua

-- Full list of the available hotkeys (OBS v29.1.2)
-- https://github.com/obsproject/obs-studio/blob/cb391a595d45aea0d710680c143eb90efe22998b/libobs/obs-hotkeys.h

-- Recording paused hotkey
rec_paused_key = "OBS_KEY_NUM9"
rec_paused_key_modifires = {control=true} ---- {shift=true, alt=true, control=true, command=true}

-- Recording unpaused hotkey
rec_unpaused_key = "OBS_KEY_NUM8"
rec_unpaused_key_modifires = {control=true} ---- {shift=true, alt=true, control=true, command=true}

-- Recording started hotkey
rec_started_key = "OBS_KEY_NUM7"
rec_started_key_modifires = {control=true} ---- {shift=true, alt=true, control=true, command=true}

-- Recording stopped hotkey
rec_stopped_key = "OBS_KEY_NUM6"
rec_stopped_key_modifires = {control=true} ---- {shift=true, alt=true, control=true, command=true}

----------------------------------------------------------

-- This function triggers OBS hotkey event
function send_hotkey(hotkey_id_name, key_modifiers)
    local shift_mod = key_modifiers.shift or false
    local control_mod = key_modifiers.control or false
    local alt_mod = key_modifiers.alt or false
    local command_mod = key_modifiers.command or false
    local modifiers = 0

    if shift_mod then
        modifiers = bit.bor(modifiers, obs.INTERACT_SHIFT_KEY )
    end
 
    if control_mod then
        modifiers = bit.bor(modifiers, obs.INTERACT_CONTROL_KEY )
    end
 
    if alt_mod then
        modifiers = bit.bor(modifiers, obs.INTERACT_ALT_KEY )
    end
 
    if command_mod then
        modifiers = bit.bor(modifiers, obs.INTERACT_COMMAND_KEY )
    end

    local combo = obs.obs_key_combination()
    combo.modifiers = modifiers
    combo.key = obs.obs_key_from_name(hotkey_id_name)

    obs.obs_hotkey_inject_event(combo, false)
    obs.obs_hotkey_inject_event(combo, true)
    obs.obs_hotkey_inject_event(combo, false)
end

----------------------------------------------------------

-- A function named script_description returns the description shown to
-- the user
function script_description()
    local ctrl_paused = rec_paused_key_modifires.control or false
    local alt_paused = rec_paused_key_modifires.alt or false
    local shift_paused = rec_paused_key_modifires.shift or false
    local command_paused = rec_paused_key_modifires.command or false
    local ctrl_unpaused = rec_unpaused_key_modifires.control or false
    local alt_unpaused = rec_unpaused_key_modifires.alt or false
    local shift_unpaused = rec_unpaused_key_modifires.shift or false
    local command_unpaused = rec_unpaused_key_modifires.command or false
    local ctrl_started = rec_started_key_modifires.control or false
    local alt_started = rec_started_key_modifires.alt or false
    local shift_started = rec_started_key_modifires.shift or false
    local command_started = rec_started_key_modifires.command or false
    local ctrl_stopped = rec_stopped_key_modifires.control or false
    local alt_stopped = rec_stopped_key_modifires.alt or false
    local shift_stopped = rec_stopped_key_modifires.shift or false
    local command_stopped = rec_stopped_key_modifires.command or false
    local modifiers_paused = ""
    local modifiers_unpaused = ""
    local modifiers_started = ""
    local modifiers_stopped = ""

    if ctrl_paused then
        modifiers_paused = modifiers_paused .. "CTRL + "
    end

    if alt_paused then
        modifiers_paused = modifiers_paused .. "ALT + "
    end

    if shift_paused then
        modifiers_paused = modifiers_paused .. "SHIFT + "
    end

    if command_paused then
        modifiers_paused = modifiers_paused .. "COMMAND + "
    end

    if ctrl_unpaused then
        modifiers_unpaused = modifiers_unpaused .. "CTRL + "
    end

    if alt_unpaused then
        modifiers_unpaused = modifiers_unpaused .. "ALT + "
    end

    if shift_unpaused then
        modifiers_unpaused = modifiers_unpaused .. "SHIFT + "
    end

    if command_unpaused then
        modifiers_unpaused = modifiers_unpaused .. "COMMAND + "
    end

    if ctrl_started then
        modifiers_started = modifiers_started .. "CTRL + "
    end

    if alt_started then
        modifiers_started = modifiers_started .. "ALT + "
    end

    if shift_started then
        modifiers_started = modifiers_started .. "SHIFT + "
    end

    if command_started then
        modifiers_started = modifiers_started .. "COMMAND + "
    end

    if ctrl_stopped then
        modifiers_stopped = modifiers_stopped .. "CTRL + "
    end

    if alt_stopped then
        modifiers_stopped = modifiers_stopped .. "ALT + "
    end

    if shift_stopped then
        modifiers_stopped = modifiers_stopped .. "SHIFT + "
    end

    if command_stopped then
        modifiers_stopped = modifiers_stopped .. "COMMAND + "
    end

    return "Fires hotkeys for internals of OBS:\n" ..
    modifiers_paused .. rec_paused_key .. " on 'Recording paused'\n" ..
    modifiers_unpaused .. rec_unpaused_key .. " on 'Recording unpaused'\n" ..
    modifiers_started .. rec_started_key .. " on 'Recording started'\n" ..
    modifiers_stopped .. rec_stopped_key .. " on 'Recording stopped'"
end

-- OBS events and corresponding actions
function on_event(event)
    if event == obs.OBS_FRONTEND_EVENT_RECORDING_PAUSED then
        send_hotkey(rec_paused_key, rec_paused_key_modifires)
    elseif event == obs.OBS_FRONTEND_EVENT_RECORDING_UNPAUSED then
        send_hotkey(rec_unpaused_key, rec_unpaused_key_modifires)
    elseif event == obs.OBS_FRONTEND_EVENT_RECORDING_STARTED then
        send_hotkey(rec_started_key, rec_started_key_modifires)
    elseif event == obs.OBS_FRONTEND_EVENT_RECORDING_STOPPED then
        send_hotkey(rec_stopped_key, rec_stopped_key_modifires)
    end
end

-- A function named script_load will be called on startup
function script_load(settings)
    obs.obs_frontend_add_event_callback(on_event)
end
The code (under the spoiler above) will fire next hotkeys:
Ctrl + Num9 on Recording paused event
Ctrl + Num8 on Recording un-paused event
Ctrl + Num7 on Recording started event
Ctrl + Num6 on Recording stopped event
 
Last edited:
Top