Commit Graph

3875 Commits

Author SHA1 Message Date
Jim
572407a928 Merge pull request #7809 from obsproject/amf-av1-rebased
Add Hardware AMD AV1 Encoder
2022-11-19 15:52:16 -08:00
Ryan Foster
46e17a1160 obs-ffmpeg: Fix SVT-AV1 rate control mode selection
In updated versions of FFmpeg (5.1.x) and SVT-AV1 (1.2.0/1.3.0), the
rate contol mode selection mechanism has changed, causing CBR to throw
an "Invalid Parameter" error and the encoder will fail to start. This
appears to be caused by us specifying rc_max_rate, which will also fail
on FFmpeg CLI. Adjust how we manage rate control methods, appropriately
version-gated, to work with both our current dependency versions and the
versions that we'd like to use.
2022-11-19 15:44:12 -08:00
jpark37
0c4e7c4142 decklink: Always output BGRA 2022-11-19 15:24:26 -08:00
gxalpha
838446082e mac-videotoolbox: Default to High profile 2022-11-19 15:05:05 -08:00
Matt Gajownik
80d393bb75 win-dshow: Recognise higher FPS values from devices 2022-11-19 07:37:15 -08:00
Roman Huts
341f288b57 obs-ffmpeg: Fix encoder preset quality fallbacks for AVC/HEVC/AV1
(Jim note: The missing description of this commit is that basically, the
CAP_MAX_THROUGHPUT value returns a different result based upon what the
other settings are currently set to. It didn't operate the way it was
originally programmed.)
2022-11-18 18:18:08 -08:00
Roman Huts
49e5f7783f obs-ffmpeg: Suggest docs to reference for AMF/FFmpeg options 2022-11-18 18:18:08 -08:00
Roman Huts
927733240c obs-ffmpeg: Add AMF AV1 encoder 2022-11-18 18:18:08 -08:00
Roman Huts
a8fc9226f8 obs-ffmpeg: Use codec enum for AMF texture encode check 2022-11-18 18:18:08 -08:00
Roman Huts
8b386a6417 obs-ffmpeg: Make AMF AVC encoder name consistent w/ others 2022-11-18 18:18:08 -08:00
Roman Huts
ef1a9c46e3 obs-ffmpeg: Only show b-frames AMF property for AVC 2022-11-18 18:18:08 -08:00
Roman Huts
1948ddf2fa obs-ffmpeg: Only allow AMF high/baseline profiles for AVC 2022-11-18 18:18:08 -08:00
Roman Huts
535ced04d5 obs-ffmpeg: Allow 0-51 for CQP property
0-51 makes it consistent with other encoder implementations (At least
for AVC/HEVC)
2022-11-18 18:18:08 -08:00
Roman Huts
21d079fdcc obs-ffmpeg: Use codec enum for amf_properties_internal 2022-11-18 18:18:08 -08:00
Roman Huts
acfad45ead obs-ffmpeg: Fix transcoding API typo 2022-11-18 18:18:08 -08:00
Roman Huts
48b5fd5a3b obs-ffmpeg: Update AMF SDK for AV1 support 2022-11-18 18:18:08 -08:00
Jim
8806738a04 obs-ffmpeg: Change default nvenc preset to P5
P6 seems to invoke lookahead, which causes lag for some older GPUs and
interferes with game performance. So let's just use P5 by default for
now. Shouldn't really affect recording anyway.
2022-11-18 12:38:54 -08:00
jpark37
803fcc4c3e win-capture,UI: Look up display by id, not index
The index is not reliable. The id persists better, so use that.

Also remove matching against the first monitor if the expected monitor
is not available. That feature seems like a good way to get doxxed by
accident.
2022-11-18 15:15:13 -05:00
Jim
6693f39288 Revert "virtualcam-module: Don't send frames on initial pause"
This reverts commit bcb73cb599.

Annoyingly, this breaks WebEx, likely due to their own bug. This only
breaks Discord under very specific circumstances due to their own bug,
so if I'm going to choose between Discord breaking under very specific
circumstances that rarely occur versus choosing WebEx not working at
all, I'm going to just let Discord be broken under specific/rare
circumstances.

I hate DirectShow.
2022-11-18 05:47:14 -08:00
tt2468
53ffaf56c1 obs-websocket: Update version to 5.1.0
See 31f9845b6132e6c1529401292bc1125401e2a324 for changelog.
2022-11-18 02:31:32 -08:00
tytan652
c8a01f92ee obs-ffmpeg: Fix SRT error type comparison (#7802) 2022-11-18 03:17:54 -06:00
Caelan Sayler
95f434c591 win-capture: Invert output when drawing monochrome cursors 2022-11-17 23:54:48 -05:00
pkv
88ac8098a1 rtmp-services: Add ffmpeg-mpegts-muxer in schema v4
This adds ffmpeg-mpegts-muxer to the enum of output modules in schema.
Updates schema to v4.

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-17 21:56:38 -05:00
pkv
fcb6df1f63 obs-ffmpeg: Direct setting of encryption & auth for SRT & RIST
Also modifies UI.

This allows the direct use of passphrase (SRT & RIST) used for
encryption, user + password (RIST) as well as streamid (SRT).
Previously, these parameters had to be set in the URL in the form:
URL?option1=value1&option2=value2.
They still can but there is also the option to set them in the stream
key and username/password fields.
SRT:
- the stream_id is set in the stream key (more info on it: [1]);
- the encryption passphrase is set in the password auth field.
RIST:
- the encryption passphrase is set in the stream key;
- the srp_username and srp_password are set in the user/password auth
fields [2].

Additionally, some error logging has been added when there's a
disconnect caused by a wrong password.
Lastly, this solves a bug when auto-reconnect is set and a wrong
passphrase is provided for srt; the output would keep trying to
reconnect. With this commit, an OBS_OUTPUT_INVALID_STREAM signal is
emitted and the stream is immediately stopped.

[1] https://github.com/Haivision/srt/blob/master/docs/features/access-control.md
[2] https://code.videolan.org/rist/librist/-/wikis/Authentication-and-the-ristsrppasswd-Utility

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-17 21:56:38 -05:00
Jim
9116ceab6e obs-ffmpeg: Use compatibility options on nvnenc init fail
This fixes an issue where older nvidia video cards weren't able to
initialize nvenc due to not having (or having limited) multipass support
2022-11-17 10:55:06 -08:00
Jim
301730f40c obs-outputs: Shorten dynamic bitrate increment timeout
The dynamic increment timeout does not need to be 30 seconds. Change it
to 4 seconds instead to make dynamic bitrate something that people
actually want to use.
2022-11-15 09:37:45 -08:00
tt2468
19fbc886fa rtmp-services: Add IRLToolkit 2022-11-13 10:00:59 +01:00
PatTheMav
7cedd324e1 mac-capture: Disable all SCK modes besides WindowCapture on macOS 12
SCK has too many open issues on macOS 12 to enable full functionality
on that version. Window Capture has the biggest performance uplift and
so far the least amount of quirks, so leave this variant (with the
"Beta" qualifier) for macOS versions before Ventura.
2022-11-12 18:17:49 -05:00
gxalpha
8e8148a2d5 mac-videotoolbox: Support P010 and HDR color spaces 2022-11-12 12:24:10 +01:00
pkv
f7086f2ec0 obs-filters: NVIDIA Background Removal variable mask refresh
This adds a slider to set variable mask refresh rate.
This is useful to alleviate the GPU load so that the mask generation
can optionally be done every n frames (n = 1-4).

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-11 23:06:01 +01:00
pkv
bed0175326 obs-filters: Add temporal processing to Background Removal
The AI detection is improved by enabling temporal processing for the
NVIDIA Background Removal filter.
This requires NVIDIA Video Effects version >= 7.1.0.
Fixes issue #7639 (VRR issue with previous sdk versions).

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-11 23:06:01 +01:00
pkv
310a882dd8 obs-filters: Warn if NVIDIA Audio FX is outdated
This warns the user if the SDK version is outdated and suggests to
upgrade through a warning in the Properties window of the
filter.
Also removed the label RTX from the logs, just keeping NVIDIA Audio.

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-11 23:06:01 +01:00
pkv
c30868f056 obs-filters: Warn if NVIDIA Video FX is oudated
This checks if the redistributable for NVIDIA Video FX is the latest.
If it is not, a warning is displayed in the Property window for the
filter.
Also removed the label RTX from the logs, just keeping NVIDIA Video FX.
The NVIDIA Video FX loader has been updated to sdk 7.1.0.
The new functions of the sdk are not loaded though.

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-11 23:05:53 +01:00
Richard Stanway
63c3299a9f obs-outputs: Increase librtmp send timeout to 15 seconds
Based on what we're seeing after the release of OBS 28, six seconds is
too low and causes disconnects instead of dropped frames.
2022-11-11 20:53:10 +01:00
PatTheMav
5913be9198 obs-outputs: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
PatTheMav
47260d599e obs-filters: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
PatTheMav
415c2d9efd image-source: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
PatTheMav
e62fcce852 coreaudio-encoder: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
PatTheMav
8da9df5274 obs-x264: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
PatTheMav
b417df7d95 win-capture: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:28 +01:00
PatTheMav
d87467666b obs-ffmpeg: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:28 +01:00
PatTheMav
ecdbab6c7a linux-v4l2: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
PatTheMav
ae01a626b6 linux-capture: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
PatTheMav
bf692d816e obs-outputs: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
PatTheMav
826c602b84 mac-capture: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
pkv
ce2d1ffab7 obs-ffmpeg: Fix deprecation of channels member of several structs
This fixes deprecation warnings since the channels member of
AVCodecContext is marked as deprecated [1], as well as the channels
member of AVFrame [2].
In all instances where a warning appear, a switch to the new API is
done.
[1] lavc: switch to the new channel layout API
FFmpeg/FFmpeg@548aeb9
[2] Bump minor versions after the channel layout changes
FFmpeg/FFmpeg@cdba98bb80

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-10 19:37:07 -05:00
pkv
ce63c5b057 obs-ffmpeg: Update mpegts to channel API change
The channel_layout API was overhauled by FFmpeg [1-4]. The previous
bitmask channel_layout is replaced by a struct ch_layout which combines
the number of channels, a bitmask and other infos. This struct must now
be supplied to AVframes since avutil >= 57.24.100 and to
AVCodecContext since avcodec 59.24.100 per (1].
This commit provides the required info to obs-ffmpeg-mpegts.

[1] Bump minor versions after the channel layout changes
FFmpeg/FFmpeg@cdba98b
[2] lavc: switch to the new channel layout API
FFmpeg/FFmpeg@548aeb9
[3] avutil/channel_layout: Add a new channel layout API
FFmpeg/FFmpeg@086a804
[4] avframe: switch to the new channel layout API db6efa18
FFmpeg/FFmpeg@db6efa1

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-10 19:37:07 -05:00
Paul Hindt
d851f1d916 aja: Fix capturing UHD/4K YUV on Kona HDMI.
Added missing routing preset for KonaHDMI UHD/4K.

Calculate framebuffer index based on framestore index.
2022-11-09 23:08:10 -08:00
jpark37
d84a9dad8a mac-capture: Support P3 for HDR recordings 2022-11-09 22:34:50 -08:00
Developer-Ecosystem-Engineering
faea7fb8b2 mac-avcapture: Add DeskCam support 2022-11-08 22:41:52 +01:00