Notification program during recording

Hbeen

New Member
The record button, a small indicator in the status bar, and a small indicator in the tray icon make it difficult to tell if a recording is currently in progress.

That's why recordings are sometimes delayed or missing.

If so, are there any programs with the following conditions?
It would be great if it could be implemented with a program like AutoHotkey.

1. It works when obs is running.
2. The word [Waiting for recording] or a picture is overlaid on one part of the screen before recording.
3. When you press the record button, the word [Recording] or a photo is superimposed on one part of the screen.
4. Press the End Recording button to return to step 2.

I look forward to many ideas. thank you.

** The attached gif is a separate execution of the gif file after pressing the record button.

Animation.gif
 

Suslik V

Active Member
I have only idea is to run the Lua script (main menu Tools>Scripts) that will run your own prerecorded audio messages.

Example.
"board 1-6 recording not started..." in the file: recording_not_started.wav
"recording started..." in the file: recording_started.wav
"streaming started..." in the file: streaming_started.wav
"su34.lua" - see contents below
Lua:
local obs = obslua
local ffi = require("ffi")
local winmm = ffi.load("Winmm")
local SND_ASYNC = 0x00000001
local SND_NODEFAULT = 0x00000002
local SND_LOOP = 0x00000008
local SND_FILENAME = 0x00020000
local fdwSound_flags = SND_ASYNC + SND_NODEFAULT + SND_FILENAME
local fdwSound_flags_looped = SND_ASYNC + SND_NODEFAULT + SND_LOOP + SND_FILENAME

-- Put a sounds of your choice next to "su34.lua" and don't forget to match its names either in code below or rename your existing files.
SOUND1_FILEPATH = script_path() .. "recording_not_started.wav"
SOUND2_FILEPATH = script_path() .. "streaming_started.wav"
SOUND3_FILEPATH = script_path() .. "recording_started.wav"

ffi.cdef[[
    bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound);
]]

function playsound(filepath)
    winmm.PlaySound(filepath, nil, fdwSound_flags)
end

function playsound_looped(filepath)
    winmm.PlaySound(filepath, nil, fdwSound_flags_looped)
end

function on_event(event)
  if event == obs.OBS_FRONTEND_EVENT_STREAMING_STARTED then
    playsound(SOUND2_FILEPATH)
  end
  if event == obs.OBS_FRONTEND_EVENT_RECORDING_STARTED then
    playsound(SOUND3_FILEPATH)
  end
  if event == obs.OBS_FRONTEND_EVENT_RECORDING_STOPPED then
    playsound_looped(SOUND1_FILEPATH)
  end
end

function script_description()
    return "SU-34 on-board computer (voice assistent)"
end

function script_load(settings)
  playsound_looped(SOUND1_FILEPATH)
  obs.obs_frontend_add_event_callback(on_event)
end

-- Modified: Suslik V
-- Based on Lua script:
-- https://gist.github.com/snakecase/e816384a071cec31efbb4b9e429c108d

-- Credits: upgradeQ (https://gist.github.com/upgradeQ/b2412242d76790d7618d6b0996c4562f), gima (https://gitlab.com/gima/obsnotification)
-- Thank you guys!

It works for Windows only.
It loops the recording_not_started.wav file playback when the script is loaded and recording(!) wasn't started or was stopped.
It playbacks audio warning when recording or streaming started (recording_started.wav, streaming_started.wav files).
All media files should be placed in the same folder as this "su34.lua" script.

P.S. the Pause recording and many other obs events out of scope in this script - add it manually.

Docs (events, functions, lua etc.): https://obsproject.com/docs/index.html
Useful scripts: https://obsproject.com/forum/resources/categories/scripts.5/
 
Last edited:

Hbeen

New Member
It's a pity that I couldn't see it visually.
It would be nice to be able to check whether it is continuously recording while broadcasting.
Thanks for providing the alternative in detail.
I have only idea is to run the Lua script (main menu Tools>Scripts) that will run your own prerecorded audio messages.

Example.
"board 1-6 recording not started..." in the file: recording_not_started.wav
"recording started..." in the file: recording_started.wav
"streaming started..." in the file: streaming_started.wav
"su34.lua" - see contents below
Lua:
local obs = obslua
local ffi = require("ffi")
local winmm = ffi.load("Winmm")
local SND_ASYNC = 0x00000001
local SND_NODEFAULT = 0x00000002
local SND_LOOP = 0x00000008
local SND_FILENAME = 0x00020000
local fdwSound_flags = SND_ASYNC + SND_NODEFAULT + SND_FILENAME
local fdwSound_flags_looped = SND_ASYNC + SND_NODEFAULT + SND_LOOP + SND_FILENAME

-- Put a sounds of your choice next to "su34.lua" and don't forget to match its names either in code below or rename your existing files.
SOUND1_FILEPATH = script_path() .. "recording_not_started.wav"
SOUND2_FILEPATH = script_path() .. "streaming_started.wav"
SOUND3_FILEPATH = script_path() .. "recording_started.wav"

ffi.cdef[[
    bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound);
]]

function playsound(filepath)
    winmm.PlaySound(filepath, nil, fdwSound_flags)
end

function playsound_looped(filepath)
    winmm.PlaySound(filepath, nil, fdwSound_flags_looped)
end

function on_event(event)
  if event == obs.OBS_FRONTEND_EVENT_STREAMING_STARTED then
    playsound(SOUND2_FILEPATH)
  end
  if event == obs.OBS_FRONTEND_EVENT_RECORDING_STARTED then
    playsound(SOUND3_FILEPATH)
  end
  if event == obs.OBS_FRONTEND_EVENT_RECORDING_STOPPED then
    playsound_looped(SOUND1_FILEPATH)
  end
end

function script_description()
    return "SU-34 on-board computer (voice assistent)"
end

function script_load(settings)
  playsound_looped(SOUND1_FILEPATH)
  obs.obs_frontend_add_event_callback(on_event)
end

-- Modified: Suslik V
-- Based on Lua script:
-- https://gist.github.com/snakecase/e816384a071cec31efbb4b9e429c108d

-- Credits: upgradeQ (https://gist.github.com/upgradeQ/b2412242d76790d7618d6b0996c4562f), gima (https://gitlab.com/gima/obsnotification)
-- Thank you guys!

It works for Windows only.
It loops the recording_not_started.wav file playback when the script is loaded and recording(!) wasn't started or was stopped.
It playbacks audio warning when recording or streaming started (recording_started.wav, streaming_started.wav files).
All media files should be placed in the same folder as this "su34.lua" script.

P.S. the Pause recording and many other obs events out of scope in this script - add it manually.

Docs (events, functions, lua etc.): https://obsproject.com/docs/index.html
Useful scripts: https://obsproject.com/forum/resources/categories/scripts.5/
It's a pity that I couldn't see it visually.
It would be nice to be able to check whether it is continuously recording while broadcasting.
Thanks for providing the alternative in detail.
 
Top