Commit graph

4682 commits

Author SHA1 Message Date
derrod 7cacd18e55 win-capture: Always reconfigure audio source when game capture hooks 2024-03-09 20:13:58 -05:00
invalidtask 725f495213 rtmp-services: Update Vaughn Live and Breakers ingests 2024-03-08 22:35:12 -05:00
Ryan Foster d25042a8ca obs-webrtc: Add additional error messaging for WHIP output
Adding to the previous commit, let's also use obs_output_set_last_error
to provide localized error messages to the user if we run into these
failure cases.
2024-03-08 21:51:42 -05:00
PatTheMav 12d25f9a91 mac-avcapture: Fix possible crash if camera uses BGRA format
BGRA or other formats that do not use color primaries will not yield
a valid color primary value. Initializing the CFComparisonResult to a
default value and replacing it only if a non-NULL color primary value
was retrieved avoids a possible crash.
2024-03-08 17:38:40 -05:00
Aleks Todorov 4953c5d517 obs-webrtc: Avoid crashing on invalid answer
PeerConnection::setRemoteDescription validates the input SDP, throwing
an exception whenever it is invalid.

Currently, instead of handling the exception, we just crash.

Instead, add an exception handler which logs a short description of the
issue as well as the error message from the exception.
2024-03-07 13:52:00 -05:00
Bart F e4ec414690 rtmp-services: Add SharePlay.tv 2024-03-07 11:50:32 -05:00
Ramjivan Jangid 5bfcedcad8 rtmp-services: Add Streamway to ingest list 2024-03-07 11:35:50 -05:00
WuLongyue 1e163d795e rtmp-services: Add "CHZZK" platform 2024-03-06 19:52:22 -05:00
Sherwin Dapito 71660dc9a1 rtmp-services: Update Switchboard Live servers 2024-03-06 19:25:27 -05:00
Tobias Speicher 97375e541b rtmp-services: Add "Vault - by CommanderRoot" to ingest list 2024-03-06 19:01:59 -05:00
Vainock 7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
PatTheMav 745f87f21f mac-avcapture: Fix frame rate collection for camera device formats
Some devices will report different framerate ranges for formats that
are identical apart from color primaries. Without taking these into
account, only framerates for one color primary variant would be used
to populate the framerate dropdown in the property view of the camera
source.

Checking for a difference in color primaries when iterating over all
available formats for a device thus requires checking for this
variation and adding the additional frame rate range as well.
2024-02-24 17:38:18 -06:00
Lain 33043a0c3e obs-websocket: Update to version 5.4.2
Fixes a versioning issue
2024-02-21 11:22:59 -06:00
Lain cf1c5962ff obs-websocket: Update version to 5.4.1
Fixes future deprecation warnings
2024-02-20 21:46:13 -06:00
PatTheMav 03c42e5b93 mac-avcapture: Fix crash issues on Intel-based Macs and older macOS
Fixes several possible crash issues that might occur on Intel-based Macs
and older macOS versions:

On modern macOS versions (13+) allocated memory is zero-allocated by
default which makes NULL pointer checks work correctly after allocation.

On older macOS versions this is not the case, so the OBSAVCaptureInfo
struct needs to be zero-allocated to ensure the guards in the tick and
render functions bail out correctly.

On Intel-based Macs and/or older macOS versions passing a reference to
the OBSAVCapture instance inside the OBSAVCapture struct can lead to a
crash because of a possible circular reference that cannot be resolved
at runtime.

Passing only a reference of the OBSAVCapture to libobs and incrementing
the retain count at source creation (decrementing in when the source is
destroyed) avoids this issue entirely.
2024-02-20 17:57:09 -05:00
shiina424 a63714c8f1 win-capture: Add line break for capture audio tooltip 2024-02-20 16:00:40 -05:00
PatTheMav 50a19c5219 mac-capture: Fix crash in device reconnect handler
The uninit function prematurely released the memory allocated for the
channel map setting, which exists in the scope of source life cycle
(compared to channel names which are valid during the life cycle of a
configured device).

Splitting up the clean-up for both (memory for channel names is
released when the device is uninitialized, memory for channel map
setting is released when the source is removed) ensures that the memory
is released but pointers don't become unexpectedly invalid.
2024-02-20 14:18:46 -05:00
PatTheMav 5a7478d562 mac-capture: Limit number of copied audio channels to libobs limits
OBS handles up to 8 channels of audio, which requires the CoreAudio
input callback to omit/ignore any audio data from channels above that
count and also report a maximum amount of 8 channels to match the
speaker setup given to swresample by libobs.
2024-02-20 14:04:28 -05:00
PatTheMav ee28503726 mac-avcapture: Add color format selection for capture card source
Some devices do not support all color formats at all resolutions, but
the capture card source automatically uses an available color format
and compares it against the available format for a specific resolution.

Without being able to change this format, some resolutions do not
work as CMIO will not be able to find a compatible format. Thus the
color format needs to be manually selected for capture card sources
as well.
2024-02-17 19:28:28 -05:00
derrod d87cf9c7eb win-capture: Disable audio source when game capture unhooks 2024-02-17 19:03:35 -05:00
derrod fe08a773ab win-capture: Fix leak in wasapi reroute proc call 2024-02-18 10:08:59 +11:00
Kurt Kartaltepe 288ed51269 obs-ffmpeg: Receive packets while frame queue is full
Previously, we always assumed we could push more frames before an encoded
packet would be available. Actually, we can get EAGAIN when the
frame queue is full and before any encoded packets have been completed.

Instead, attempt to read packets more often as the worst that can
happen is we get EAGAIN again.
2024-02-10 17:25:14 -06:00
PatTheMav 5af8c10b0e win-dshow: Add generated Windows resource file to virtualcam sources 2024-02-10 01:50:06 -05:00
Kurt Kartaltepe e1b4c026df obs-qsv11: Disable texture encoder on linux
After adding proper adapter enumeration the linux code ends up entering
the texture encoding paths, but these paths are not correctly
implemented on linux yet.

fixes #10221
2024-02-09 20:19:55 -05:00
vico-shang 7af6a0fc51 win-dshow: Fix YUY2 line size error 2024-02-07 12:27:38 -06:00
Chris (Flaeri) 0c2f3f8049 image-source: Fix crash when randomize with 0 files 2024-02-03 17:36:26 -06:00
Evgeny Pavlov b79ba49252
obs-ffmpeg: Fix wrong framerate in AMF VUI header
Frame rate should be defined before AMF encoder initialization,
because this information is used for setting vui_time_scale in SPS.
If frame rate isn't defined before initialization,
then AMF encoder set default frame rate into VUI header (30 fps).
2024-02-03 17:31:00 -06:00
Lain 10c82e638c win-dshow: Add support for newer Elgato devices 2024-01-31 00:54:14 -06:00
Translation Updater ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
Sean DuBois 752abdc0fc obs-webrtc: Add AV1 Support 2024-01-28 02:11:51 -06:00
tytan652 76eb88d984 obs-webrtc: Require libdatachannel 0.20 or newer 2024-01-27 17:54:23 -06:00
Kurt Kartaltepe 14f068a6b2 obs-qsv11: Use the new gs_enum_adapters 2024-01-27 17:51:33 -06:00
Ryan Foster 66c0080d5c CI: Update deps to 2024-01-27 release
This commit also modifies build-aux to update libdatachannel.

This commit also modifies obs-webrtc to avoid a compiler error.

Notable changes:
 * deps.ffmpeg: Update libdatachannel to 0.20.1
 * deps.macos: Remove Carla
 * deps.macos: Add uthash to macOS deps
 * deps.windows: Remove Carla
 * deps.windows: Add uthash to Windows deps
2024-01-27 15:33:09 -05:00
bin b8155cdff7 obs-ffmpeg: Set audio stream title for FFmpeg record output 2024-01-26 22:28:36 -05:00
Juliusz Chroboczek 762e0502f2 obs-webrtc: Improve error messages on HTTP failure 2024-01-25 22:09:55 -08:00
Ryan Foster 4decb111ba obs-websocket: Update version to 5.4.0
See b61a5c243137681a206bca2cef0f92e20598353a for changelog.
2024-01-25 16:23:51 -05:00
Hong Hak-Gyu a1f853af55
Add PandaTV live RTMP service (#10117) 2024-01-25 14:35:50 -06:00
Ryan Foster fbf6c8d243 obs-browser: Update version to 2.23.3
7fa3822 - REALLY don't allow browser docks to arbitrarily close OBS
2024-01-24 16:51:29 -05:00
Ryan Foster 2874b8f1cc obs-qsv11: Use 2 tile columns in QSV AV1 for 4K+
When resolution is 4K or higher, use 2 tile columns for QSV AV1.
2024-01-23 17:31:31 -05:00
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