0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

12098 Commits

Author SHA1 Message Date
R1CH
eef0faf741 obs-filters: Ensure gain is positive for upward compressor
The gain should be positive for an upward compressor. Initially, the
gain would be zeroe'd below -60 dB to ensure noise is not amplified by
the upward compressor. This created a discontinuity at -60 dB since
just above -60 dB, the audio is boosted by +20 dB (at default
settings). This was fixed in commit 50db097 which decreased smoothly
the gain so that it's 0 dB at -60 dB. However that commit forgot to
limit the gain decrease which was negative below -60 dB.
This is fixed by the current commit.
Additionally initialization allowed -inf gain. We hard limit to positive
gains only as they should be for an upward compressor.
The bugfix was found by R1ch and put in form by pkv.

Co-authored-by: pkv <pkv@obsproject.com>
Signed-off-by: pkv <pkv@obsproject.com>
2023-02-04 02:16:53 -08:00
derrod
96aef4f048 CI: Publish docs to Cloudflare Pages
(cherry picked from commit 0a18c006ca)
2023-02-01 12:03:31 +01:00
Jim
414dccb2c3 libobs: Update version to 29.0.1 2023-01-31 22:58:00 -08:00
tytan652
ee7557e14c UI: Unblock encoder comboboxes signals before change
Signals are blocked while encoder is enforced, those need to be
unblocked before setting the new encoder.

(cherry picked from commit 10880d6b21)
2023-01-31 16:08:40 -08:00
gxalpha
78085b38a8 UI: Re-raise properties window after picking files on macOS
(cherry picked from commit b5b293fe72)
2023-01-31 16:08:40 -08:00
Richard Stanway
3464772d3c obs-ffmpeg: Use gai_strerrorA for error logging on Windows
Avoids wide characters in the format string which cause truncation.

(cherry picked from commit 668775f4f0)
2023-01-31 16:08:40 -08:00
Richard Stanway
5ee25058f8 obs-filters: Fix wrong number of arguments to error macro
(cherry picked from commit 062cfcf63d)
2023-01-31 16:08:40 -08:00
Richard Stanway
d58efd64b1 virtualcam-module: Update filter size immediately when used in OBS
Fixes a crash due to the previous output size being used when scaling
the frame.

(cherry picked from commit 9b1f7d6d21)
2023-01-31 16:08:40 -08:00
pkv
6f8ee7abbe obs-filters: Improve upward compressor with soft knee
This adds a knee setting to the upward compressor.

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 10e6d0fbd0)
2023-01-31 16:08:40 -08:00
Norihiro Kamae
6f96ad48ed obs-filters: Make continuous gain on upward compressor
The upward compressor has a -60 dB threshold to stop increasing the
gain. At the threshold, the gain was not continuous, which is not ideal.

Co-authored-by: pkv <pkv@obsproject.com>
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 50db09760c)
2023-01-31 16:08:40 -08:00
pkv
fbeede9349 obs-filters: Fix expander and upward compressor above threshold
Fixes behaviours above threshold for expander and upward compressor.
Fixes issues #8052 & #8030 .

Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit f625bb579f)
2023-01-31 16:08:40 -08:00
Barnabás Pőcze
0f4d0eed25 libobs-opengl: Close display when destroying X11/EGL platform
Currently, the X11 display may be leaked when the X11/EGL
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.

Fixes: 2fd8a6df55 ("libobs-opengl: Introduce the X11/EGL winsys")
(cherry picked from commit 8e96d47cd3)
2023-01-31 16:08:40 -08:00
Barnabás Pőcze
8c9de5e255 libobs-opengl: Do not close X11 platform display on error
The platform display is not owned by libobs, it should not
be closed. Doing so results in heap use-after-frees when
Qt components try to use it while trying to show
a message box about the failure:

  info: Initializing OpenGL...
  error: Failed to initialize EGL: EGL_BAD_ACCESS
  error: Failed to create context!
  error: device_create (GL) failed
  error: Failed to initialize video.  Your GPU may not be supported, or your graphics drivers may need to be updated.
  =================================================================
  ==2320345==ERROR: AddressSanitizer: heap-use-after-free on address 0x621000018668 at pc 0x7fcb75e20d6e bp 0x7ffe88d0e910 sp 0x7ffe88d0e900
  READ of size 8 at 0x621000018668 thread T0
      0 0x7fcb75e20d6d in XInternAtom /.../libx11/src/IntAtom.c:175
      1 0x7fcb6bf5edfd in Kvantum::ThemeConfig::getCompositeSpec()
      2 0x7fcb6bf0eb19 in Kvantum::Style::setSurfaceFormat(QWidget*) const
      3 0x7fcb6bf11bae in Kvantum::Style::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const
      4 0x5585cbce70b8 in OBSIgnoreWheelProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const /.../obs-studio/UI/obs-proxy-style.cpp:88
      5 0x7fcb85826515  (/usr/lib/libQt6Widgets.so.6+0x226515)
      6 0x7fcb859dbf1d  (/usr/lib/libQt6Widgets.so.6+0x3dbf1d)
      7 0x7fcb859dc5f0 in QMessageBox::QMessageBox(...)
      8 0x7fcb859dc6b1  (/usr/lib/libQt6Widgets.so.6+0x3dc6b1)
      9 0x5585cbd2fb31 in OBSErrorBoxva /.../obs-studio/UI/qt-wrappers.cpp:48
      10 0x5585cbd2fd34 in OBSErrorBox(QWidget*, char const*, ...) /.../obs-studio/UI/qt-wrappers.cpp:55
      11 0x5585cbcc3f36 in run_program /.../obs-studio/UI/obs-app.cpp:2475
      12 0x5585cbcc52b4 in main /.../obs-studio/UI/obs-app.cpp:3358
      13 0x7fcb82e3c28f  (/usr/lib/libc.so.6+0x2328f)
      14 0x7fcb82e3c349 in __libc_start_main
      15 0x5585cbbd2f54 in _start

Fixes: 137966e01f ("libobs-opengl: Try to use the platform display if available")
(cherry picked from commit dee7ef8512)
2023-01-31 16:08:40 -08:00
Barnabás Pőcze
53f6c1a215 libobs: Close display when destroying X11 hotkey platform
Currently, the X11 display is leaked when the X11 hotkey
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.

Fixes: bcb04bb800 ("libobs: Open a separate X11 connection for hotkeys")
(cherry picked from commit 5810571e53)
2023-01-31 16:08:40 -08:00
tytan652
3c6aaeb142 cmake,obs-ffmpeg: Refactor Libva finder
This refactor adds Libva DRM, required for obs-ffmpeg

(cherry picked from commit ee144377dc)
2023-01-31 16:08:40 -08:00
derrod
c55ce029af updater: Pass AppData path to elevated process
(cherry picked from commit 778cf5a96a)
2023-01-31 16:08:40 -08:00
jpark37
d66b9bd8e9 win-capture: Support EnumDisplayDevices failure
Seeing EnumDisplayDevices fail in the wild, so use GetMonitorInfo name
when the persistent name is unavailable.

(cherry picked from commit 0b30ff1deb)
2023-01-31 16:08:40 -08:00
derrod
ab69f5db05 updater: Add additional status messages
(cherry picked from commit ffd7202168)
2023-01-31 16:08:40 -08:00
jpark37
45dd24ecb1 libobs: Fix SDR async video on non-SDR targets
Bug was seen when projecting SDR video capture on WCG displays.

(cherry picked from commit 792f8473ee)
2023-01-31 16:08:40 -08:00
jpark37
a0b12d8751 libobs-d3d11: Log monitor color depth
(cherry picked from commit 2e7f7acfeb)
2023-01-31 16:08:40 -08:00
derrod
063cc0c865 UI: Work around Qt dock restore crash
(cherry picked from commit 3dcf68f8ed)
2023-01-31 16:08:40 -08:00
jpark37
43086717c4 obs-ffmpeg: Tell FFmpeg that BGRA uses alpha
Prevents alpha from getting dropped with custom encoders.

(cherry picked from commit 3462ea3fda)
2023-01-31 16:08:40 -08:00
WarmUpTill
80b16e63f5 frontend-tools: Fix crash on non X11 windowing systems
(cherry picked from commit 7d26721be5)
2023-01-31 16:08:40 -08:00
Kurt Kartaltepe
f610bcff38 libobs-opengl: Fixup dmabuf queries on X11
Previously we passed the wrong display and formats/modifiers could not
be queried. This prevented pipewire sources from negotiating texture
sharing on x11.

(cherry picked from commit 4216991413)
2023-01-31 16:08:40 -08:00
Richard Stanway
7fb8b7dd75 obs-filters: Improve NVIDIA effects SDK version checks
- Don't repeatedly query version at runtime in case a user installs the
  SDK while OBS is running
- Restore default DLL search directory
- Don't show outdated SDK message if the SDK is not found
- Protect minimum version macro with brackets

(cherry picked from commit 5a4283816d)
2023-01-31 16:08:40 -08:00
Jan Beich
c24c137fa6 libobs/graphics: Enable DMABUF on FreeBSD and DragonFly
Required under Wayland (wlrobs) on FreeBSD and DragonFly. DMABUF was
already partially exposed after c50c625555.

(cherry picked from commit c082c4a74d)
2023-01-31 16:08:40 -08:00
tt2468
fb371a340b libobs: Fix loading of custom_size for empty scenes
Previously, `custom_size` was checked at the end of the `scene_load`
function. If the scene contained no "items" array, the `custom_scene`
loading code would never be run.

This moves the `custom_size` code above the return statement.

(cherry picked from commit 018ce16703)
2023-01-31 16:08:40 -08:00
Ryan Foster
58f50a8bbe CI: Revert Qt to 6.3.1 on Windows
(cherry picked from commit af59a903e1)
2023-01-31 16:08:40 -08:00
tt2468
25fba67fe8 UI: Remove extra encoder function calls
The audio_t and video_t objects are already applied in the parent
functions already.

(cherry picked from commit 5a68d3aaf5)
2023-01-31 16:08:40 -08:00
tt2468
a25a4c20b4 UI: Fix logging of output ID when start fails + code cleanup
Previously, an output that does not implement `info.get_output_type`
would result in these log messages saying `(null)`. This uses the actual
ID directly from the output itself instead.

Also removes two extra calls to `obs_encoder_set_video()` as they are
redundant and unnecessary.

(cherry picked from commit 8f0e5a72d6)
2023-01-31 16:08:40 -08:00
tt2468
aa1f7b275b libobs: Fix logging of remaining views
OBS has been logging `1 views remain at shutdown` when in reality there
are not technically any views remaining. When views are removed, the
view itself is destroyed immediately, but the mix remains, to be
garbage collected by the graphics thread.

In this case, the view has already been removed, but the graphics
thread has not run an interation and cleaned up the mix, so this
log message appears.

Fixes the issue by checking if a mix actually has an assigned view,
instead of blindly logging existing mixes.

(cherry picked from commit 25df3e183e)
2023-01-31 16:08:40 -08:00
tt2468
2fcac0e363 libobs: Prevent encoders from initializing/starting if no media is set
This fixes a case of undefined behavior, where encoders can try to init
or start without actually having any video_t or audio_t object
assigned.

(cherry picked from commit c69e40734d)
2023-01-31 16:08:40 -08:00
tt2468
7d579b5a07 libobs: Remove unused internal encoder util function
Was previously introduced in a0f679bc40,
but has since been made unused.

(cherry picked from commit 7e30d3f8a2)
2023-01-31 16:08:40 -08:00
tt2468
9ead538009 libobs: Allow sending NULL to obs_encoder_set_video/audio()
There is currently no way to clear a video_t or audio_t object from an
encoder once applied. `audio_t`/`video_t` objects can be destructed at
any time, and it is dangerous to prevent these object references from
even being cleared.

This does not fix the issue where destroying an audio/video object does
not clear the reference from all subscribed encoders.

(cherry picked from commit eb0d9dc5d2)
2023-01-31 16:08:40 -08:00
tt2468
0ce729ea78 libobs: Protect some encoder functions from being used while active
Protect `obs_encoder_set_video()` and `obs_encoder_set_audio()` from
being used if the encoder is active. Changing these values while active
is undefined behavior.

(cherry picked from commit dfc20bbb31)
2023-01-31 16:08:40 -08:00
PatTheMav
00b4c9c88a mac-virtualcam: Fix memory access issues for shared IOSurfaces
The DAL plugin-based virtualcamera shares data between OBS and the
plugin using an IOSurface. IOSurface locks are necessary to ensure
race conditions between data generation (OBS side) and consumption
(virtual camera side) and also that an IOSurface is not offloaded to
GPU memory when it is indeed needed in CPU memory.

Also moves the invalidation of the NSMachPort for the frames to after
the IOSurface data has been converted into a pixelbuffer and added to
the frame queue of the virtual camera, as an early invalidation will
cut off access to the pixel data shared with the DAL plugin.

(cherry picked from commit 447adfbe38)
2023-01-31 16:08:40 -08:00
tt2468
8aa806adf8 libobs: Remove extra space in output reconnect log message
It has been bothering me to no end.

(cherry picked from commit 78d31322b2)
2023-01-31 16:08:40 -08:00
tt2468
d9a5aaafc9 docs: Document a few missing obs_output_t function calls
- `obs_weak_output_references_output`
- `obs_output_get_id`
- `obs_output_output_caption_text[1/2]`

(cherry picked from commit 24e9f82f87)
2023-01-31 16:08:40 -08:00
Exeldro
a5808c9444 libobs: Fix stopping transitions that are not active
(cherry picked from commit eb35b07f44)
2023-01-31 16:08:40 -08:00
jpark37
7d81905d4b win-capture: Show Force SDR setting on Windows 10
Was using wrong bool for visibility.

(cherry picked from commit fb58f60ae4)
2023-01-31 16:08:40 -08:00
Kurt Kartaltepe
0a7228f1da libobs-opengl: Drop gl pointers on device_leave_context
Mac was already dropping a most of these when leaving contexts,
this patch brings the same drops to linux and also drops vertex/index
buffers that were noticed as leaking across contexts and resulting in
invalid bindings by later draws. Especially with the new spacing labels.

(cherry picked from commit 599b017881)
2023-01-31 16:08:40 -08:00
derrod
a166ca6b4f updater: Fix portable OBS not being relaunched correctly
(cherry picked from commit 143877c8ff)
2023-01-31 16:08:40 -08:00
Norihiro Kamae
375da1a036 libobs/util: Fix text-lookup not always case-insensitive
Convert `lookup` to upper-case before creating the tree so that later
code does not need to consider the case-insensitivity.
When converting to upper-case, use `toupper` instead of adding 0x20 so
that the behavior is consistent with `astrcmpi_n`.

(cherry picked from commit 1805712f46)
2023-01-31 16:08:40 -08:00
gxalpha
4e4a803b3b UI: Reintroduce spacing to YouTube dialog buttons
(cherry picked from commit 2133f47658)
2023-01-31 16:08:40 -08:00
Chris (Flaeri)
ab46d09f17 obs-ffmpeg: Remove forced x264 and aac for RTMP
Remove code forcing x264 and ffmpeg aac encoder. People using custom
ffmpeg output should be able to use other video and audio encoders when
streaming with RTMP, given its h264 or aac.

(cherry picked from commit 1166e504bb)
2023-01-31 16:08:40 -08:00
kevin.dww
37dd362825 rtmp-services: update Mildom servers
(cherry picked from commit 321776efa3)
2023-01-31 16:08:40 -08:00
derrod
807c0c386d updater: Deduplicate Downloads 2023-01-12 11:37:26 -08:00
pkv
ace518804b obs-filters: disable NVIDIA FX audio model loading when SDK is not installed
This fixes a bug reported by R1ch internally.
If someone uses NVIDIA noise suppression filter and later uninstalls
the SDK, there can be a crash because the filter tries to load the
models.

Signed-off-by: pkv <pkv@obsproject.com>
2023-01-10 13:32:29 -08:00
Translation Updater
783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
Richard Stanway
930c65e7c3 UI: Prevent negative "disk full in" calculation when no output
If the output is paused the average bitrate will be zero, resulting in
infinite time until disk is full and int overflows. Similarly, if no data
has been collected yet, the result will be NaN and undefined behavior.
2023-01-07 15:49:13 -08:00