14730 Commits
Author SHA1 Message Date
jeieaandRyan Foster 614fb6ae09 nv-filters: Fix warnings with Visual Studio 2022 17.14
Following error occurs with Visual Studio 2022 v17.14 Preview 4.0 and
Windows 11 SDK 10.0.26100.0

nvidia-videofx-filter.c(133,9): error C2220: the following warning is
treated as an error
nvidia-videofx-filter.c(133,9): warning C5287: operands are different
enum types 'nvvfx_fx_id' and 'nvvfx_filter_id'; use an explicit cast to
silence this warning

The warning is reasonable, so change mismatched enum type.

(cherry picked from commit a1c6bae601)
31.0.4
2025-06-27 17:02:20 -04:00
jeieaandRyan Foster 6811012e8b win-capture: Fix warnings with Visual Studio 2022 17.14
Following error occurs with Visual Studio 2022 v17.14 Preview 4.0 and
Windows 11 SDK 10.0.26100.0.

duplicator-monitor-capture.c(766,35): error C2220: the following warning
is treated as an error
duplicator-monitor-capture.c(766,35): warning C5287: operands are
different enum types
'window_capture_method' and 'display_capture_method'; use an explicit
cast to silence this warning

The warning is reasonable, so change mismatched enum type.

(cherry picked from commit 55673966cf)
2025-06-27 17:02:20 -04:00
Ryan Foster 8425a6960e CI: Fix broken buildspec
A stray trailing comma from a bad cherry-pick broke CI.

Reference:
https://github.com/obsproject/obs-studio/commit/3b0d71500c722916051c77c753e6003f00b92ea7
2025-06-27 17:02:20 -04:00
Ryan Foster f711aa38af libobs: Update version to 31.0.4 2025-06-27 16:37:10 -04:00
Sebastian BeckmannandRyan Foster 185e6097b0 frontend: Set Frontend-API QActions role to NoRole
When no role is set, the default is QAction::TextHeuristicRole. This
means that the text of the item gets fuzzy-matched in Qt against a set
of possible strings that could indicate that the menu should be in the
application menu on macOS.
For us this meant however that on some languages, the translation of
"WebSocket Server Settings" would begin with "Config", and as such the
related QAction replaces our "Settings" action for the PreferencesRole,
and clicking "Preferences..." in the application menu would open the
websocket settings. It should probably be considered a bug in Qt that
implicit matches via TextHeuristicRole can overwrite ones that are
explicitly set (like our PreferencesRole). However we explicitly set our
roles ourselves anyways and there is no scenario where a  plugin should
overwrite them, we can just default actions added via the Frontend API
to be NoRole; and worry about the Qt bug later.

Cherry Pick Note:
Manually picked due to UI code reorganization.

(cherry picked from commit d3c5d2ce0b)
2025-06-27 16:37:10 -04:00
Ryan Foster a2b691e9ef CI: Use rebuilt CEF to avoid memory allocation crashes on macOS
Use a rebuilt CEF of the same version (6533) that additionally disables
use_allocator_shim to avoid memory-related crashes on macOS 13 and
older.

(cherry picked from commit f42412938d)
2025-06-27 16:37:10 -04:00
Ryan Foster 3b0d71500c CI: Fix CEF ubuntu-aarch64 build
The v3 build did not have the wrapper built. This fixes that.

(cherry picked from commit bbbdb8806b)
2025-06-27 16:37:10 -04:00
Ryan Foster 50dc5e5345 frontend: Ensure cookie ID is always 16 hexadecimal characters
At a glance, the GenId function looks like it can only return a
16-character hexadecimal string with all characters being [0-9A-F].
However, it seems that it can rarely return a 16-character string that
has one or two space characters at the beginning due to the value of id,
from which the final string is derived, being too low (lower than
1152921504606846976 or 0x1000000000000000) and the printf format
specifier having a width of 16. This results in a string of less than 16
characters that is padded with blank spaces. The end result is a cookie
directory that has leading spaces in its name, which can cause various
issues, such as breaking syncing on OneDrive.

If we set the format specifier to pad with zeroes instead of spaces, the
resulting hexadecimal value is always 16 characters long without spaces.

(cherry picked from commit 9bd4514b45)
2025-06-27 16:37:10 -04:00
Norihiro KamaeandRyan Foster c3df10415f libobs/util: Fix coprocess not having environment variables
(cherry picked from commit 90d158cf17)
2025-06-27 16:37:10 -04:00
jeieaandRyan Foster a9fd4e0d81 media-playback: Fix possible crash on startup
Frame width/height check crash if the frame is not given.

We can reorder width/height check after other precondition checks.

(cherry picked from commit 22c4e11ec8)
2025-06-27 16:37:10 -04:00
Miha FrangežandRyan Foster a3aa940500 libobs/util: Fix os_process_pipe_create on Linux
This fixes a regression on Linux, introduced in commit 9bc3082.

According to the POSIX specification for the exec family of commands,
"The first argument is the filename or pathname of the executable to
be executed". This was done correctly before, but the above commit
removed "sh" from the arguments, breaking the pipe function on Linux.

(cherry picked from commit 1fc94ecde5)
2025-06-27 16:37:10 -04:00
Norihiro KamaeandRyan Foster 2adfd9aaa1 libobs/callback: Catch fail cases with missing error data
In `parse_decl_string`, it jumps to `fail` label if an error occurs.
However, if the lexer encountered an error for example, `cfp.error_list`
may be empty.

(cherry picked from commit 220b0ec649)
2025-06-27 16:37:10 -04:00
Ilya MelamedandRyan Foster 915f73a7d3 libobs: Fix setting non-0 order on only scene item
(cherry picked from commit a19945b53a)
2025-06-27 16:37:10 -04:00
jcmandRyan Foster 5aef1fb9eb mac-capture: Fix incorrect enum comparison
(cherry picked from commit 506281e3f6)
2025-06-27 16:37:10 -04:00
stephematicianandRyan Foster debf39723b linux-v4l2: Fix virtual camera start failure
Add function that tries to reset v4l2loopback output for module versions
from 0.12.5 to 0.12.7. If successful, then set flag that STREAMON and
STREAMOFF are necessary each time the device is opened/closed.

(cherry picked from commit 12c6febae2)
2025-06-27 16:37:10 -04:00
Ryan Foster 76f38b1266 media-playback: Fix possible crash if frame width or height is zero
If a frame has a width or height of zero, this value will make it into
libobs/media-io/video-frame.c:video_frame_init and cause linesizes or
heights to be zero, which will result in a bmalloc(0) call and OBS will
crash.

Instead of letting the call stack get that far, check the frame width
and height here at the source, log an error, and return early if the
frame width or height are zero.

(cherry picked from commit 7cae57d3b7)
2025-06-27 16:37:10 -04:00
LainandRyan Foster 7018b6d2f4 frontend/widgets: Fix integer overflow
If the crop values combined are larger than the width or height of the
source, an integer overflow will occur.

This fix converts the width/height values to int, and then clamps
any negative values to 0.

(cherry picked from commit 7f09344989)
2025-06-27 16:37:10 -04:00
tytan652andRyan Foster c7e70fd6a3 CI: Use Flatpak action upstream
The fork has been merge with upstream.

https://github.com/flathub-infra/flatpak-github-actions/issues/17
(cherry picked from commit a368f05d01)
2025-06-27 16:37:10 -04:00
Ryan Foster 06f723f4d1 build-aux: Use GitHub repo for LuaJIT
Curl reports that the luajit.org git repo is using a self-signed cert.
This is causing git operations to fail. Let's just use the GitHub
mirror.

Cherry Pick Note:
Manually edited to only change the remote and not the commit.

(cherry picked from commit cfb23a51ff)
2025-06-27 16:37:10 -04:00
TaruliaandRyan Foster 086acd6ebd deps/json11: Fix compile error on GCC 15+
(cherry picked from commit 6931d80e16)
2025-06-27 16:37:10 -04:00
Ryan Foster e9c0d49340 CI: Update flatpak-builder and flat-manager actions
actions/cache versions other than v4, v3, v4.2.0, and v3.4.0 were
deprecated and gradually sunset through February.

@actions/cache versions other than v4.0.0+ were deprecated and gradually
sunset through February.

See:
 * https://github.com/actions/cache/discussions/1510
 * https://github.com/actions/toolkit/discussions/1890

flathub-infra/flatpak-github-actions/flatpak-builder set its
@actions/cache dependency version to "^3.2.3" and was last updated on
July 29, 2024. As a result, its yarn.lock file specifies version
"3.2.4", which is no longer supported and does not work.

Update flathub-infra/flatpak-github-actions actions now that they have
updated their @actions/cache dependency.

(cherry picked from commit 8db61f2fab)
2025-06-27 16:37:10 -04:00
Norihiro KamaeandRyan Foster f93294eb40 libobs/util: Fix tv_nsec becoming 1000000000 in os_event_timedwait
(cherry picked from commit 099bc26bd6)
2025-06-27 16:37:10 -04:00
jcmandRyan Foster d26a3fdcd9 cmake: Adjust macOS SDK detection
Cherry picked from 8f1bcc17
2025-04-25 18:35:12 -04:00
Ryan Foster fcd1910bf5 libobs: Update version to 31.0.3
(cherry picked from commit 3e84469cc1)
31.0.3
2025-03-26 16:22:17 -04:00
ExeldroandRyan Foster 8f2e6cb3b5 libobs: Fix duplicating scene with custom size
(cherry picked from commit 5ca6e1effa)
2025-03-26 16:22:17 -04:00
Ryan Foster 9d07e5c9e8 obs-websocket: Update version to 5.5.6
Fix a possible crash when opening OBS in Studio Mode.

(cherry picked from commit b96607345a)
2025-03-25 18:01:07 -04:00
PatTheMavandRyan Foster 9b88bb2cb5 UI: Only emit frontend events for existing scene collection
To emit frontend events early during OBS' initialization, the
disableSaving state variable needs to be "falsy" (as events will not be
emitted otherwise).

The code path taken for generating a new fallback scene collection
has disableSaving decremented to "enable" saving (and thus frontend
events) already, so it's just the code paths for existing collections
that need this workaround.

Emitting the scene changed and preview scene changed events when a
fallback scene collection has been created has side-effects when
OBS Studio is set to studio mode and can lead to potential crashes,
as the studio mode is still in an invalid state at this point.

Co-authored-by: Ryan Foster <ryan@obsproject.com>
2025-03-25 18:01:07 -04:00
Lukáš JechandRyan Foster bf0d9773b3 rtmp-services: Add "VRCDN - Live" service
(cherry picked from commit 01d5198f7b)
2025-03-25 18:01:07 -04:00
duyquach-castrandRyan Foster d20d2863ff rtmp-services: Update Castr.io ingests
(cherry picked from commit 291adefb4d)
2025-03-25 18:01:07 -04:00
Service CheckerandRyan Foster e9c87a8d7c rtmp-services: Remove defunct servers/services
(cherry picked from commit 1673cce921)
2025-03-25 18:01:07 -04:00
jcmandRyan Foster 96b9166815 mac-avcapture: Clear memory when creating frame struct
(cherry picked from commit 68c4617927)
2025-03-25 18:01:07 -04:00
Ryan Foster 4fe86d626a obs-browser: Update version to 2.24.6
46adc4b - Check source validity before attempting to log renderer crash
ac34d8e - Don't loop Cef exit while shutting down if task post fails
b56fd78 - Update version to 2.24.6

(cherry picked from commit 95cea5487b)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 3bebf2d67f nv-filters: Silence initial load error for Blur
On initial run of the Blur filter, some parameters are not all set when
there is the first call to load the effect. This is actually not an
issue, so the log is now silenced at this time.

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit f6f5c7bb25)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 856c914fd6 nv-filters: Remove reset signal for Video effects
The reset signal was triggered whenever there was an update in the
parent source. This destroys the effect and recreates it, which can be
resource heavy.
We now let the SDK handle the source update on its own rather than
manually resetting the effect on obs side.

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit cc452e5acd)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 347d67d3c6 nv-filters: Fix CudaStream used in Video effects
During the mapping and unmapping of resources, the CudaStream was not
always consistent.
This fixes the issue.
Thanks to Stephan from NVIDIA Dev support for noticing the mismatch.

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 3402f6c7d0)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 81d21a1f1b nv-filters: Reallocate state when resetting AIGS filters
This properly allocates the temporal state variable used in AI
greenscreen effect, when the latter is reset.

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit b5d0054cfa)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 83c245d786 nv-filters: Fix destruction of Background Blur effect
For the background blur effect, it was found that destroying it and
then adding any other NVIDIA effect led to a blank picture.
This commit swaps the order of destroying the effect and the associated
cudaStream.
For other effects the order does not matter; I have no idea why the
order matters for blur effect and the SDK gives no indication about any
proper order at destruction time.

Fixes bug #11383.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 2682ccc33c)
2025-03-25 18:01:07 -04:00
pkvandRyan Foster 255801816a nv-filters: Set max effective threshold to 0.95 for Background removal
The threshold THR in Background removal filter has the following effect:
- if alpha if between [THR - 0.1; THR], alpha is interpolated;
- if alpha >= THR, alpha is set to 1.0;
- if alpha <= THR - 0.1, alpha is set to 0.
It was introduced in order to smooth the alpha at the edges of the
foreground.
This works fine unless THR == 1, where there can be bulk pixels with
alpha which will be interpolated as if they were at the edge;
in order to ensure that a bulk area with alpha set to 1.0 is well
defined, the max threshold is now set to 0.95 (so if the user picks a
unity threshold, a value of 0.95 will actually be used).
This fixes a bug in third party plugins which rely on a bulk foreground
safely set at alpha == 1.0. [1]

[1] https://github.com/FiniteSingularity/obs-stroke-glow-shadow/issues/61

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit ff51280ecb)
2025-03-25 18:01:07 -04:00
BoandRyan Foster 7cb45aa3f1 obs-nvenc: Fix incorrect CUDA array size allocation
Fix cuda array use 2 bytes per element instead of 4 bytes with P010 format.

(cherry picked from commit ecb99e3b34)
2025-03-25 18:01:07 -04:00
Dennis SädtlerandRyan Foster aa0360c00f libobs: Reset reconnecting state when can_reconnect is false
(cherry picked from commit 12baa1c817)
2025-03-25 18:01:07 -04:00
Dennis SädtlerandRyan Foster 66390c9a72 Revert "libobs: Do not allow reconnect if stop code is OBS_OUTPUT_INVALID_STREAM"
This reverts commit a0edc5e8bc.

(cherry picked from commit 2950daa29d)
2025-03-25 18:01:07 -04:00
Ryan Foster f22e2b704b CI: Use rebuilt CEF to avoid memory allocation crashes on macOS
Use a rebuilt CEF of the same version (6533) that disables
use_partition_alloc_as_malloc and enable_backup_ref_ptr_support to avoid
memory-related crashes on macOS.

(cherry picked from commit 2964d54eef)
2025-03-25 18:01:07 -04:00
prgmitchellandRyan Foster 7e7c8f4abd win-capture: Add FragPunk to compatibility list
(cherry picked from commit b64f549ec9)
2025-03-25 18:01:07 -04:00
Ryan Foster 80d0dd987d rtmp-services: Remove unresponsive servers
These servers are unresponsive and are causing our nightly service
checks to fail. We do not know if these servers are intentionally
unreachable, but I do not want our nightly CI runs to keep failing, so I
am removing them unless we are informed they are working.

(cherry picked from commit 6f115df3af)
2025-03-25 18:01:07 -04:00
Ryan Foster e6137e15e0 libobs: Update version to 31.0.2
(cherry picked from commit ef2fe6fdd3)
31.0.2
2025-03-07 16:45:32 -05:00
jcmandRyan Foster 2b6bacd6f5 mac-avcapture: Prevent race condition in source init/deinit
(cherry picked from commit 4fd671ee89)
2025-03-07 15:56:35 -05:00
Ryan Foster c4c2b77741 win-dshow: Fix possible crash if frame width or height is zero
If a frame has a width or height of zero, this value will make it into
libobs/media-io/video-frame.c:video_frame_init and cause linesizes or
heights to be zero, which will result in a bmalloc(0) call and OBS will
crash.

Instead of letting the call stack get that far, check the frame width
and height here at the source, log an error, and return early if the
frame width or height are zero.

(cherry picked from commit 3437e2b082)
2025-03-07 15:56:35 -05:00
Ryan Foster 2deb61b68a obs-browser: Update version to 2.24.5
082a0a2 - Don't emit a normal call to a function for closing panels
663dc38 - Disable modern game controller API on Windows
4023fad - Log fatal CEF crashes to file
52c1527 - Print browser source renderer crashes to OBS log
af0651b - Log error if CefInitialize fails
8223215 - Revert "Enable Qt message loop on Linux"
16ff0fa - Update version to 2.24.5

Additionally, update buildspec.json and build-aux/modules/99-cef.json to
use the new CEF builds. This is being done because the changes in
obs-browser specifically are meant to work with a CEF build compiled
with use_gtk=false.

(cherry picked from commit 3d9d066d07)
2025-03-07 15:56:35 -05:00
Ryan Foster d8e2431e30 obs-websocket: Update version to 5.5.5
(cherry picked from commit 50429bd2b0)
2025-03-07 15:56:35 -05:00
DeeDeeGandRyan Foster f134ea6bff obs-nvenc: Fix lookahead depth value logging
This was logging an intermediate value, rather than the final lookahead
depth value after all calculations. Log the final value instead.

(cherry picked from commit a8a349c805)
2025-03-07 15:56:35 -05:00