Commit Graph

2965 Commits (7aedf7833859047dfd9a4ad85bd4da11b896c817)

Author SHA1 Message Date
jp9000 8ecf634ba7 Revert "rtmp-services: Add Odysee.com"
This reverts commit e876ad6596.
2021-05-09 00:55:16 -07:00
jpark37 9d7330ca44 obs-transitions: Blend in linear space
Color mismatch is apparent when using source transitions, which lerps
against transparent black and blends into the canvas nonlinearly. When
the transition is done, the blend switches to linear, leading to a pop.

Fix the issue by blending into the canvas in linear space. The lerp is
still nonlinear by design.
2021-05-08 20:53:44 -07:00
iamflorencejay e876ad6596 rtmp-services: Add Odysee.com 2021-05-08 15:31:43 -07:00
geekenmd 200c154238 rtmp-services: Add Brime Live service
rtmp-services: Add Brime Live service
2021-05-08 15:14:19 -07:00
jpark37 f40eede37a obs-filters: Fix unreferenced variable warning 2021-05-08 14:12:54 -07:00
jpark37 366b716f20 libobs-winrt,win-capture: Cursor toggle exceptions
A user has reported that toggling the cursor can cause exceptions.

Propagate that information upward, so we can reset the capture.

Display capture never needed to call the function in the first place.

Shuffle around window capture code to make a common reset function.

Builds on PR #4663.
2021-05-07 23:50:13 -07:00
jpark37 3514f4fea5 win-capture: Fix WGC disable index for display
Previously disabled DXGI because the index is wrong.
2021-05-06 13:58:14 -07:00
jpark37 54db450e43 image-source: Premultiply alpha in shader
Fixed-function alpha-blend kills precision of 16-bit alpha.
2021-05-05 09:43:34 -07:00
jpark37 67c2c45964 obs-filters: Fix shader for LUT on OpenGL 2021-05-05 09:42:11 -07:00
jpark37 da187ba73b image-source: Allow linear space alpha
Add support for applying alpha in linear space to match Photoshop
behavior in linear mode, and for just overall correctness. The default
setting is still nonlinear to match common user expectation though.
2021-05-03 22:58:17 -07:00
jp9000 7b4e4b99d2 obs-browser: Add SRGB flag 2021-05-03 19:13:41 -07:00
jpark37 01d065fa7d win-capture: Remove SRGB code
Not having OBS_SOURCE_SRGB is good enough now.
2021-05-03 01:19:56 -07:00
jpark37 128bd26a1f text-freetype2: Remove SRGB code
Not having OBS_SOURCE_SRGB is good enough now.
2021-05-03 01:19:56 -07:00
jpark37 78711fa648 win-capture: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
jpark37 41a294311c obs-text: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
jpark37 99eb509fe9 mac-capture: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
jpark37 9eaf2fa766 linux-capture: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
jpark37 819e634be4 image-source: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
jpark37 ae7718a765 libobs, obs-filters: SRGB backwards compatibility
Add OBS_SOURCE_SRGB to indicate sources that support SRGB rendering. We
can use this flag to know which sources do not know how to handle SRGB,
and disable accordingly inside obs_source_main_render().

We can also use this flag to clean up the filter interface and remove
the SRGB-specific functions. We also need to disable direct rendering if
the filter source wants to render SRGB, but the parent source does not
support it.

Scenes and groups are marked as having SRGB support, and those are
internal sources that we control.
2021-05-03 01:19:56 -07:00
jpark37 091bdb9832 obs-transitions: Remove dead code 2021-05-01 23:57:49 -07:00
Matt Gajownik 2a7fd297e4 win-dshow: Add support for ASUS coupled audio 2021-05-01 13:53:37 +10:00
Matt Gajownik 19883b74cf obs-browser: Update version to 2.14.2
* Fix bitmask typo when creating OBS version string
* Fix memory corruption when translating Refresh text
2021-05-01 13:50:47 +10:00
jp9000 6e05e8b325 text-freetype2: Fix empty text not updating source
Fixes a bug where if you update the source with empty text, it would
still continue to use the previous text value.
2021-04-30 18:38:31 -07:00
jpark37 e55bfa8e20 obs-filters: Increase opacity precision
For v2 filters, switch Opacity settings from integer [0, 100] to
floating-point [0.0, 1.0] with four decimal places for granular blacks.

Also multiply alpha in shader to maintain precision.
2021-04-30 00:19:49 -07:00
jpark37 8c513ab84c obs-filters: Fix bad math in Color Key v1
Do not treat incoming color uniform as premultiplied.
2021-04-29 13:35:50 -07:00
jpark37 607ee098c5 obs-filters: Handle premultiplied alpha input
Mostly by converting to straight alpha in shader when necessary.
2021-04-28 18:09:52 -07:00
Ryan Foster 8946f02270 obs-filters: Use correct branding for NVIDIA Noise Removal
The feature name is "Noise Removal" with that exact capitalization.
"NVIDIA Noise Removal" or "Noise Removal, powered by NVIDIA Broadcast"
are the two valid options for displaying this feature name in the UI.
2021-04-27 15:29:08 -04:00
Jim 81e9ad818f
Merge pull request #4587 from jpark37/alpha-hack
Apply alpha in nonlinear space for images and async video
2021-04-25 11:26:21 -07:00
jpark37 1f972a066c text-freetype2: Render in nonlinear space
Colors not working properly. Don't want to alter gradients (yet).
2021-04-25 11:10:33 -07:00
Jim 9b38bac480
Merge pull request #4573 from jpark37/nonlinear-transitions
Switch transition interpolation back to nonlinear SRGB
2021-04-25 11:09:57 -07:00
Richard Stanway 61964d519c obs-filters: Check NVAFX is enabled before using mutexes
Fixes a crash on destroy if NVAFX wasn't actually available.
2021-04-25 19:51:20 +02:00
pkv a5fab92d6f obs-filters: Better describe denoiser methods in menu
The description of the noise suppression methods was updated to
reflect cpu usage and quality in a more accurate manner.
2021-04-25 09:34:45 -07:00
pkv 535f4765ff obs-filters: RTX denoiser, initialize only output channels
This reduces the initialization from 8 to the actual number of output
channels.
2021-04-25 09:24:07 -07:00
Richard Stanway 64c353c019 obs-filters: Initialize NVIDIA AFX in a thread
Initializing NVAFX is slow as it has to load large models and can cause
significant impact to OBS' startup time. This moves NVAFX initialization
into a separate thread. NVAFX does not appear to be reentrant across
threads, hence a global mutex is also used to avoid reentrancy issues.

The downside of this change is that the first few seconds of audio after
adding the filter or starting OBS will not be filtered, but this is
unlikely to cause any real-world issues.
2021-04-25 09:24:07 -07:00
jpark37 b911e9b0cc image-source: Use DrawNonlinearAlpha
Match previous OBS alpha behavior.

DrawNonlinearAlpha requires premultiplied alpha blend state.
2021-04-25 02:13:34 -07:00
jpark37 a5cef2513b obs-transitions: Nonlinear SRGB, swipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 8c826f5bc3 obs-transitions: Nonlinear SRGB, slide
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 62bd3854f8 obs-transitions: Nonlinear SRGB, luma wipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 8e2096f621 obs-transitions: Nonlinear SRGB, fade
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 6124a373f6 obs-transitions: Nonlinear SRGB, fade to color
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
VodBox b5596cbf61 rtmp-services: Update Twitter.com 2021-04-20 13:47:27 +12:00
Joe Flateau e9b80235b4 rtmp-services: Add Luzento.com 2021-04-20 13:34:05 +12:00
Stéphane Lepin dc2b00a4dd obs-transitions: Crop output of stinger media player
This fixes an issue with Track Matte Stingers applied as visibility
transitions, where the side-by-side or stacked matte file mode would
result in the matte part of the video to "overflow" outside of the
transition's zone
2021-04-18 18:05:07 -07:00
Stéphane Lepin 661256e6de obs-transitions: Remove scaling of track matte texture 2021-04-18 18:05:07 -07:00
Georges Basile Stavracas Neto 7a87777225 linux-v4l2: Use flatpak-spawn when inside a Flatpak sandbox
It is not possible to run host system executables like modinfo, pkexec,
and modprobe inside a Flatpak sandbox. However, Flatpak provides a way
to run command on the host system: the flatpak-spawn executable.

flatpak-spawn is a tiny helper that, when executed with the '--host'
parameter, talks to the org.freedesktop.Flatpak D-Bus interface to run
and retrieve the return value of the executable. This provides OBS Studio
a way to escape this sandbox limitation without opening large holes in
the sandbox.

Make v4l2's implementation of VirtualCam run system commands using
flatpak-spawn when inside a Flatpak sandbox. The detection of the sandbox
is done by checking the existence of the /.flatpak-info file, which is
created by Flatpak itself, and only exists inside the sandbox. If OBS
Studio is not running inside a Flatpak sandbox, run the exact same command
it used to run before this commit.

Add the permission to talk to the org.freedesktop.Flatpak D-Bus interface
to the Flatpak manifest, so we can run flatpak-spawn with the '--host'
parameter.

Notice that the same constraints apply with and without Flatpak: the host
system needs to have the v4l2loopback kernel module available for the v4l2
implementation of VirtualCam to work.
2021-04-18 17:27:33 -07:00
Richard Stanway 47fcbdb0c9 win-dshow: Fix virtual camera CPU usage, add more comments
My previous commits would rescale the placeholder for output on every
frame which was not CPU efficient. Now we store a copy of the scaled
placeholder and update it any time the resolution / FPS / format
changes.

A new function GetOutputBufferSize was added to allow calculating the
output size when needed. The existing code assumed a 12-bit format if
the placeholder didn't load, which could cause grey / green output.

An optimization was made to only load and scale the placeholder once
the virtual output starts, as many applications load and unload the
filter multiple times during enumeration of devices.

Various comments were also added to help clarify how the filter works.
2021-04-15 03:11:33 +02:00
jpark37 92eb756dab obs-filters: Increase luma key precision 2021-04-13 12:43:25 -07:00
gxalpha 5708e64d11 mac-virtualcam: Hide logging behind debug flag
Hides the DLog and DLogFunc macros behind the -DDEBUG flag, causing the
logs to only appear in testing environments.

On production build, calls to these macros will result in nothing
happening.
2021-04-13 06:02:15 -07:00
GingerAudio ec0bf68e4a mac-capture: Add another virtual output loopback device
Adds "GroundControl" fake output device for audio loopback on macOS.
2021-04-13 05:57:41 -07:00
gxalpha b4f940533c mac-virtualcam: Fix memory leaks
Fixes some memory leaks Xcode has detected
2021-04-13 05:22:27 -07:00