Commit Graph

3811 Commits

Author SHA1 Message Date
Ryan Foster
254dc4081c obs-ffmpeg: Add NVENC preset mapping for old Default preset
The old NVENC preset "Default", labeled in OBS as "Performance", maps to
the new P3 preset when not using multipass. Since we previously only
enabled multipass/two-pass on "Max Quality", we can map this to P3 in
all cases.

This commit also modifies UI.
2022-10-31 17:02:51 -04:00
Ryan Foster
08f7a3778d obs-ffmpeg: Swap hq and mq preset order
This is for consistency with b2ff22a587.
Max Quality (mq) is "higher" than Quality (hq), and it's helpful for the
code order to reflect that.
2022-10-31 17:02:51 -04:00
derrod
ec3ea1f8a0 win-capture: Disable clang-format for assembly patterns 2022-10-29 16:06:24 -07:00
Vainock
5a1e93ef36 obs-filters: Fix typo in Upward.Compressor 2022-10-29 17:33:19 +02:00
derrod
85d561cad1 obs-ffmpeg: Fix Ubuntu 20.04 detection 2022-10-27 16:47:37 -07:00
Jim
dd26fe4f8a obs-ffmpeg: Fix FFmpeg NVENC presets on Ubuntu 20.04
Ubuntu 20.04 and 22.04 both have the same FFmpeg versions, but FFmpeg on
20.04 was built with version 9 of NVENC headers, whereas 22.04 was built
with 11.

Unfortunately, that means we have to revert back to the old presets when
Ubuntu 20.04 is detected. The way this detection is done is a bit hacky,
but it's the only way to preserve startup performance. Otherwise we'd
have to write yet another startup subprocess test program to detect
whether the FFmpeg being used was built with older or newer NVENC, which
is both slow to start up and annoying to write. So instead, just get the
distro name/version strings and detect Ubuntu 20.04 that way.
2022-10-27 14:35:51 -07:00
Jim
4cc06ebdaa obs-filters: Fix comment typo 2022-10-27 00:49:32 -07:00
pkv
8d457718dc obs-filters: Add upward compressor filter
An upward compressor increases levels below a threshold, instead of
decreasing levels above it. This is closely related to an expander; the
upward compressor can be seen as an expander with ratio in the [0,1]
range. This can be used for example when the game audio is lowered
against a voice track but that one still wants to be able to hear very
low game sounds.

For more use cases:
https://www.izotope.com/en/learn/4-tips-for-using-upwards-compression-in-neutron.html

Signed-off-by: pkv <pkv@obsproject.com>
2022-10-27 00:44:59 -07:00
Jim
56cfaf792d obs-filters: Refactor expander filter expansion code
Things were a bit unoptimal and were squished together, making the code
much more difficult to work with. Instead, separate the code for
processing individual samples into its own function.
2022-10-27 00:44:59 -07:00
Jim
89006716b4 obs-filters: Use snake_case for expander variables 2022-10-27 00:44:59 -07:00
Translation Updater
f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
Matt Gajownik
b690ed0ad5 obs-browser: Update version to 2.18.6
d31b5fc - Include source name when printing console errors
d1fa35d - Add missing translation key for ERR_TIMED_OUT
2022-10-26 09:29:28 +11:00
Matt Gajownik
42770edd20 enc-amf: Minor compilation improvements 2022-10-26 09:24:54 +11:00
Mattias Landin
2a0f3d4c04 rtmp-services: Add Vindral service 2022-10-24 17:26:28 +02:00
Stefan Hoffmeister
fca624ea4f linux-v4l2: Send STREAMON/STREAMOFF on vcam start/stop
This implements a suggestion made in
https://github.com/floe/backscrub/issues/133#issuecomment-1085598710 to
address what appears to be a problem in the v4l2loopback driver.
And better aligns OBS' usage to the v4l2 kernel interface.

fixes #4808
Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-10-20 18:35:35 -07:00
jp9000
556ef40529 obs-ffmpeg: Fix NVENC "mq" to use P6 rather than P4 2022-10-19 17:52:30 -07:00
PatTheMav
0b0ac1b958 mac-virtualcam: Remove unnecessary IOSurfaceLocks in Mach Server
IOSurface locks are only necessary when any processing with the data
contained in the surface is done and an explicit copy of data from GPU
memory back to CPU memory is needed.
2022-10-19 01:59:11 +02:00
PatTheMav
558c2a7074 mac-virtualcam: Remove unnecessary use of NSAppleEventDescriptor 2022-10-19 01:59:11 +02:00
PatTheMav
a754cacc7f mac-virtualcam: Use IOSurfaceLock on Intel-based Macs only
Apple Silicon-based Macs have a unified memory architecture, as such
an IOSurface will always be available in memory accessible to the CPU
and GPU (and an off-load of the IOSurface will not take place).

eGPUs are not supported on Apple Silicon-based Macs either, so an
IOSurface lock to ensure data is copied back to CPU memory is not
necessary.
2022-10-19 01:59:11 +02:00
PatTheMav
36a86f5217 mac-virtualcam: Fix random crashes in applications loading VirtualCam
Without invalidating the mach port used for sharing the IOSurface
between OBS and the application displaying the virtual camera output,
IOKit seems to run into the issue of receiving "shared" mach ports,
possibly because of port exhaustion. IOKit requires a "new" port
however and crashes upon that error otherwise.

Co-authored-by: Steven Michaud <smichaud@pobox.com>
2022-10-19 01:59:11 +02:00
Richard Stanway
2ad517e91e obs-filters: Remove unused assignments 2022-10-15 16:17:46 -07:00
jp9000
feda64e9c6 virtualcam-module: Fix crash on resolution change
Certain programs can start the virtualcam filter, then they may choose
to call `Stop()` on the filter, call `SetFormat()` to change the
resolution, then call `Run()` again to start the filter again. The
Windows virtual camera filter did not account for this, thus if the
resolution was different, it had potential to cause a crash.

To fix this, store the last filter resolution, then check the resolution
every frame, and if it changes, reset the scaling information.

(Author note: This code is unclean. What we need to do with the virtual
camera filter is make it only create the thread on `Run()`, then join
the thread on `Stop()`. It's currently a bit complicated to make it do
that at the moment, so this code is a kind of an annoying stopgap for
now.)
2022-10-15 01:42:07 -07:00
jp9000
bc9ed5062d virtualcam-module: Clarify resolution variables
The `cx`/`cy`/`interval` variables specifically specify the
OBS/placeholder resolution/interval. The resolution may not be the same
as the filter's resolution (when scaling is used).

Instead, prefix these variables with `obs_` to improve clarity.
2022-10-15 01:29:05 -07:00
jp9000
e18acb57af obs-ffmpeg: Clarify name of NVENC preset 2022-10-14 16:25:22 -07:00
jp9000
bcb73cb599 virtualcam-module: Don't send frames on initial pause
Sending frames on initial pause seems to cause an odd crash on
subsequent frame calls.

(Note by author: I do not know why the crash happened because code
beyond OBS is a proprietary black box. I suspect it's just a bug in
WebRTC or something, but I can't know for sure. This is incredibly
frustrating. But at least this particular crash seems to be fixed.
...for now.)
2022-10-14 00:14:54 -07:00
gxalpha
277dafab98 mac-capture: Log CoreAudio device sample rate 2022-10-09 17:09:07 -07:00
gxalpha
dd06fe44ad mac-videotoolbox: Remove "None" profile
Selecting this would actually fall back to "main", so we should just use
main as the default.
2022-10-09 16:58:30 -07:00
Service Checker
98199315e0 rtmp-services: Remove defunct servers/services 2022-10-09 16:54:48 -07:00
Norihiro Kamae
ba77ca6592 vlc-video: Fix crash at removing files from missing-file dialog
The callback missing_file_callback will get an empty string when a user
decided to remove the file on the missing file dialog.
Avoid the empty string to be held in files array and remove it.
Also avoid passing an empty file name from the property to internal
functions.
2022-10-09 16:40:06 -07:00
Alex Kosenko
39111dab3d rtmp-services: Update ingest list for Restream.io 2022-10-09 16:38:05 -07:00
PatTheMav
e76fbaa016 obs-vst: Toggle properties button visibility upon VST selection
A prior patch made the button to show/hide a VST check the current
status of a loaded VST. This lead to situation where upon first
selection a VST might be loaded but the button's visibility is not
changed.

This change will reevaluate the status of a loaded VST upon selection
in the drop-down menu and trigger button visibility accordingly.
2022-10-09 16:33:27 -07:00
Kurt Kartaltepe
84687813e3 linux-pulseaudio: Use DONT_MOVE for non-default devices
Ask the PA server to kindly not migrate our streams to the default
device unless the user chose the default device for input/output
captures.

Fixes #3211
2022-10-09 16:31:00 -07:00
derrod
a372c1c0b3 win-capture: Update D3D9 signature for Win 11 22H2 2022-10-09 16:21:02 -07:00
PatTheMav
992d18b66c win-capture: Fix reporting valid width and height if not capturing
While the inject-helper tries to hook an application, the source is
set to `active` until the inject-helper reports being unable to hook.

If the graphics thread updates the transformations of every source in
that time frame, the game-capture source will report the width and
height used from the last valid capture, leading to its selection box
flickering in and out of view.

Ensuring that width and height are only reported when the source is not
only made active but is also capturing content fixes the flickering
issue.
2022-10-09 16:17:05 -07:00
Luke Strickland
046b95dac9 rtmp-services: Update Glimesh to add RTMP ingests 2022-10-08 22:44:50 +02:00
jp9000
53f4627b0c obs-ffmpeg: Add NVENC AV1 support 2022-10-07 14:34:39 -07:00
jpark37
51c452e937 libobs: Precompute more accurate matrices
These are generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
gxalpha
ff0f5ca681 mac-videotoolbox: Remove unused defines 2022-10-01 16:25:05 -07:00
jpark37
39183c76b5 win-wasapi: Fix Stop hang
Fix hang when audio capture is active in the background and stopped by
either closing OBS, or switching scene collections.
2022-10-01 10:36:08 -07:00
jpark37
cbb910a99c win-wasapi: Don't reconnect when inactive
Unnecessary reconnect attempts may cause noticeable hitches.
2022-10-01 07:06:56 -07:00
jp9000
843fec57be obs-ffmpeg: Fix unpause causing certain encoders to fail
Due to the timeout detection, we need to factor in the current pause
offset to prevent pause from affecting the timeout.

Closes obsproject/obs-studio#7313
2022-09-30 13:09:29 -07:00
shinji3
9d7a6e7e8c obs-ffmpeg: Fix m3u8 recording in AMF 2022-09-29 15:47:26 -07:00
Aleix Pol
6fb83abaeb linux-pipewire: Close sessions as we are done with them
This way the stream can be cleaned up. Otherwise, we closed them all
when OBS closes which works but is not entirely correct.
2022-09-27 11:50:49 -03:00
Kurt Kartaltepe
1249ebe53d linux-capture: Fixup window name/class checking
There were a couple mistakes here that caused the fallback checks other
than window ID to fail to ever return valid results. This restores this
functionality that was broken since the c++/c transition.

fixes #7404
2022-09-24 20:42:57 -03:00
Ryan Foster
c5f1446ab3 obs-ffmpeg: Cap AMF encoder at 100 Mbps
The AMF docs specify that the maximum value for TARGET_BITRATE and
PEAK_BITRATE is 100,000,000 bit/s. Trying to set values above this
maximum value results in AMF choosing from its defaults instead of
capping at the maximum value. Let's cap at 100,000 Kbps in the UI to
prevent users from running in to this.

Fixes GitHub Issue obsproject/obs-studio#7423.
2022-09-24 16:38:17 -07:00
pkv
dba3401ceb obs-filter: Update model for NVIDIA Audio FX
This updates the model when swapping effects with NVIDIA Audio Effects.
This fixes a bug where the model was not updated. :(

Signed-off-by: pkv <pkv@obsproject.com>
2022-09-22 06:47:23 -07:00
jp9000
3df0c61c8c obs-ffmpeg: Fix when NVENC retries without psycho aq
In obsproject/obs-studio#6963, a crash was fixed when retrying NVENC
without psycho aq. Unfortunately, the code forgot to reinitialize the
session, and thus the retry always failed. This reinitializes the
session as it was likely meant to.
2022-09-22 02:42:32 -07:00
jp9000
3b7f15a046 obs-ffmpeg: Show detailed NVENC error messages 2022-09-22 02:42:32 -07:00
jp9000
6c474fecab obs-ffmpeg: use NvEncGetSequenceParams for NVENC header
The NvEncGetSequenceParams is the function used for extracting the
header, so let's use that rather than manually splitting the packet.
2022-09-22 02:42:32 -07:00
jp9000
b9f562729a obs-ffmpeg: Refactor NVENC defaults/properties
Removes unnecessarily duplicated code
2022-09-22 02:42:32 -07:00