Commit Graph

14929 Commits

Author SHA1 Message Date
tfo 000437ff7e decklink: Fix incorrect HDR min mastering luminance value
Update value for
bmdDeckLinkFrameMetadataHDRMinDisplayMasteringLuminance from 0.00001
to 0.0001 to match the documented minimum in the DeckLink SDK Manual.
2025-05-09 14:16:54 -04:00
Alex Luccisano ef3e7b2563 libobs: Add checks to some graphics API functions
A few recently introduced graphics API functions needed for Enhanced
Broadcasting were marked as `GRAPHICS_IMPORT_OPTIONAL`. Add the
proper checks in the wrapper to ensure they are safe on platforms
that do not implement the underlying function.
2025-05-09 13:08:10 -04:00
Dennis Sädtler e474a3723b frontend: Allow 5 multitrack reconnect attempts before re-running GCC 2025-05-07 15:46:50 -04:00
Ed Maste 6204c22853 libobs/util: Fix build on FreeBSD
FreeBSD already implemented os_get_free_size.  Move the new Linux
implementation into the existing not-__FreeBSD__ block.

Fixes: 935613816f ("libobs/util: Update `os_get_free_size()`")
2025-05-07 15:22:24 -04:00
PatTheMav 16216b2e30 frontend: Fix character encoding issue during profile import
The directory name string passed into libobs functions needs to be
converted into a 8-bit-based encoding (e.g., UTF-8) to avoid mangling
of characters and encoding issues particularly on Windows systems which
use UTF-16 for file names.
2025-05-07 14:58:38 -04:00
Dennis Sädtler 33734ef99c libobs: Fall back to main canvas dimensions if group canvas unset 2025-05-07 14:01:15 -04:00
Dennis Sädtler 66f47924ea libobs: Add obs_canvas_rename_source() 2025-05-06 16:07:47 -04:00
jeiea 22c4e11ec8 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.
2025-05-06 14:27:29 -04:00
Service Checker c96366eafb rtmp-services: Remove defunct servers/services 2025-05-06 14:03:33 -04:00
cg2121 d7cce79d7e frontend: Use static_cast when casting from void pointers
Using static_cast is preferred here, as it is safer to use than
reinterpret_cast.
2025-05-05 20:47:10 -04:00
Ryan Foster c86de0587a win-capture: Fix crash if no display is available
If no displays are available, numPath or numMode can be 0, which will
result in a bmalloc(0) call and OBS will crash.
2025-05-05 19:23:36 -04:00
Ryan Foster 720f37046f Revert "obs-ffmpeg: New default AMD encoding settings"
This reverts commit 5a1f622ac1.
2025-05-05 18:52:29 -04:00
Ryan Foster a96de1e5dc Revert "obs-ffmpeg: Add Pre-Analysis checkbox for AMD encoder"
This reverts commit c518f69c84.
2025-05-05 18:52:29 -04:00
Huts, Roman c518f69c84 obs-ffmpeg: Add Pre-Analysis checkbox for AMD encoder 2025-05-05 17:43:00 -04:00
Huts, Roman 5a1f622ac1 obs-ffmpeg: New default AMD encoding settings
# Conflicts:
#	plugins/obs-ffmpeg/texture-amf.cpp
2025-05-05 17:43:00 -04:00
Dennis Sädtler 0552062390 frontend: Allow selecting additional canvases for multitrack 2025-05-05 17:17:20 -04:00
Dennis Sädtler 8117c89b9a frontend: Update multitrack API model
"revision" was defined to be a string in the schema but accepted
integers, this is enforced with the new schema version.
2025-05-05 17:17:20 -04:00
Dennis Sädtler 811072d0fd frontend: Always limit multitrack video encoders to libobs maximum 2025-05-05 17:17:20 -04:00
Dennis Sädtler de7df57ee2 libobs: Raise max number of output encoders to 10 2025-05-05 17:17:20 -04:00
Miha Frangež 1fc94ecde5 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.
2025-05-05 16:54:12 -04:00
Dennis Sädtler f1e44c122c libobs: Improve readability of scene duplication type 2025-05-05 15:19:31 -04:00
cg2121 345fe56b6e frontend: Make sure all QObject subclasses have Q_OBJECT macro
Went through and found all QObject subclasses that didn't have
a Q_OBJECT macro.
2025-05-05 13:10:39 -04:00
tytan652 5ed5863556 libobs: Fix module load in relocatable scenario 2025-05-03 16:34:25 -07:00
jeiea a1c6bae601 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.
2025-05-02 16:59:57 -04:00
jeiea 55673966cf 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.
2025-05-02 16:59:57 -04:00
Dennis Sädtler 8441c04c73 frontend: Add frontend API canvas methods 2025-05-02 14:35:22 -04:00
Dennis Sädtler 368185019e frontend: Add support loading/saving additional canvases 2025-05-02 14:35:22 -04:00
Dennis Sädtler afd7619c98 frontend: Add OBS::Canvas class 2025-05-02 14:35:22 -04:00
cg2121 47360a92c5 frontend: Use Q_OBJECT macro for BrowserDock
This is needed as the BrowserDock is a QObject.
2025-05-01 16:01:14 -04:00
Sergio Garcia Murillo 2b56ccfeb5 rtmp-services: Add Enhanced Streaming support for Dolby Millicast 2025-05-01 14:05:44 -04:00
PatTheMav 3311a7105e libobs: Mark data path modification functions as deprecated 2025-04-30 15:14:57 -04:00
gxalpha 281f8137f5 UI,libobs,obs-outputs: Remove HAVE_OBSCONFIG_H ifdefs
With the removal of all legacy code paths, obsconfig.h always exists and
the compile definition always gets set. As such, it's no longer
necessary to check for it.

As removing the definition itself could be seen as a breaking change,
this simply moves the definition to pc.in and cmake.in files for now to
preserve the value for plugins that might expect this to be set. We may
remove the definition entirely in a later release.
2025-04-30 13:05:35 -04:00
Ruwen Hahn 9bba6e52ff frontend: Allow Network Optimizations with multitrack video
"Enable network optimizations" in the Advanced Settings is referred to
as `NewSocketLoop` in the code. This feature was incompatible with
multitrack video but now works properly. Remove it from the
incompatible settings check.
2025-04-30 12:27:03 -04:00
Ruwen Hahn 0576182f96 obs-outputs: Include all audio encoder bitrates
When network optimizations are enabled, `new_socket_loop` is enabled,
and an accurate total output bitrate is required. Include the audio
bitrates in this calculation.
2025-04-30 12:27:03 -04:00
Alex Luccisano 6bb9019aff frontend: Allow Stream Delay with multitrack video
Remove Stream Delay from the incompatible settings list for multitrack
video as it works properly now.
2025-04-29 13:50:57 -04:00
jsnkan 0fc69fb913 obs-outputs: Correct mp4_output_destory to mp4_output_destroy 2025-04-28 18:16:09 -04:00
Yuri Victorovich b540c47b8f linux-v4l2: Add support for virtual camera on non-Linux environments 2025-04-28 16:41:39 -04:00
Warchamp7 99d7d134a7 frontend: Clip source names when dock too small 2025-04-28 16:18:07 -04:00
Penwywern 63260148df libobs: Use absolute path for install prefix module load 2025-04-28 15:04:27 -04:00
Tom Haffenden b8f7c77937 win-capture: Update hooked state before unhooked signal
If the get_hooked procedure is called during the unhooked signal
the source would still report that it's hooked because gc->capturing
hasn't been updated yet.
2025-04-28 14:44:22 -04:00
Norihiro Kamae 220b0ec649 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.
2025-04-28 14:26:07 -04:00
Ilya Melamed a19945b53a libobs: Fix setting non-0 order on only scene item 2025-04-28 13:50:01 -04:00
tytan652 1bf84a6901 cmake: Replace Xcb CMake finders with ECM 2025-04-28 13:30:26 -04:00
tytan652 190389ec11 cmake: Replace Wayland CMake finder with ECM 2025-04-28 13:30:26 -04:00
tytan652 e53293a785 cmake: Use Extra CMake Modules on Linux 2025-04-28 13:30:26 -04:00
Norihiro Kamae 1643470a85 frontend: Add dedicated translation of remaining time 2025-04-28 13:06:03 -04:00
PatTheMav 9889fcdfcc cmake: Group blake2 targets under same directory for IDEs
The blake2_static target has no specific FOLDER property set and thus
would appear ungrouped in Visual Studio's Solution Explorer.

With this change both the default blake2 target as well as
blake2_static appear in their own "blake2" subdirectory.
2025-04-25 20:06:41 -04:00
PatTheMav 8bfc28f851 frontend: Use default location for user settings as fallback
When a unique path is set up as the location for user settings,
profiles, or scene collections, migrating the files from one computer
to another will lead to confusing error messages as the original paths
might not exist on the new machine.

The default directories for configuration files are already created by
this point, so using those paths as a fallback should enable OBS Studio
to also create the corresponding fallback settings files.
2025-04-25 19:40:24 -04:00
Norihiro Kamae 5c448452cf libobs/util: Prevent locking mutex in child process when checking Qt5
The frontend has set a log handler which locks the mutex in `LogString`.
If `os_dlopen` fails in the child process, it calls `blog` and attempted
to lock the mutex that may have already been locked by another thread
before `fork()`. This change prevents the child process from locking the
mutex, resolving the potential deadlock.
2025-04-25 19:10:34 -04:00
Alex Luccisano 4efc6bf0d8 build-aux: Fix incorrect HEVC vertical resolution on AMD VCN
AMD VCN uses a different surface alignment compared to other GPUs for
encoding, which required an upstream fix in Mesa, libva, FFmpeg, and
the VCN firmware.

This commit adds the FFmpeg patches to the flatpak build of OBS which
is currently using FFmpeg version n7.1, however the patches were applied
upstream after that release. libva API version 1.21 or higher is also
required, which is satisfied by using KDE runtime 6.8.

The incorrect 1920x1088 HEVC output resolution (instead of 1920x1080)
resulted in streaming disconnects for Twitch Enhanced Broadcsating
Linux users. Local file recording when using AMD VAAPI HEVC also
outputs 1088 instead of 1080. This commit fixes both cases.

Please refer to [1], [2], and [3] for context. The patches are taken
from [2].

Note that the fix is applicable to flatpak builds only. Standalone and
Debian package builds depend on the host library versions and will
still have the problem until a version of FFmpeg with the fix is used.

[1]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11222
[2]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13168
[3]: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10985
2025-04-25 18:14:23 -04:00