Commit graph

4693 commits

Author SHA1 Message Date
Ryan Foster c25f0592ae obs-ffmpeg: Use 2 tile columns in NVENC AV1 for 4K+
When resolution is 4K or higher, use 2 tile columns for NVENC AV1.
2024-01-23 17:31:31 -05:00
David Rosca 5d0323ea0a obs-ffmpeg: Set better VA-API defaults
Use High profile for H264 and auto level with all codecs.
Remove setting default value for unused "rendermode" option.
2024-01-23 15:19:44 -05:00
David Rosca 2dbd47441f obs-ffmpeg: Add AV1 support for VA-API 2024-01-23 15:19:44 -05:00
Albert 358ec7bf53
rtmp-services: Remove StreamVi (#10130) 2024-01-23 13:07:42 -06:00
Ryan Foster 4fbbae59e3 CI: Update deps to 2024-01-18 release
To avoid a compiler error, this commit also bumps the configured NVENC
version to match the updated version in the deps package.

Notable changes:
 * deps.ffmpeg: Update zlib to 1.3
 * deps.ffmpeg: Update SVT-AV1 to 1.8.0
 * deps.ffmpeg: Update aom to 3.8.0
 * deps.ffmpeg: Update libsrt to 1.5.3
 * deps.ffmpeg: Update nv-codec-headers to 12.1.14.0
 * deps.ffmpeg: Update AMF to 1.4.32
 * deps.ffmpeg: Update FFmpeg to 6.1
 * deps.macos: Update LuaJIT to 2.1 c525bcb902
 * deps.macos: Update FreeType to 2.13.2
 * deps.macos: Update Asio to 1.29.0
 * deps.macos: Update nlohmann JSON to 3.11.3
 * deps.macos: Update Sparkle to 2.5.2
 * deps.macos: Update Syphon Framework to 5.0 39e31383ff
 * deps.windows: Update FreeType to 2.13.2
 * deps.windows: Update curl to 8.5.0
 * deps.windows: Update LuaJIT to 2.1 c525bcb902
 * deps.windows: Update Asio to 1.29.0
 * deps.windows: Update nlohmann JSON to 3.11.3
 * deps.windows: Update VPL to v2.10.1
 * deps.qt: Update Qt6 to 6.6.1 for Windows
 * deps.qt: Update Qt6 to 6.6.1 for macOS
2024-01-22 15:31:09 -05:00
rhutsAMD ab0b0cb7e2 obs-ffmpeg: Default the number of B-frames to 3 2024-01-22 09:48:12 -05:00
rhutsAMD e657e62c29 obs-ffmpeg: Fix issue with B-frames introducing motion blur
If a user sets both AdaptiveMiniGOP=true and EnablePreAnalysis=true
in the AMF/FFmpeg options field, AMF will adaptively insert
B-pictures, and no longer uses the fixed B pattern.

For a fixed B-frames pattern, it is expected that increasing B-frames
can cause a quality drop for certain content such as with high motion.
AdaptiveMiniGOP is recommended when using B-frames to improve the
quality in such cases. AdaptiveMiniGOP is dependent on PreAnalysis
which means that trying to enable it without having PreAnalysis turned
ON will have no negative effect (AdaptiveMiniGOP won't be enabled).
2024-01-22 09:48:12 -05:00
Lain 6cb1f5451e
Merge pull request #9943 from derrod/its-a-deque
Rename `circlebuf` to `deque`
2024-01-20 17:47:01 -06:00
PatTheMav e284a79b48 mac-avcapture: Update plugin to ObjC and modern APIs
Marks old AVFoundation capture source as deprecated.
2024-01-19 16:56:10 -05:00
derrod 229b7b2b03 image-source: Migrate slideshow mk2 to deque 2024-01-16 16:45:10 +01:00
derrod 9f306fa832 obs-outputs: Replace circlebuf with deque 2024-01-16 16:45:10 +01:00
derrod 8ec91bab04 obs-filters: Replace circlebuf with deque 2024-01-16 16:45:10 +01:00
derrod f083d14143 obs-ffmpeg: Replace circlebuf with deque 2024-01-16 16:45:10 +01:00
Lain 1e09f5a543
Merge pull request #10039 from derrod/roi-libobs
libobs/plugins: Add region of interest (ROI) encoder feature
2024-01-13 18:30:31 -06:00
Ruwen Hahn 8fb32c37ee obs-ffmpeg: Add disable_scenecut option for NVENC
This is functionally the same as x264's `scenecut=0` option
2024-01-13 17:49:34 -06:00
James Hurley 7fe5cb7dad librtmp: Add missing extended timestamp in Type 3 chunks
According to https://rtmp.veriskope.com/docs/spec/#5313-extended-timestamp
extended timestamps need to be present in Type 3 chunks
(`RTMP_PACKET_SIZE_MINIMUM`) if the previous chunk also included an
extended timestamp
2024-01-13 17:47:16 -06:00
Georges Basile Stavracas Neto 03358961aa linux-pipewire: Pass framerate and resolution at construction
This allows the stream negotiation to set the camera values right
from the start.
2024-01-11 09:57:08 -03:00
Wim Taymans bc02779529 linux-pipewire: Handle camera hotplug
Rebuild the camera list when a camera was added or removed.
2024-01-11 09:57:08 -03:00
Wim Taymans 968d7259bf linux-pipewire: Use spa_strerror to convert SPA errors to string
g_strerror only works for errno values, SPA errors are negative errno
values.
2024-01-11 09:57:08 -03:00
Wim Taymans a683c5f3ce linux-pipewire: Add float property support 2024-01-11 09:57:08 -03:00
Wim Taymans a44228ef50 linux-pipewire: Add resolution and framerate list contents
Trigger a renegotiation of the camera stream when either the
resolution or the framerate change.
2024-01-11 09:57:08 -03:00
Wim Taymans 12eba3f5d7 linux-pipewire: Handle property changes 2024-01-11 09:57:08 -03:00
Wim Taymans 07cbbe9bec linux-pipewire: Collect device controls
Collect the controls on the node. Enumerate the controls as
properties.

Co-authored-by: Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>
2024-01-11 09:57:08 -03:00
Wim Taymans e6d98ebfbb linux-pipewire: Start camera only after we find the device
Wait with starting the camera until we find the device in the
registry. Avoids cases where the camera stays unlinked.
2024-01-11 09:57:08 -03:00
Georges Basile Stavracas Neto 364323e445 linux-pipewire: Factor out formats list into a file
This will help share these formats with the upcoming Camera portal
code.
2024-01-11 09:57:08 -03:00
Wim Taymans 7f765cdb4c linux-pipewire: Add NV12 support
List it in addition to YUV formats.

Co-authored-by: Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>
2024-01-11 09:57:08 -03:00
Georges Basile Stavracas Neto c1b3831ba2 linux-pipewire: Add PipeWire-based camera source
This plugin adds a camera source for capture devices available
via PipeWire using the Camera portal.
2024-01-11 09:57:08 -03:00
Georges Basile Stavracas Neto 261cb91c62 linux-pipewire: Rename a function
Make it a bit more semantic, and matching of PipeWire API.
2024-01-11 09:57:08 -03:00
Georges Basile Stavracas Neto 56d3720ffa linux-pipewire: Add obs_pipewire_roundtrip()
Generalize the async server roundtrip wait so that future consumers
can, for example, wait for all devices to be listed before acting
on the registry.
2024-01-11 09:57:08 -03:00
Georges Basile Stavracas Neto 6499d01bec linux-pipewire: Allow passing registry events on creation
This will allow consumers of obs_pipewire to handle the device
registry themselves. This is not useful for the screencast code
since there's always only one node in the registry, but it will
be used by the camera and audio code to list hardware devices.
2024-01-11 09:57:08 -03:00
Rodney 0510d673d3 obs-qsv11: Add ROI support 2024-01-11 13:36:35 +01:00
Rodney 730ab5e6d1 obs-ffmpeg: Add ROI support to AMF 2024-01-11 13:36:35 +01:00
Rodney 5e9b2d6322 obs-ffmpeg: Add ROI support for native NVENC 2024-01-11 13:36:35 +01:00
Rodney 6b1f61949b obs-x264: Implement ROI feature 2024-01-11 13:36:35 +01:00
Lain a4f2290026 image-source: Rework slideshow (slideshow mk2)
Makes it so that slideshows can have as many files as desired, and
lazily decodes image data in a separate thread to prevent decoding from
stalling the video thread.
2024-01-10 20:45:36 -06:00
gxalpha 0aaf2e518b mac-capture: Remove macOS 14 ifdef and custom CGDisplayStream header
ec9809bd43 increased the minimum macOS SDK
to 14.2, meaning that the ifdef (and as a result the custom header) is
no longer needed.
2024-01-08 20:40:33 -05:00
Ryan Foster cc25a14173 obs-ffmpeg: Fix incorrect CMake list syntax 2024-01-08 19:49:04 -05:00
derrod 24e59d1621 obs-ffmpeg: Fix NVENC compat hack ternary being inverted 2024-01-07 02:29:00 +01:00
pkv 99ae6eb2e9 obs-ffmpeg: Support multiple audio tracks (mpegts)
This adds support for multiple audio tracks for the new mpegts output.

Signed-off-by: pkv <pkv@obsproject.com>
2024-01-06 18:42:54 -06:00
derrod 4a8e8bb1bd obs-ffmpeg: Only use NVENC compatibility hack if necessary 2024-01-06 18:38:43 -06:00
PatTheMav 2457d83e0f mac-capture: Update capture to include menu bar and child windows
macOS 14.2 changed internal defaults of SCK requiring the inclusion
of the menu bar and child windows to be enabled explicitly.

This will have a slight negative impact on capture performance but is
required to restore behavior of prior macOS versions.
2024-01-06 18:09:06 -06:00
jcm 354150a992 mac-virtualcam: Reduce excessive polling for new sample buffers 2024-01-06 17:43:42 -06:00
Penwywern 7abbfb1c82 vlc-video: Fix play_pause to respect boolean 2024-01-06 17:22:27 -06:00
Rodney 051d227b51 obs-ffmpeg: Remove Windows 7 NVENC fallback 2024-01-06 17:20:26 -06:00
Rodney 3594017fac obs-ffmpeg: Remove Ubuntu 20.04 NVENC fallback
Effectively reverts dd26fe4f8a
2024-01-06 17:20:26 -06:00
tt2468 8496d58a2c rtmp-services: Add IRLToolkit Frankfurt ingest 2024-01-06 17:08:40 -06:00
nquah 14db1489e0 obs-outputs: Enable HDR for HEVC over RTMP
Removes flag guard to enable HDR streaming for HEVC over enhanced-RTMP.
This functionality is currently only supported by YouTube. See
github.com/veovera/enhanced-rtmp for the enhanced-RTMP spec.
2024-01-03 18:01:26 -05:00
nquah f1f5b34d7b obs-outputs: Switch RTMP color metadata order
Sends color metadata before the video header for RTMP streams. Only
applicable to HDR RTMP streams. Ensures the server sees the correctly
configured color metadata first, in cases where the decoder config in
the video header has incorrect or missing color information. Mitigates a
bug that users with outdated AMD drivers may encounter.
2024-01-03 16:31:58 -05:00
Ryan Foster 0e50077948 obs-websocket: Update version to 5.3.5
Update CMake in preparation for Linux CMake update.
2023-12-22 16:44:55 -05:00
Ryan Foster f348ab458d obs-browser: Update version to 2.22.3
1f9b458 - cmake: Update formatting and use find_package for Qt6
fde998c - cmake: Fix regression in 1f9b458 for legacy Windows build
2023-12-22 16:44:00 -05:00
PatTheMav 5697b085da mac-capture: Switch AudioUnits to use canonical format on output bus 2023-12-19 18:33:53 -05:00
Robert Wittams 73e9561633 mac-capture: Allow selection of channels on core audio devices 2023-12-19 18:33:53 -05:00
PatTheMav 7dbde70de1 cmake: Remove support for generators besides Xcode on macOS 2023-12-19 17:59:44 -05:00
PatTheMav 087353eb3f aja: Add shared interface library for plugin and frontend-plugin 2023-12-19 17:59:44 -05:00
PatTheMav eae5cc1e38 plugins: Update CMake formatting with manual format choices 2023-12-19 17:59:44 -05:00
PatTheMav 9ae47a7937 cmake: Update FFmpeg find package to use explicit version 2023-12-19 17:59:44 -05:00
PatTheMav 8135085a23 cmake: Replace custom Qt discovery function with CMake default
find_qt was necessary during the transitional period between Qt5 and
Qt6. With Qt6 being the only supported Qt version (for open source) for
the time being, code complexity can be reduced for easier maintenance.
2023-12-19 17:59:44 -05:00
Service Checker ebed24c767 rtmp-services: Remove defunct servers/services 2023-12-19 02:32:08 +01:00
jpark37 09ffae07d8 win-capture: Toggle premultiplied alpha for games
Keep straight alpha as default for VTuber applications.
2023-12-16 17:15:18 -06:00
jpark37 ea9df85512 graphics-hook: Fix DXGI ref leak for D3D12 capture
Create ID3D11Resource dynamically to avoid reference inflation.
2023-12-16 17:03:43 -06:00
Georges Basile Stavracas Neto 67c1202849 linux-pipewire: Add screencast cursor_visible prop
This commit adds the screencast-specific 'cursor_visible' field
in an anonymous struct within the constructor struct.

This slightly improves the connection code by properly treating
construction-time information in a constructor struct. It allows
removing the extra function call that sets cursor visibility from
the Screencast portal code.

Admittedly that's not much, but again, this will be an important
distinction when introducing the Camera portal code, since some
camera properties will need to trigger renegotiation.
2023-12-14 10:20:55 -03:00
Georges Basile Stavracas Neto a1db8e5bde linux-pipewire: Factor out connection props in a struct
So that we can expand the number of construct-time connection
properties without changing the function signature every time.
This is mostly an ergonomic change for now, but it'll be very
useful when introducing the Camera portal code.
2023-12-14 10:20:55 -03:00
Georges Basile Stavracas Neto afab71aa80 linux-pipewire: Standardize argument names
Always name obs_pipewire_stream pointers 'obs_pw_stream', so as not
to confuse with obs_pipewire pointers which are called 'obs_pw'.
2023-12-14 10:20:55 -03:00
derrod ebd6eec7f6 win-wasapi: Make reroute target a weak reference 2023-12-13 22:10:53 +01:00
Norihiro Kamae 70aa1e903f win-wasapi: Initialize a pointer reroute_target
The pointer `reroute_target` was never initialized if the reroute was
not set but read during processing audio.
2023-12-13 16:15:09 +01:00
derrod 4b28631a95 win-capture: Add audio capture option to window/game capture 2023-12-12 00:05:47 +01:00
derrod 48f9969df3 win-wasapi: Add procedure to reroute audio output 2023-12-12 00:05:47 +01:00
jpark37 263e027938 graphics-hook: Remove unused member variables 2023-12-10 04:45:33 -06:00
jpark37 395ab0fbf5 graphics-hook: Use ID3DDestructionNotifier
Cleaner and more correct than hooking IUnknown::Release.
2023-12-10 04:45:33 -06:00
Richard Stanway 87c536ebe0 image-source: Use mutex when accessing slideshow
While adding or updating files locked this mutex, the graphics thread
did not. As the update operation is not atomic, the graphics thread
might access the darray in the middle of an update, resulting in access
to freed memory (crash) if the files were updated at the same time.
2023-12-10 01:39:58 +01:00
PatTheMav be7ac828de mac-capture: Fix ScreenCaptureKit deadlock when using nil display ID
In some scenarios ScreenCaptureKit will not call our completion handler
when an internal ReplayKit error occurred. This seems to be more common
when a <nil> display id is provided as the content filter for
ScreenCaptureKit.

The issue was reported to Apple as FB13455947, but it is good practice
for us to check for an invalid display ID before even attempting to start
a capture stream.
2023-12-09 17:34:33 -06:00
xlinshan 542cb876dc obs-vst: Fix incorrect VST window size on HiDPI display
On Windows, the VST plugins' window sizes are rendered larger than the
actual content on displays that have UI scale factor. The sizes are
larger by the scale factor, for example, 100x100 content will have a
200x200 window on a 200% scaled screen, and 150x150 on a 150% scaled
screen. This change adjust the window size to fit the content size.
2023-12-09 11:30:39 +11:00
PatTheMav e27b013d47 aja: Disable deprecated declarations warnings on macOS and Linux
Deprecation warnings have been investigated and have been deemed
non-malicious for the time being.
2023-12-06 17:27:12 +01:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Ryan Foster 689daf57dc obs-websocket: Update version to 5.3.4
Fix a crash on shutdown.
2023-12-05 14:20:29 -05:00
Ryan Foster eca9cd2bc4 obs-browser: Update version to 2.23.1
36508a9 - Don't allow browser docks to arbitrarily close OBS
f877e55 - Fix handling OBS_FRONTEND_EVENT_TRANSITION_CHANGED
2d374a3 - Fix handling frontend JS events
2023-12-05 14:18:42 -05:00
prgmitchell 0f498133a4 win-wasapi: Ignore timestamp errors
Only log packets with timestamp errors rather than resetting the device.
2023-12-04 02:25:43 -06:00
PatTheMav 63a131ce22 mac-videotoolbox: Fix handling of unsuccessful encoder creation
When an encoder was not created in create_encoder, the appropriate
OSStatus value is returned but the calling code expects a boolean
return value.

The negative OSStatus code sent on error is thus interpreted as a
truthy value and the error is not detected. Changing the call signature
to correctly return an OSStatus (and change the caller to detect
error situations) fixes this.
2023-12-02 17:49:24 -06:00
derrod 859321b767 obs-ffmpeg: Add missing header to CMakeLists 2023-12-02 17:48:12 -06:00
Stephen Seo 758b47d4ed obs-ffmpeg: Use new side-data FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

This commit replaces usage of `av_stream_add_side_data(...)` with
`av_packet_side_data_add(...)`, as the former was deprecated in favor of
the latter.

The FFmpeg commit that deprecated `av_stream_add_side_data(...)` is [1].

The FFmpeg commit that introduced `av_packet_side_data_add(...)` is [2].

Note that the deprecation commit is after the new API function. The
commit in between [3] appears to be changes that migrates to the usage
of the new API function.

[1]: avformat/avformat: use the side data from AVStream.codecpar
5432d2aaca

[2]: avcodec/packet: add generic side data helpers
74279227dd

[3]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
2023-12-02 17:43:18 -06:00
Ryan Foster 87c88ef983 obs-ffmpeg: Initialize stopping member variable to false
If an output has already stopped, but its StopRecording function was
called again, then ffmpeg_mux_stop would be called and set stopping to
true. On the next output start, OBS would output 1 frame, see that
stopping is true, and then stop the output.

This was most easily observed using an Output Timer to record prior to
93f5b45be8.

Initialize stopping to false with the other state flags to ensure that
the output has a clean starting state.
2023-11-25 21:07:56 -06:00
PatTheMav 7ae1c35fcb obs-filters: Remove LTCG linker flag for SpeexDSP builds on Windows
Flag was added in CMake 2.0 update and is incompatible with incremental
linking enabled by default for Debug configuration (MSVC default).

The original error that necessitates adding LTCG is not present with
current obs-deps anymore, so remove it instead and disable the
hard-coded default library directive in Debug configuration.
2023-11-16 23:24:41 +01:00
Kurt Kartaltepe ea1d022c20 linux-pipewire: Ensure number of dmabufs is zero initialized
We use a size_t that can be 64bit while EGL uses 32bit for the
underlying value. Writes from our graphics function can leave high bits
uninitialized and cause iteration of the format list to overlfow.

fixes #9844
2023-11-12 13:32:24 -03:00
jpark37 35f8481498 obs-filters: Add maxRGB tonemapper for SDR
Preserves saturation better than our Reinhard.
2023-11-11 17:50:34 -06:00
tt2468 54d692ada0 rtmp-services: Update IRLToolkit service
- Adds Dallas and Miami ingests
- Rotterdam PoP was moved to Amsterdam
- Use RTMPS for all servers
2023-11-12 00:36:00 +01:00
jcm a89719a2d2 mac-capture: Add handling for nil target window 2023-11-11 17:06:25 -06:00
Lain 6b5404899a win-capture: Update graphics hook version
Ensures that the newer hook version is copied when installed
2023-11-09 00:13:25 -06:00
Seth Williams aa1f2dea84 win-capture: Fix Vulkan race condition
This race condition is caused when one thread creates a swap chain,
which calls OBS_CreateSwapchainKHR, at the same time another thread
calls OBS_CreateImageView.

OBS_CreateSwapchainKHR allocates swap data, publishes this into the
data->swaps linked list, then initializes it. Meanwhile,
OBS_CreateImageView is iterating the swaps linked list, to see if the
image matches any swap chain images. Due to the order in
OBS_CreateSwapchainKHR, there's no guarantee this data is initialized
so it often ends up running out of bounds on the swap_images array.

The fix is simply to defer the swap data publish to after init.
2023-11-07 23:48:34 -06:00
Kevin Wang 1a86ff5511 obs-browser: Add support for more events 2023-11-07 01:49:51 -06:00
tt2468 1d5d4b29e7 win-wasapi: Handle changes to the default monitoring device
Splits the WASAPINotify class out of win-wasapi.cpp and makes it a
shared object in the plugin, then also creates a callback to reset
audio monitoring if the default output device changes.
2023-11-07 01:32:12 -06:00
gxalpha 6ed2e13974 mac-videotoolbox: Remove CRF 0 second keyint override
The previous commit sets the default configuration to 2 seconds, meaning
that the 0 second default interval no longer happens per default. If
someone explicitly sets the interval to 0 seconds ("auto"), we should
allow them to do that.
2023-11-04 18:47:52 -05:00
gxalpha 5cd30d6a86 mac-videotoolbox: Set default keyframe interval to 2 seconds
0 seconds means "auto" according to the documentation, but this appears
to be broken in many configurations (more than just CRF mode on Apple
Silicon). With some encoders it means that the encoder sets a keyframes
every 31st frame, other times it just doesn't set any keyframes at all
after the first one, only rarely does the "auto" interval actually
appear to work.
Lets just set the default to 2 seconds and be happy. In theory this is
the maximum keyframe interval and encoders are allowed to set more if
they so wish, but they never appear to do so.
2023-11-04 18:47:52 -05:00
tytan652 122a5db0b3 obs-ffmpeg: Remove unused variable in VA-API utils 2023-11-04 18:17:43 -05:00
jpark37 e79e28598b libobs,obs-filters: Use common straight alpha math
This pattern uses fewer instructions and also avoids using max, which
does not work on infinity.

Also remove unreferenced techniques from scale filters.
2023-11-04 18:12:22 -05:00
TDV Alinsa e6b3ae738f obs-webrtc: Allow non-CBR rate control with WHIP
Nothing about WHIP requires CBR (and many things that use it use VBR),
and there's no specific upstream service to care about it (WHIP is a
protocol, not a service, despite being exposed as a "service" in OBS),
so let's stop forcing it to be CBR and allow the user to choose other
rate control methods.
2023-10-28 18:15:03 -05:00
David Rosca 83e7cfb9c3 obs-ffmpeg: Add B-frames option for VA-API
The option is already there, but it wasn't available from UI.
Only show it when B-frames are supported.
2023-10-28 18:08:29 -05:00
Kurt Kartaltepe 658657de35 linux-pipwire: Pass obs_pw_stream to renegotiation callback
We were passing the core pipewire pointer where renegotiation expected
the stream pointer. Somehow this worked, probably because the two are
very close.

fixes #9733
2023-10-28 18:26:29 -03:00
Ryan Foster ed2ade250f Revert "win-wasapi: Remove 'BETA' from Application Audio Capture name"
This reverts commit 36ea03dfa6.
2023-10-28 16:41:47 -04:00
Ryan Foster 20ffdda89a obs-qsv11: Migrate target usage settings
Calling update_targetusage in update_params only updates the setting
when an encoder session is initialized. Calling update_targetusage in
rate_control_modified, like update_latency and update_enhancements, will
update the setting when the Settings window is loaded. This will cause
the updated setting to be reflected in the UI.
2023-10-28 15:45:53 -04:00
gxalpha ba4467199c plugins: Remove old macOS version ifdefs
8dd20dfd33 introduced an explicit check
for the available macOS SDK, meaning that we can be sure that the macOS
13.1 SDK is available. As such, we do not require ifdef guards for the
availability of functions that are older than 13.1.
2023-10-27 16:00:42 -04:00
prgmitchell d017cb6718 win-wasapi: Log source name on initialization
Log the source name when a WASAPI device is initialized.
2023-10-27 14:37:46 -04:00
jcm 311fb69175 mac-virtualcam: Correct device timer firing rate 2023-10-27 10:08:19 -04:00
Service Checker 48e239b74d rtmp-services: Remove defunct servers/services 2023-10-26 17:48:23 -07:00
Kurt Kartaltepe 5cf0f06669 linux-pipewire: Load glad symbols on start
After the cmake 3.0 rebuild glad was transitioned to a static library.
This lead to the glad symbols being uninitialized and crashes when they
are used in some cases.
2023-10-24 09:34:38 -03:00
Kurt Kartaltepe 454fc559a2 linux-pipewire: Use the format properties for swap r/b
We refactored this data to be part of the format properties instead of
an out parameter. But forgot to start using this field instead.
2023-10-22 11:16:03 -03:00
Kurt Kartaltepe f0697980c3 linux-pipewire: Add locks to unsafe pipewire functions
These functions log that they should be used with the thread lock held,
so lets hold the lock before calling them.
2023-10-22 11:15:04 -03:00
Ryan Foster b29a44a67d obs-qsv11: Log more QSV settings
QSV logging was missing many of its settings. Let's fix that.
2023-10-17 22:36:22 -04:00
gxalpha 856059b37c mac-avcapture: Replace kCMIOObjectPropertyElementMaster with Main 2023-10-17 16:45:36 -04:00
gxalpha 3d2df1c6d7 mac-capture: Replace kAudioObjectPropertyElementMaster with Main 2023-10-17 16:45:36 -04:00
Ryan Foster 8fbd61f775 obs-websocket: Update version to 5.3.3 2023-10-16 13:02:06 -04:00
Sludge 1cd8b6aaba input-v4l2: always use linear alpha blending 2023-10-14 20:22:22 -03:00
gxalpha c41633d998 mac-virtualcam: Log when extension replacement is requested 2023-10-11 13:07:04 -04:00
Service Checker c96111ab04 rtmp-services: Remove defunct servers/services 2023-10-11 03:54:52 +02:00
Translation Updater 0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
gxalpha e85b257562 mac-virtualcam: Check result of finished extension installation
Adds a switch to distinguish between the possible results that could
occur. While we expect to received RequestCompleted for our camera
extension (RequestWillCompleteAfterReboot is usually more of a network
extension thing), we can't be sure that this always is what we receive
unless we check it.
2023-10-09 18:28:02 -06:00
gxalpha 1781289f22 mac-virtualcam: Treat extension installation cancellation as error
OSSystemExtensionErrorRequestCanceled is called when the activation
delegate returns OSSystemExtensionReplacementActionCancel on request
actionForReplacingExtension withExtension. As per the previous (parent)
commit we no longer request cancellation, so we can be sure that
receiving a "cancelled" error is an actual error and not something that
is supposed to happen.
This commit also removes the "error" from the log prefix, as the message
sent may also be a warning instead, and the LOG_LEVEL conveys the
severity of the log line anyways.
2023-10-09 17:24:38 -06:00
gxalpha 61a4922364 mac-virtualcam: Always replace camera extension when requested
Current code assumes that a newer version of the extension is always
better. However that's not true - when the user installs an old version
of OBS, we should also install the old version of the camera extension
to have a version compatible with the installed OBS.
For normal users this method is only called when the versions in the
Info.plist do not match. In system extensions developer mode it's called
every time an installation is requested (meaning on every start), which
is probably desired as well; and by never returning
"ReplacementActionCancel" we can now always treat "ErrorRequestCanceled"
as an error and not something that we requested to happen.
2023-10-09 17:24:38 -06:00
田七不甜 c56017beb0 win-capture: Add 9 window class auto switch to WGC mode
Add "GAMINGSERVICESUI_HOSTING_WINDOW_CLASS", "screenClass",
"PodiumParent", "OMain", "Framework::CFrame", "rctrl_renwnd32",
"MSWinPub", "OfficeApp-Frame" and "SDL_app".
2023-10-09 14:50:05 -04:00
田七不甜 3a1a0ebeba win-capture: Add and tweak apps in compatibility.json
Add:
Counter-Strike 2, UWP applications, Gaming Services applications,
Microsoft 365(Excel, PowerPoint, Word, Access, OneNote, Outlook,
Publisher and 365 software), Adobe After Effects,
Adobe Character Animator, Adobe Photoshop, Adobe Premiere Pro, Steam,
Epic Games Launcher, Ubisoft Connect, Tencent GUI applications, WeChat
and YY.

Tweak:
Change "Electron" name to "Chromium";
Change "%name% cannot be captured via Game Capture." to
"%name% cannot be captured using Game Capture.".

Remove:
Chrome and Edge (reason is based on Chromium).
2023-10-09 14:50:05 -04:00
derrod 36ea03dfa6 win-wasapi: Remove 'BETA' from Application Audio Capture name 2023-10-08 10:49:43 -06:00
derrod c2ec1fb49e win-wasapi: Handle flags set by GetBuffer 2023-10-08 02:00:58 +02:00
derrod 82f51f24ea win-wasapi: Use provided timestamp for application audio capture 2023-10-08 02:00:58 +02:00
Kurt Kartaltepe 728cd56583 linux-v4l2: Expand packed values to 4 bytes
These days you might capture card a 175Hz monitor with a framerate
defined as 10000000/57143 that doesnt fit in a short. And reporting a
negative FPS in that case isnt very helpful.
2023-10-08 02:00:28 +02:00
artemmdev 5f8eff7ec1 rtmp-services: Update OnlyFans streaming service 2023-10-08 02:00:01 +02:00
derrod 5dde70ccff obs-ffmpeg: Readd OBS_ENCODER_CAP_DYN_BITRATE to AMF texture encoders 2023-10-05 16:55:21 -04:00
jpark37 e11e2133e2 libobs,obs-filters: Fix NAN when tonemapping
Can happen when colors are wider than Rec. 2020.
2023-10-04 19:33:54 -04:00
Ryan Foster 0866688953 obs-qsv11: Use translatable strings for target usage
For Target Usage, instead of doing string comparisons against long
descriptive strings, use translatable strings for descriptive UI text
and simple designations for values used for comparisons and storage.
This is similar to what we do for NVENC Presets.
2023-10-04 16:22:24 -04:00
Ryan Foster 9b1d6032e3 obs-qsv11: Remove D3D9 fallback
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit. As far as I can tell, this code was mostly
for Windows 7/8/8.1 and it was part of the initial implementation. It
should no longer be needed.
2023-10-04 15:24:56 -04:00
Ryan Foster 53dee8f990 obs-qsv11: Remove D3D9 allocator
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit and should no longer be needed.

Revert "obs-qsv11: Use d3d9 allocator on Win7"

This reverts commit b276b1633e.
2023-10-04 15:24:56 -04:00
Kurt Kartaltepe 9d4b916248 obs-qsv11: Redo session data releasing for Linux
This reverts the changes to Windows where Release() was called every
time, since we need share a single DX context across multiple encoders.

Instead introduce a ReleaseSessionData() function and some platform
specific session data that will be passed to it. We use this to track
the VA-API display and fd to release them at the right time. Leaking
displays will also lead to cache pollution in the intel-media-driver
crashing users so we cannot do that.

fixes #9611
2023-09-29 11:56:53 -04:00
gxalpha 23bfb625ce mac-capture: Don't crash when migrating unknown display IDs
The current code assumes that a display UUID can be created with the
stored ID, but that's not always the case, e.g. when the user doesn't
have the display connected. As such, we need to null check this, and
fall back to the invalid ID (0) when the ID cannot be migrated.

The current code also only migrates on source creation, which yields
weird behaviour where if the user opens properties and then cancels it
would still show the first display, but only for the session. This is
why the code was factored out of the creation function and now is always
used when an ID needs to be acquired from OBS Data settings, including
when the source is updated.
2023-09-28 14:25:55 -04:00
Matt Gajownik 857c42aaba obs-browser: Fix invalid comparison of integer types 2023-09-28 23:00:48 +10:00
Matt Gajownik 22cef2b8c4 obs-browser: Update version to 2.22.1
fc57db4 - More consistently return JSON types in browser client
8407dcc - Use CefParseJSON instead of V8 context for JS responses
2023-09-28 21:04:29 +10:00
PatTheMav b3949e6aef cmake: Update qrcodegen finder to match target names of CMake package
qrcodegen is built on obs-deps for macOS and Windows, with the
generated CMake package calling the dependency qrcodegen (not
libqrcoden) and associated target qrcodegen::qrcodegen.

This change updates the finder (required for Linux) to create the same
targets so consumers do not need to differentiate between different
variations of the same dependency on Linux.

Also updates obs-websocket to 5.3.1 to bring in associated CMake
changes.
2023-09-27 18:05:02 -04:00
Sean DuBois 2308414bcc obs-webrtc: Move libdatachannel code to C++ from C
libdatachannel is now built with MSVC instead of MinGW so we are able to
use C++ API instead.

The C++ is preferred by upstream and what the project is written in. The
C API provides a subset of features and has a performance penalty.
2023-09-19 15:03:11 -04:00
Neal Gompa 63f3b0d46c obs-qsv11: Add license declaration file 2023-09-19 13:35:49 -04:00
Neal Gompa dc50e11bc6 decklink: Add license declaration files 2023-09-19 13:35:49 -04:00
Ryan Foster 03b70f0672 obs-qsv11: Fix unusual CBR bitrate issues
For some reason, using MFX_SCENARIO_GAME_STREAMING causes the keyframe
quants to be higher than other frames, which is not desirable. In turn,
this causes bitrate to be higher than the target bitrate for a sustained
period of time after each keyframe.

Not setting the scenario removes this behavior and returns CBR to
somewhat reasonable levels of consistency.

Co-authored by: Chris (Flaeri) <flaeri@otterbro.com>
2023-09-18 13:04:04 -04:00
gxalpha e46c68726e obs-qsv11: Fix target usage migration string comparisons
Fixes problems with the astrcmpi logic, as well as a typo that said
"vertfast" instead "veryfast".
Also makes the method a void because it always returns true and isn't
checked anyways.
2023-09-16 14:33:09 -07:00
Lain 107416193c win-wasapi: Fix arithmetic for WAVEFORMATEX::cbSize
This arithmetic used the incorrect size for WAVEFORMATEX::cbSize, which
is supposed to be sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX).
2023-09-15 10:14:10 -07:00
Laurin Müller 3ac08303b5 rtmp-services: Rebranding Utreon to Playeur 2023-09-07 15:58:43 -07:00
derrod 0b75b433cd image-source: Fix slideshow audio rendering buffer overrun 2023-09-06 21:46:47 -07:00
Norihiro Kamae e5fe27a167 win-dshow: Log source name at error
When a user has multiple win-dshow inputs, it's hard to identify the
input outputting errors in a log file.
2023-09-06 11:46:19 -04:00
Service Checker 5ad60809a8 rtmp-services: Remove defunct servers/services 2023-09-06 06:57:54 +02:00
gxalpha 49ab01c898 obs-websocket: Update version to 5.3.0 2023-09-05 17:03:29 -04:00
Kurt Kartaltepe 543be8cf29 obs-qsv11: Ensure default devices are Intel devices 2023-09-05 15:34:37 -04:00
PatTheMav f8f2c6d989 mac-virtualcam: Switch pixel format of camera extension to BGRA
BGRA was used by default in Apple's example code and is also already
supported by OBS.
2023-09-05 10:41:41 -04:00
PatTheMav d0a8bbcc34 obs-outputs: Silence all warnings generated by the FTL SDK
The FTL SDK is vendored, outdated, and abandoned, so all these issues
will not be fixed anyway.
2023-08-31 17:52:08 -04:00
PatTheMav 4e488e2f1a text-freetype2: Fix warning about implicit integer downcast
Use Freetype2-specific types which match the types used internally and
returned by Freetype2 functions anyway.
2023-08-31 17:52:08 -04:00
PatTheMav 13a23f6471 plugins: Suppress warnings about implicit integer downcasts
Returned values are usually 64-bit in length but commonly stored in
16-bit integers anyway.
2023-08-31 17:52:08 -04:00
gxalpha 321829d932 mac-avcapture: Log if portrait or studio light effects are active
These effects can remain enabled between devices (so enabling it on one
device can mean it's later also enabled on another device), leading to
cases of capture cards getting blurred.
Logging that the effects are enabled should make it easier to spot this
in support.
2023-08-30 15:24:31 -04:00
pkv 78a33c7771 obs-ffmpeg: Fix broken mpegts output
This recent commit [1] broke SRT & RIST streaming because
obs_output_video now returns a NULL pointer for encoded outputs.
This fixes it by retrieving the pointer from the encoder.

[1] fb57eff212

Co-authored-by: tt2468 <tt2468@gmail.com>
Signed-off-by: pkv <pkv@obsproject.com>
2023-08-29 14:44:54 -04:00
PatTheMav 121fb8b2fd obs-outputs: Fix provision of CA certificates to mbedTLS on macOS 2023-08-28 10:39:21 -04:00
Norihiro Kamae e6d007b378 obs-ffmpeg: Do not include sys/timeb.h on non-Windows system
The struct timeb is used on Windows only.
2023-08-26 16:52:52 -07:00
Norihiro Kamae 2aa0e03bf0 obs-ffmpeg: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae 57170ba378 obs-outputs: Remove unused static functions 2023-08-26 16:52:35 -07:00
Norihiro Kamae 220bf8aeaa rtmp-services: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae f7b37b0832 mac-avcapture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae d35583dcc8 linux-capture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Richard Stanway d3ab68c5ca plugins: Quote program paths used in os_process_pipe_create
These end up being passed to CreateProcessW, so paths with spaces in the
name may be open to misinterpretation by the OS.
2023-08-26 16:44:53 -07:00
Kurt Kartaltepe 8e7b697447 obs-qsv11: Fixup session releasing for Linux 2023-08-26 16:40:46 -07:00
Kurt Kartaltepe 368082d6c0 obs-qsv11: Use device enumeration for choosing DRM device
Trying to use the display server as the QSV device was found to be
generally wrong in beta, so instead lets save defaults from the earlier
device enumeration similar to obs-ffmpeg-vaapi which is known to work
well.
2023-08-26 16:40:46 -07:00
Kurt Kartaltepe fc6a15e13a obs-qsv11: Mark internal functions static 2023-08-26 16:40:46 -07:00
Zhao Zhili 075f3c4020 obs-x264: refactor log callback
1. Remove limitation of message length.
2. Improve performance by remove the local copy.
3. Map x264 log level to obs.
2023-08-24 13:54:48 -07:00
Zhao Zhili 5c0a018628 obs-x264: Remove unused getparam() function 2023-08-24 13:54:48 -07:00
pkv 737b21230d obs-filters: Add a mutex when running NVIDIA Audio FX
This fixes a bug when swapping NVIDIA effects.
The update signal triggers a destruction of the previous effect, but the
effect would still run, potentially causing a crash.
The mutex added in the NVIDIA processing function prevents that.

Signed-off-by: pkv <pkv@obsproject.com>
2023-08-19 16:44:11 -07:00
Richard Stanway 609b1ab011 obs-qsv11: Fix crash in QSV test process
The code assumed MFXCreateSession would always succeed, but it fails on
systems with no QSV implementations, causing a crash when we call
MFXClose later. Additional success checks for the other API calls were
also added.
2023-08-18 17:55:00 -07:00
Service Checker 6640d973b3 rtmp-services: Remove defunct servers/services 2023-08-18 12:33:34 +02:00
Kurt Kartaltepe 32c07929b0 obs-qsv11: Drop Windows guards on LowPower settings
Setting AdaptiveCQM to ON when LowPower is OFF crashes the
intel-oneapi-gpu implementation on Linux when using the AV1 encoder.
But using the same LowPower settings as Windows works so lets drop the
current guards.
2023-08-17 10:27:16 -04:00
pkv 79232c3cec obs-filters: Update NVIDIA Effects SDK versions
We need to check for new versions of the NVIDIA Effects redistributables
because mismatched versions of the AUDIO and VIDEO sdk can have
different CUDA versions of the deps, which has caused crashes in obs.
It'd be way better that NVIDIA either ships a single installer with both
audio and video effects or that they auto-install with the drivers.
But meanwhile, we provide a warning to users which requires us to keep
in sync with what's released.

Signed-off-by: pkv <pkv@obsproject.com>
2023-08-17 03:37:30 -07:00
Kurt Kartaltepe b6b8f5b80a obs-qsv11: Fix VPL initialization on intel-mediaSDK
VPL does not have a consistent initialization process for the various
backends it dispatches to. So this resolves the new VPL dispatcher
failing to initialize the video session when it dispatches to
intel-mediaSDK backend. On the oneVPL-intel-gpu backend VA-API sessions
are correctly initialized so this wasnt noticed when tested on newer
hardware.
2023-08-16 15:40:02 -04:00
Kurt Kartaltepe 4d3f9323b5 obs-qsv11: Fix InitParams low power fallback 2023-08-16 15:40:02 -04:00
jpark37 4fd595efe9 decklink: Reset video capture on format change
Fixes black screen when toggling between 4K SDR and HDR on PS5.
2023-08-15 13:15:45 -07:00
jpark37 bb12fe9db5 decklink: Add HDR playback support 2023-08-15 13:15:45 -07:00
Penwywern 95e36878af image-source: Fix slideshow proc decl strings
Changes the decl strings of the slideshow source procedures to match
pre-existing conventions.
2023-08-14 13:17:46 -04:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
tytan652 43ae532d2a sndio: Remove variable-length array usage 2023-08-12 16:18:32 -07:00
Jack Karamanian 21f2a7718e obs-ffmpeg: Set avg_frame_rate for AVStream outputs
This sets the framerate on container files when
recording using "Custom Output (FFmpeg)".
2023-08-11 18:15:46 -04:00
tytan652 7f4fd99f91 linux-pipewire: Replace dynamic arrays with allocations
Replace dynamic arrays added by 27630a8c0e
by allocations
2023-08-11 14:56:36 -03:00
PatTheMav 914392fcc0 mac-virtualcam: Fix crash on macOS when starting virtualcam output 2023-08-10 17:53:59 -04:00
PatTheMav 7628265099 Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
Ryan Foster 64139a6bbd CI: Update to clang-format 16
This commit also modifies UI, libobs, and plugins.
2023-08-10 16:07:25 -04:00
aggresss c81f531edb obs-webrtc: Improve WHIP compliance
Location header is now required. Support relative and absolute URLs
2023-08-10 12:04:18 -05:00
aggresss 34e57a0496 obs-webrtc: Follow HTTP redirects 2023-08-10 12:04:18 -05:00
Ryan Foster 046560eadc obs-qsv11: Fix adapter enumeration in test app
MFXEnumImplementations expects the adapter index to be within a range of
valid Intel adapters produced by MFXLoad and the config filter. If a
system has one non-Intel high performance GPU and one Intel iGPU, OBS
and the test app will see the Intel iGPU as index 1 due to high
performance hints, but MFXEnumImplementations will expect only one valid
index, 0. In this scenario, passing a value of 1 to
MFXEnumImplementations will cause it to abort and return
MFX_ERR_NOT_FOUND (Provided index is out of possible range). This causes
subsequent capabilities testing to fail.

To avoid this, let's track how many non-Intel adapters we see and
subtract that number from adapterIdx to only pass valid index to
MFXEnumImplementations.
2023-08-10 11:47:15 -04:00
Ryan Foster 8b85ecbec1 Revert "obs-outputs: Enable HDR for HEVC over RTMP"
This reverts commit 8137eb5f56.
2023-08-09 21:47:30 -04:00
Amin Mahmoudi e77fc96cfa
rtmp-services: Add MasterStream.iR to ingest list (#9330) 2023-08-09 20:26:13 -05:00
Gale 550ccc63f2 obs-qsv11: Fix RepeatPPS bug 2023-08-09 18:12:47 -04:00
Gale 5bfc2e5150 obs-qsv11: Remove AVBR, QVBR, and VCM 2023-08-09 18:12:47 -04:00
Gale a790302dbd obs-qsv11: Refactor and tune Look-ahead settings
Enable Low Power Look-ahead (VDENC LA) after Intel Arc Graphics. Change
LA_DEPTH defaults (60 frames for normal latency and 30 frames for low
latency). Keep VME Look-ahead only for certain Intel platforms (ICL,
TGL, ADL, and RPL). Disable VME LA for HEVC
2023-08-09 18:12:47 -04:00
Gale 1d95575088 obs-qsv11: Update Target Usage options
Update target usage setting names from legacy names to VPL names.
2023-08-09 18:12:47 -04:00
Gale c9fd128d74 obs-qsv11: Fix bitstream bug
Fix InitBufferSize and BufferSize bug: change Bit to Byte.
2023-08-09 18:12:47 -04:00
Gale 6533b3e138 obs-qsv11: Adjust Gop and keyint_sec parameters
* Change GopPicSize default to 240
 * Remove GopOptFlag
 * Change keyint_sec default from 3 to 0
 * Reduce keyint_sec minimum value from 1 to 0 (for auto)
2023-08-09 18:12:47 -04:00
Gale 6dada921c9 obs-qsv11: Adjust Subjective Video Enhancements
Disable MBBRC (macro block level bitrate control) because it can reduce
objective quality metrics like VMAF.

Use AdaptiveCQM for CBR and VBR.
2023-08-09 18:12:47 -04:00
Gale 99c456b777 obs-qsv11: Add AV1 meta data
Enable content light meta data over the AV1 stream.
2023-08-09 18:12:47 -04:00
Gale 5b6967c359 obs-qsv11: Improve AV1 quality parameters
Enable B-frames for AV1 for Intel Arc Graphics and Meteor Lake Platform.
2023-08-09 18:12:47 -04:00
gxalpha 57cda30bd3 obs-browser: Disable Bluetooth support 2023-08-08 21:36:10 -04:00
Gale 61a3e4365b obs-qsv11: Remove MSDK headers 2023-08-07 13:23:26 -04:00
Gale dbbbcd8c57 obs-qsv11: Add VPL changes 2023-08-07 13:23:26 -04:00
Lain 796e2d5815
Merge pull request #9339 from tytan652/prevent_simde_contamination
Contain simde diagnostic pragmas and replace variable-length arrays
2023-08-05 17:10:33 -07:00