0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00
Commit Graph

4790 Commits

Author SHA1 Message Date
John Bradley
627308bd53 obs-webrtc: Add null terminator to codec array
This fixes an issue where, when the MAX_CODECS length was equal to the
amount of supported codecs (3), it would leave the list without a null
terminator and crash when iterating over the elements.
2024-05-03 22:52:30 -07:00
Ruwen Hahn
64caf0401d obs-outputs: Add video_id_t value for 0
This will be initialized to 0 in various cases, so let's make that
a valid enum value (even if it's not valid in rtmp?)
2024-05-03 13:06:50 -04:00
John Bradley
fab8f0f80e obs-outputs: Add eRTMP/eFLV support for FLV 2024-05-03 13:06:50 -04:00
John Bradley
c5ef7beda8 obs-outputs: Add initial eRTMP multitrack implementation 2024-05-03 13:06:50 -04:00
Ruwen Hahn
7f82426dc4 obs-outputs: Always define CODEC_HEVC 2024-05-03 13:06:50 -04:00
Kurt Kartaltepe
01b61fafbf obs-ffmpeg: Release encode texture early
During high graphics thread pressure it can take a significant time to
acquire the graphics lock. This change releases the OpenGL texture after
rendering to avoid the 2nd lock after sending the frame to FFmpeg. This
improves 99%-tile/100%-tile and median encode in a near encoder overload
scenario, and modestly raises the ceiling before encoder overload in my
test scene.

Master:
min=0 ms, median=4.29 ms, max=33.072 ms, 99th percentile=8.877 ms
min=0 ms, median=4.438 ms, max=77.157 ms, 99th percentile=9.853 ms
min=0 ms, median=4.527 ms, max=57.292 ms, 99th percentile=9.282 ms

This commit:
min=0.97 ms, median=3.009 ms, max=13.215 ms, 99th percentile=5.899 ms
min=1.181 ms, median=2.91 ms, max=9.854 ms, 99th percentile=5.56 ms
min=0.461 ms, median=3.013 ms, max=10.693 ms, 99th percentile=5.871 ms
2024-05-02 18:15:01 -04:00
Paul Hindt
182410cf6c aja: Prepare plugins for new libajantv2 repo
Support building AJA plugins with either the new libajantv2 library, or
the deprecated ntv2 library.

Finder scripts updated to search for libajantv2 and fall back to ntv2 if
not found. This allows this PR to be merged without requiring a
corresponding update to the pre-built obs-deps packages.
2024-05-02 14:31:16 -04:00
Ryan Foster
e693f644ae win-dshow: Fix compiling with FFmpeg 7.0 2024-04-30 11:17:40 -04:00
derrod
14f588f318 obs-ffmpeg: Fix output path logging 2024-04-24 16:03:14 -04:00
tt2468
065d4533ee obs-webrtc: Add support for audio-only and video-only outputs
Adds the `whip_output_audio` and `whip_output_video` output kinds,
which selectively advertise only video or only audio support.

To use these types, it is effectively the same as with the AV
version. Just create the output, assign your video or audio encoder,
and you're good.

libobs does not have support for "optional" outputs. With an AV output,
if you only assign a video or audio encoder, start will fail.
2024-04-22 01:04:55 -07:00
Kurt Kartaltepe
cfb10ece79 text-freetype2: Use a shader uniform instead of vertex attributes
We used to swap in a buffer with (0,0,0,1) for all vertex colors for
drop shadows and outlines. However, this vertex buffer couldn't be
uploaded separately from the vertex data in OBS, so we were reuploading
the text vertices every frame.

Instead, let's use a uniform for this uniform data and save 500us (or
more when handles are visible), a significant portion of my test scenes
render time.
2024-04-22 01:01:47 -07:00
derrod
8d2f4ed3e1 obs-ffmpeg-mux: Use new process args/pipe API 2024-04-20 18:30:46 -07:00
Kurt Kartaltepe
68768e13ae obs-qsv11: Fix adapter detection and fallback to sysmem
Pass down texture/host memory choice for fallback encoders. During
fallback we don't (can't) initialize a shared texture pool and should
use the regular host memory path.

This fixes usage on multi-GPU systems, and enables texture encoders.
2024-04-20 17:06:46 -07:00
Kurt Kartaltepe
ebea709381 obs-qsv11: Implement texture encoder on Linux
Implements the texture allocator for QSV using VA-API surfaces and
implement encode_texture2 for using OpenGL textures directly.
2024-04-20 17:06:46 -07:00
David Rosca
06e364b670 obs-ffmpeg: Implement texture encoding for VAAPI 2024-04-20 17:03:54 -07:00
Kurt Kartaltepe
e9b42e6c58 text-freetype2: Use cached glyph advances
We had these advances laying around but didn't use them here. Loading
the glyphs from the fonts is extremely slow, so let's avoid that since
we take the time to cache these already.
2024-04-20 16:28:12 -07:00
Sergio Garcia Murillo
414580b624 obs-webrtc: Add HEVC support 2024-04-17 15:27:39 -07:00
tytan652
02ead5b096 obs-ffmpeg: Fix unused variable in native NVENC 2024-04-16 11:15:22 -04:00
Ruwen Hahn
dcd1bd9a80 obs-outputs: Fix FLV file info offset 2024-04-15 10:27:39 -07:00
Ruwen Hahn
bdd7d9cf53 obs-outputs: Change FLV tag size according to v10 spec 2024-04-15 10:27:39 -07:00
Ruwen Hahn
7373f326f3 obs-outputs: Extract previous tag size writing logic
It's not repeated that often, but only two instances had
the explanatory comment.
2024-04-15 10:27:39 -07:00
PatTheMav
be09cfe242 plugins: Update platform selection for adding plugins to build tree 2024-04-13 23:48:38 -04:00
PatTheMav
34f8abae1f plugins: Update Linux slice of cross-platform plugins for CMake 3.0
Also silences acknowledged compile warnings introduced by the updated
compiler settings in the CMake update.
2024-04-13 23:48:38 -04:00
PatTheMav
4ecfdb722f plugins: Add Linux-specific plugins for CMake build framework 3.0 2024-04-13 23:48:38 -04:00
PatTheMav
2bc4c69ee9 plugins: Fix compile errors introduced by CMake build framework 3.0 2024-04-13 23:48:38 -04:00
Kurt Kartaltepe
befce71219 linux-pipewire: Fix future compiler errors
Unused variables and missing switch branches will break in cmake 3.0,
and are breaking for me right now so let's merge this early.
2024-04-13 21:37:17 -04:00
PatTheMav
9c90c721a0 mac-avcapture: Add pointer check for outputting NULL video frames
When a capture card or video capture source is contained in the scene
collection's list of sources, but the source is not a part of any
scene, it will be first created but then destroyed again in a deferred
fashion (as it has no strong references to it anymore).

This will happen before the capture source has finished its own
initialization, hence why the source pointer can be invalid at that
point.
2024-04-13 17:06:56 -07:00
tt2468
8b6924b80f plugins: Set keyframe flag on encoded audio packets
Not strictly necessary, and does not fix any bug. This just corrects a
nitpick that technically audio encoder packets are start points, but
that they aren't being labeled accordingly as keyframes.
2024-04-13 17:04:48 -07:00
Alex Luccisano
c0f71f002c obs-ffmpeg: Use video_output_info in amf_create_encoder()
The frame rate used to initialize an AMF encoder should be aligned
with the derived frame rate in video_output_info instead of the global
obs_video_info structure. With this change, IDRs can be aligned when
multiple renditions are being encoded.

Using video_output_info members for the format, colorspace, and range
parameters in addition to the frame rate provides a single source for
this information and obs_video_info is no longer needed.
2024-04-13 17:00:26 -07:00
Colin Edwards
79dd0214a8 decklink: Update SDK to 12.0 2024-04-13 16:50:05 -07:00
Service Checker
97b03e3c54 rtmp-services: Remove defunct servers/services 2024-04-11 20:47:09 -04:00
tt2468
3d30a4efea obs-ffmpeg: Remove mpegts format override for SRT and RIST
FFmpeg is already very effective at detecting the correct input format
for socket-style protocols (SRT, RIST, TCP, UDP, etc.). By overriding
the format of SRT and RIST manually to mpegts, the user is being
prevented from using other container formats via these protocols.

In the rare case that libavformat is unable to detect the correct
container format for an SRT or RIST stream, the user may manually
specify that format in the existing format field.

With the FFmpeg options field which was recently added, probe options
may be specified by the user to further tune format detection.
2024-04-10 18:45:45 -04:00
Chaturbate
15b5dae9c2 rtmp-services: Update Chaturbate 2024-04-10 14:09:28 -04:00
Warchamp7
b67338c448 plugins: Remove dynamic default path properties 2024-04-09 21:10:50 -04:00
derrod
f47fc81d32 obs-qsv11: Remove adaptive CQM option
Without setting the ScenarioInfo to game streaming, which was removed
in 03b70f0672, this is a no-op and its
existence is just confusing to users.
2024-04-07 02:07:59 +02:00
Gale
4c6e2a6722 obs-qsv11: Fix for QSV AV1 in multi-GPU system 2024-04-06 17:06:31 -07:00
tytan652
7d4501131a linux-v4l2: Fix deprecation with FFmpeg 7
FFmpeg 7 header states that avcodec_close should not be used since
avcodev_free_context already close the context.
2024-04-06 16:59:52 -07:00
tytan652
8dbad9ac29 obs-ffmpeg: Fix incompatible-pointer-types with FFmpeg 7 2024-04-06 16:59:52 -07:00
Ryan Foster
206af52467 win-wasapi: Fix legacy CMake
Follow-up to 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.
2024-04-03 14:44:39 -04:00
WuLongyue
685bc561d9 rtmp-services: Update "CHZZK" platform 2024-04-02 12:45:28 -04:00
derrod
3a1035576e obs-ffmpeg: Add Linux NVENC texture encoder 2024-03-31 02:33:07 -07:00
derrod
2f55f046fe obs-ffmpeg: Add native non-texture NVENC implementation 2024-03-31 02:05:40 -07:00
tytan652
78cd07bd58 UI,plugin: Refactor virtual camera enablement 2024-03-30 16:43:30 -07:00
derrod
4e18bb6e50 obs-outputs: Set AV1 packet priority 2024-03-30 16:15:03 -07:00
derrod
53319e05f7 obs-outputs: Cleanup some unused leftovers 2024-03-30 16:15:03 -07:00
Len
1badf8e11b rtmp-services: Add Hakuna Live RTMP service 2024-03-28 19:34:06 -04:00
Ryan Foster
6f3f7b4e5a obs-ffmpeg: Fix NVENC compatibility hack for old drivers/hardware
Add a COMPAT version of NV_ENC_INITIALIZE_PARAMS_VER, which changed
between SDK 12.0 and 12.1.

If using drivers older than the configured SDK/API requires, fall back
to the compatibility version of the API (11.1).

An example scenario would be encoding in H.264 on driver version 512.15.
SDK 12.1 requires driver version 531.61 on Windows. Currently, in this
scenario, OBS will fall back to the FFmpeg encoder path, which will do
its own driver check, which will fail on this driver version.

With this change, this scenario will instead leverage the existing
compatibility hack to fall back to the compatibility version of the API
without falling back to FFmpeg.

It should be noted that while neat, the compatibility hack that enables
Kepler GPUs to continue to be able to use NVENC in this way is expected
to be removed at some point.
2024-03-27 19:11:26 -04:00
Ryan Foster
24470b351a obs-ffmpeg: Set needs_compat_ver before struct version checks
Because 4a8e8bb1bd changed the
NVENCAPI_STRUCT_VERSION define to rely on enc->needs_compat_ver, we must
do the conditional check and define needs_compat_ver before any structs
are initialized because they will check the version when doing so by
calling NVENCAPI_STRUCT_VERSION internally.

In this case, make sure that we define enc->needs_compat_ver before
NV_ENCODE_API_FUNCTION_LIST_VER is called for
NV_ENCODE_API_FUNCTION_LIST.
2024-03-27 19:11:26 -04:00
Exeldro
8c9e4c2822 obs-text: Fix alignment with extents 2024-03-27 18:45:01 -04:00
Kurt Kartaltepe
4a903d5f85 obs-qsv11: Check all encoders are Intel devices
On Linux, we enumerate all VA-API devices, which incorrectly enables
QSV AV1/HEVC encoders when AMD devices report these capabilities.
2024-03-21 15:43:13 -04:00
Florian Zwoch
823e968a71 mac-capture: Fix string length when duplicated 2024-03-19 16:20:31 -04:00
PatTheMav
3af1b78f35 win-dshow: Set MSVC runtime on virtual camera targets directly
The MSVC_RUNTIME_LIBRARY property is not propagated to targets which
link against a target which has this property set. Thus the property
needs to be set on the actual virtualcam targets and not the interface
library.
2024-03-16 19:36:33 -04:00
PatTheMav
14654807cb win-capture: Add missing MSVC runtime setting to 32-bit build 2024-03-16 19:36:33 -04:00
jcm
7fab3d03e0 mac-capture: Standardize early return behavior in init_screen_stream() 2024-03-15 15:26:09 -04:00
derrod
5f2bb795f0 obs-ffmpeg: Fix HDR metadata not being written when using FFmpeg 6.1+ 2024-03-14 17:12:20 -04:00
Ryan Foster
e1e1b6daab obs-browser: Update version to 2.23.4
9c235de - Update translations from Crowdin
58c7365 - CI: Update first-party GitHub Actions from v2 to v4
fc2cbaf - Update translations from Crowdin
2024-03-12 14:37:49 -04:00
Translation Updater
10b02e11d0 Update translations from Crowdin 2024-03-12 18:11:06 +00:00
PatTheMav
f4733ec6a2 Update source code formatting with clang-format 17.0.3
Added SCDisplayRef type alias to fix a quirk of this specific
clang-format version with ObjC block syntax.
2024-03-11 15:55:30 -04:00
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