Stream Health HUD

Stream Health HUD 1.1.0

MMLTech

Member
MMLTech submitted a new resource:

Stream Health HUD - Real-Time Performance Overlay, show stream time, CPU, bitrate and lost frames in a text GDI

Stream Health HUD

View attachment 117015

If you find this script useful and wish to support further development:
Ko-fi: https://ko-fi.com/mmltech
PayPal: https://paypal.me/mmltools

I created a small Lua script that adds a real-time performance HUD inside OBS using a standard Text (GDI+) source.

The script updates the text with:
  • Stream or recording time
  • Dropped frames
  • CPU usage...

Read more about this resource...
 
Hey how's your day going!!

I'm a fellow OBS script developer and I wanted to point out that the current version of your script is not going to work universally, since it solely checks around for `text_gdiplus_v3` text sources. Below I've writen a temporary fix to the code. Except that, everything else works perfectly.

Lua:
-- Changes:
-- 1. Replaced `if id == "text_gdiplus_v3" then` with the code below.
-- The whole block has been written so it makes more sense.

local sources = obs.obs_enum_sources()
if sources ~= nil then
    for _, src in ipairs(sources) do
        local id   = obs.obs_source_get_id(src)
        local name = obs.obs_source_get_name(src)

        if id == "text_gdiplus_v3"
        -- Added --
        or id == "text_gdiplus_v2"
        or id == "text_gdiplus_v1"
        or id == "text_ft2_source"
        or id == "text_ft2_source_v2" then
        -- --- --

            obs.obs_property_list_add_string(list, name, name)
            log("Found Text source: " .. name .. " (id=" .. id .. ")")

        else
            log(string.format("Source found: '%s' (id=%s)", name, id))
        end
    end
    obs.source_list_release(sources)
end

Essentially what we are doing, is that we are looking for all possible OBS source text versions (which only have minor chages between them, but for the sake of what we are doing, the version won't be important), instead of looking just for one, and making the user to have to manually change the source code. This would make the script almost universal for a plathera of devices and OBS versions (especially the older and un-updated ones). After this fix, it should be all good.

Thanks,
icy404
 
Hey how's your day going!!

I'm a fellow OBS script developer and I wanted to point out that the current version of your script is not going to work universally, since it solely checks around for `text_gdiplus_v3` text sources. Below I've writen a temporary fix to the code. Except that, everything else works perfectly.

Lua:
-- Changes:
-- 1. Replaced `if id == "text_gdiplus_v3" then` with the code below.
-- The whole block has been written so it makes more sense.

local sources = obs.obs_enum_sources()
if sources ~= nil then
    for _, src in ipairs(sources) do
        local id   = obs.obs_source_get_id(src)
        local name = obs.obs_source_get_name(src)

        if id == "text_gdiplus_v3"
        -- Added --
        or id == "text_gdiplus_v2"
        or id == "text_gdiplus_v1"
        or id == "text_ft2_source"
        or id == "text_ft2_source_v2" then
        -- --- --

            obs.obs_property_list_add_string(list, name, name)
            log("Found Text source: " .. name .. " (id=" .. id .. ")")

        else
            log(string.format("Source found: '%s' (id=%s)", name, id))
        end
    end
    obs.source_list_release(sources)
end

Essentially what we are doing, is that we are looking for all possible OBS source text versions (which only have minor chages between them, but for the sake of what we are doing, the version won't be important), instead of looking just for one, and making the user to have to manually change the source code. This would make the script almost universal for a plathera of devices and OBS versions (especially the older and un-updated ones). After this fix, it should be all good.

Thanks,
icy404
Oh nice catch will do an update soon.
 
Back
Top