Commit Graph

14757 Commits

Author SHA1 Message Date
Bleuzen 05c2f56853 obs-nvenc: Correct max target quality for AV1 2025-02-07 15:30:00 -05:00
Ryan Foster e471d3109b cmake: Specify NOMINMAX all the time on Windows
This prevents the Windows headers from defining min/max macros.

Use std::min and std::max.

Modifies deps, frontend, libobs-d3d11, libobs-winrt, decklink, obs-vst,
and win-dshow.
2025-02-07 14:52:24 -05:00
Doğukan Korkmaztürk c2b4823075 linux-pipewire: Add explicit sync support
It is possible for OBS to receive incomplete frames from the compositor
if the graphics drivers in use do not support implicit synchronization.
The compositors usually try to workaround this issue by waiting all
render operations to complete before sharing frames with OBS. However,
this has performance implications for the compositors. Similarly, OBS
should also make sure that all the rendering operations sourcing the
received buffer are complete before returning the respective pw_buffer
back to the compositor, or it would risk the image it is working on
getting overwritten without some type of synchronization.

This change leverages PipeWire's ability to share DRM syncobj fds to
implement an explicit synchronization solution to solve the problem
described above. The usage of these DRM syncobjs is negotiated with the
compositor that OBS is running on. So OBS can still work even if the
compositor does not support explicit synchronization.

Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
2025-02-05 16:20:15 -05:00
Doğukan Korkmaztürk 68ca91b21d libobs,libobs-opengl: Add gs_sync_t
This change adds a new type named gs_sync_t and related functions to X11
and Wayland EGL backends to abstract DRM syncobjs and their various
uses.

Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
2025-02-05 16:20:15 -05:00
Doğukan Korkmaztürk b30b8565aa deps/glad: Add EGL_ANDROID_native_fence_sync
This extension is needed for using explicit sync in the PipeWire plugin.

Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
2025-02-05 16:20:15 -05:00
Chris (Flaeri) 08f2374b44 frontend: Round up Resize Output (Source Size)
This is to ensure usable resolutions, and conform to existing paradigms.
See https://github.com/obsproject/obs-studio/commit/21ec81ebcc43e465160fcc880e4088c64d407a23
2025-02-05 15:50:56 -05:00
cg2121 4e8b131509 frontend: Use OBSBasic::Get() in all places
This reduces duplicated code when getting the OBSBasic context.
2025-02-05 15:15:52 -05:00
gxalpha a562b8bf52 frontend: Add Input Monitoring to permissions dialog
The previous commit switched global hotkeys from requiring Accessibility
to just Input Monitoring permissions. This adds the matching changes to
the permissions dialog, also accounting for the fact that Accessibility
includes Input Monitoring.
2025-02-05 14:33:06 -05:00
gxalpha ba84bea46d libobs: Rewrite macOS Hotkeys to use CGEventTap
Using CGEventTapCreate instead of addGlobalMonitorForEventsMatchingMask
to listen to global hotkeys has the advantage of tighter control over
what permissions we need. Since we only listen to and do not modify the
event, it is enough to have "Input Monitoring" instead of the full
"Accessibility" (which would allow modifying the event after catching
it).
2025-02-05 14:33:06 -05:00
Yann Salmon 9b97d48573 cmake: Fix regexp to detect installed FFmpeg version
The regexp was not tolerating a + sign is the version string,
causing configuration to fail on Ubuntu 24.04 when the installed
version is 6.1.1-3ubuntu5+esm2.
2025-02-05 12:22:36 -05:00
pkv d1249cd993 nv-filters: Remove CUDA RT functions
We don't use CUDA RT functions anymore.
So this commit removes their loading from the CUDA RT DLL.
This also fixes a crash when loading different versions of CUDA RT when
the SDK is updated [1].

[1] https://github.com/obsproject/obs-studio/issues/11813

Signed-off-by: pkv <pkv@obsproject.com>
2025-02-05 11:56:51 -05:00
pkv 417eddfc9d nv-filters: Update SDK version targeted
This updates checks against current SDK redist versions:
- 0.7.6 (Video Effects)
- 1.6.1.2 (Audio Effects)

Users will receive a warning if their redist versions are lower than
these.

Signed-off-by: pkv <pkv@obsproject.com>
2025-02-05 11:56:51 -05:00
Ryan Foster 265239d417 CI: Fix typo in setup-macos-codesigning action 2025-02-04 09:26:23 -05:00
Ryan Foster 6f115df3af 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.
2025-01-31 17:25:33 -05:00
cg2121 43be123b73 frontend: Simplify how projectors are saved/loaded
This removes unnecessary code when loading and saving projectors.
2025-01-31 12:20:33 -05:00
cg2121 708c5f7426 frontend: Remove unnecessary projector variable
This variable is not needed, as there is a screen() function.
2025-01-30 15:16:24 -05:00
prgmitchell 84a5662df8 frontend: Log streaming service recommended maximums
Log the maximum recommended audio and video bitrate when the
user ticks the "Ignore streaming service setting recommendations" box.
2025-01-30 13:21:06 -05:00
Sean DuBois 4162ca7169 obs-webrtc: Enable PacingHandler 2025-01-29 17:41:49 -05:00
Dennis Sädtler 86c2094a1e mac-videotoolbox: Add Spatial AQ option (macOS 15) 2025-01-29 17:01:55 -05:00
Dennis Sädtler b131f59e7f frontend: Support preferred video format/space/range in GoLiveApi
Also sets Rec. 709/limited defaults for multitrack output.
2025-01-29 15:01:19 -05:00
Dennis Sädtler 2de0037e40 libobs: Support format/space/range conversion in encoder GPU scaling 2025-01-29 15:01:19 -05:00
Dennis Sädtler 0d6cf088ef libobs: Deprecate obs_(nv12|p010)_tex_active() 2025-01-29 15:01:19 -05:00
Dennis Sädtler 3f281fef23 obs-qsv11: Migrate to obs_encoder_video_tex_active() 2025-01-29 15:01:19 -05:00
Alex Luccisano e8c0e35fb4 obs-ffmpeg: Use obs_encoder_video_tex_active() for AMF
Use the recently added `obs_encoder_video_tex_active()` API
for AMD AMF-based encoders, similar to the recent commit for
obs-nvenc. This allows the OBS canvas to use non-NV12 pixel
formats (such as I444) while the multitrack video encoders will
use NV12 or P010 textures converted using the GPU.
2025-01-29 15:01:19 -05:00
Dennis Sädtler e6edfe5229 obs-nvenc: Migrate to obs_encoder_video_tex_active()
Unlike obs_nv12/p010_tex_active() this accurately reflects the texture
availability in the mix associated with the encoder.
2025-01-29 15:01:19 -05:00
Dennis Sädtler 3b1a66f632 libobs: Add obs_encoder_video_tex_active() 2025-01-29 15:01:19 -05:00
Ruwen Hahn 9e3d0eb31b frontend: Add audio properties to GetClientConfiguration request 2025-01-29 14:37:19 -05:00
Alex Luccisano c67ea47406 libos: Add obs_get_audio_info2()
The `obs_audio_info2` struct is used in libobs
for resetting audio, however there is a need for
obtaining the additional fields present in the struct
beyond `obs_audio_info`.
2025-01-29 14:37:19 -05:00
jpark37 689c0094b8 libobs: plugins: Use MAD for sRGB functions
Also fix stray comment about pow behavior.
2025-01-29 14:11:34 -05:00
Norihiro Kamae 34615760ac aja: Remove holding source settings
The API `obs_source_update` accept NULL for the argument `settings` and
it will just call the `update` callback without changing the settings.
2025-01-29 13:39:58 -05:00
Dennis Sädtler 7e24a6093c frontend: Restart multitrack output if stream key has become invalid 2025-01-29 13:16:47 -05:00
Dennis Sädtler d026c871e0 frontend: Remove multitrack deactivate handlers
With the encoder reference counting fixups this is no longer required.
2025-01-29 13:16:47 -05:00
derrod 6b449c3a0b libobs: Only modify raw_active counter if (dis-)connection succeeded 2025-01-28 17:36:51 -05:00
derrod eda882dd0a libobs: Add video_output_disconnect2() 2025-01-28 17:36:51 -05:00
jcm 83934acb44 obs-scripting: Fix macOS Homebrew Python loading 2025-01-28 15:07:38 -05:00
derrod fb56e06edd obs-outputs: Make MP4 output buffer/chunk size configurable 2025-01-28 14:37:28 -05:00
gxalpha 3911f11306 .gitignore: Remove UI exclusion
Since the frontend refactor, the UI directory no longer exists. Let's
remove its exception in the .gitignore file.
2025-01-27 17:06:18 -05:00
cg2121 449755ee6d frontend: Move media control dynamic properties to ui file
This moves the dynamic properties for the media control buttons
from the cpp file to the ui file.
2025-01-27 16:36:08 -05:00
tt2468 9f4e0c52e1 obs-outputs: Attempt to generate path if one is not specified
Changes the MP4 muxer to attempt to use the path generation logic if
a path is not explicitly specified. This allows MP4 muxer outputs to
be configured with file splitting, without requiring both the `path`
and `directory`+`format` fields to be specified (saving effort on
the side of developers of custom plugins).
2025-01-27 16:02:53 -05:00
tytan652 ecb0381b8e obs-ffmpeg: Fix deprecation with FFmpeg 7.1 2025-01-24 17:38:24 -05:00
Norihiro Kamae 099bc26bd6 libobs/util: Fix tv_nsec becoming 1000000000 in os_event_timedwait 2025-01-24 15:28:57 -05:00
David Rosca 173487afaf obs-ffmpeg: Add QVBR rate control for VA-API 2025-01-24 15:04:50 -05:00
PatTheMav 45a89ab199 cmake: Update macOS development version requirements
To be able to make use of macOS 15 features, development must use the
macOS 15 SDK and in turn Xcode 16.0 (or more recent).
2025-01-23 16:43:37 -05:00
PatTheMav 7f04039afe CI: Update macOS workflows to macOS 15 runners with Xcode 16.1 2025-01-23 16:43:37 -05:00
Ryan Foster 0014f9fa18 libobs: Update version to 31.0.1 2025-01-17 18:40:47 -05:00
PatTheMav 1baa4619e4 frontend: Use filename stem as fallback value on empty collection name
If - for some reason - the name in a scene collection is empty (or
the key doesn't even exist), use the filename stem as a fallback name.

This ensures that the scene collection entry in the cache has a valid
non-empty name.

Using an std::string allows the use of its "empty" method to check for
this otherwise invalid state of the collection data.
2025-01-17 17:32:20 -05:00
PatTheMav 552c19cab2 frontend: Prevent creation of scene collections with empty name
Empty names for scene collections are not allowed, but this constraint
is only enforced by UI code during text input.

Thus frontend API users are able to create valid scene collections with
empty names which will lead to later possible crashes as the scene
collection is malformed.

As the frontend API uses the related function CreateNewSceneCollection
which handles exceptions by this method, no crashes should occur when
an empty string is provided by an API caller.
2025-01-17 17:32:20 -05:00
gxalpha 79f5ba0e1d cmake: Turn off camera reaction by default on macOS 14.4 and later
The reaction effects that macOS adds by default are confusing to users
as they're turned on by default and users don't know where they come
from or where to turn them off. Setting this flag in the apps Info.plist
prevents them from being turned on by default. The macOS UI makes it
very obvious to the user where they can turn them on should they wish to
do so.
2025-01-16 16:33:59 -05:00
Kurt Kartaltepe 22f222600a libobs: Fix underlinking by adding libx11
We directly depend on libx11 for various operations in obs-nix-x11.c,
not just xcb. So be sure to link it in too.

fixes #11667
2025-01-16 15:43:48 -05:00
derrod 41a38f742c image-source: Fix slideshow stopping on last file in random mode 2025-01-16 15:13:50 -05:00