Commit Graph
3767 Commits
Author SHA1 Message Date
jpark37andjp9000 d21891b3ca 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 11:28:47 -07:00
jpark37andjp9000 8efb109144 win-wasapi: Don't reconnect when inactive
Unnecessary reconnect attempts may cause noticeable hitches.
2022-10-01 07:14:06 -07:00
jp9000 30463ba91c 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-10-01 06:06:50 -07:00
shinji3andjp9000 dbab976843 obs-ffmpeg: Fix m3u8 recording in AMF 2022-10-01 06:06:50 -07:00
Aleix PolandJim e52ad554aa 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-28 19:33:04 -07:00
Kurt KartaltepeandJim 8e9d9fba24 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-28 19:33:04 -07:00
Ryan FosterandJim d314eafdc6 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-28 19:33:04 -07:00
pkvandjp9000 afb755f8a0 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 09:28:38 -07:00
PatTheMavandRyan Foster 07c4ba7b07 obs-transitions: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 14:28:59 -04:00
PatTheMavandRyan Foster 8388cc22d2 mac-avcapture: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 14:28:59 -04:00
PatTheMavandRyan Foster 6b56cfddb6 mac-capture: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 14:28:59 -04:00
PatTheMavandRyan Foster 2a721d92b3 coreaudio-encoder: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 14:28:59 -04:00
PatTheMavandRyan Foster 2dbd6c2a2f obs-vst: Make VST editor buttons reflect UI and VST loaded state
This changes the buttons to better reflect the state of the filter:
* When no VST is loaded, hide both buttons
* Check if VST is loaded before changing visibility
* Check if VST is loaded and editor is open before changing visibility
2022-09-21 11:05:01 -04:00
PatTheMavandRyan Foster 4a73b01581 obs-vst: Add public function to check for load state of VST
The bundle/dllHandle/soHandle property is private, so a getter method
is needed to fetch the status of a loaded VST.
2022-09-21 11:05:01 -04:00
PatTheMavandRyan Foster e0f1f95c7a obs-vst: Fix crash on macOS when no VST bundle was loaded
When loading a function from the bundle fails, the binary is unloaded
and the reference is released, but the pointer itself is not reset -
thus the check in the unload function will succeed and try to unload
an invalid bundle reference.

Similar to Linux and Windows, the pointer needs to be explicitly set
to a null pointer to ensure this check fails.
2022-09-21 11:05:01 -04:00
PatTheMavandRyan Foster 9c3c2edd6f obs-vst: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 11:05:01 -04:00
PatTheMavandRyan Foster 967bce5e15 mac-virtualcam: Fix distorted virtual cam image when using full range
The root cause of the issue is `swscale` dropping the second plane of
biplanar pixel data, resulting in an "incomplete" frame being fed to the
CVPixelBuffer.

As CVPixelBuffers have dedicated support for full range colour, use
these directly, which improves performance even further (as any
conversion for full range data is avoided as well).

To ensure that OBS does not implicitly enable conversion via `swscale`
a video conversion struct needs to be set in any case, ensuring that the
output range and colourspace match the output configuration.
2022-09-21 11:04:25 -04:00
PatTheMavandRyan Foster ee34d8fbfe mac-virtualcam: Fix virtualcam video on Intel-based Macs
This issue primarily seems to affect Intel-based Macs without unified
memory: While an IOSurface is supposed to be shared via a mach port
with other processes, each process needs to lock the surface during
access (as is common with other shared resources).

Apple Silicon-based Macs seem to be less affected as a switch between
GPU and CPU memory (which can happen dynamically for IOSurfaces) would
still point to the same unified memory.
2022-09-21 11:04:25 -04:00
gxalpha 332c1b4176 mac-capture: Undeprecate traditional capture sources on macOS 12
SCK has too many bugs on macOS 12 that don't like they will get fixed or
backported for it to be the recommended capture source.
This commit removes the "Deprecated" flag from traditional capture
source if the user is on macOS 12 (even if SCK is available) and marks
SCK as Beta.
2022-09-20 18:49:13 +02:00
Georges Basile Stavracas NetoandJim fb51f8b224 obs-outputs: Drop unused config file
The obs-outputs-config.h.in file is not actually used. It only
defines the FTL_FOUND variable, but the build system takes care
of that by setting a compiler argument for that.

Drop that file.
2022-09-17 16:38:50 -07:00
Wahaj DarandJim ff7720bfe8 rtmp-services: Add Livepush to service list
Adding latest Livepush rtmp endpoints to streaming service list
2022-09-17 16:37:13 -07:00
Stefan HoffmeisterandJim fbb7b93226 linux-v4l2: Remove redundant non-NULL check on FILE 2022-09-17 16:14:05 -07:00
Stefan HoffmeisterandJim e8f27c2a79 linux-v4l2: Fix resource leak on device open error path 2022-09-17 16:14:05 -07:00
Kurt KartaltepeandGeorges Basile Stavracas Neto b1c65af2b1 linux-capture: Ensure name pixmap is checked
The void cookie will never return an error unless we use the explicitly
checked version of this function.
2022-09-12 12:50:53 -03:00
WarmUpTillandJim 2a4f91bbee image-source: Update media states when source is de-/activated 2022-09-10 16:31:23 -07:00
jpark37andJim afeb78e022 graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
jpark37andJim 5fd22f3dfd graphics-hook: Remove unused code 2022-09-10 15:36:53 -07:00
jpark37andJim 6a29cc5876 decklink: Set output range and color space 2022-09-10 15:36:27 -07:00
jpark37andJim a45cb71f6e win-capture: Remove unused wildcard code 2022-09-10 15:34:09 -07:00
pkvandJim d0366671e4 obs-ffmpeg: Fix memory leak with mpegts
Fixes #7305.
Some copied data was not freed and also not all paths freed AVPackets.

Signed-off-by: pkv <pkv@obsproject.com>
2022-09-10 15:31:07 -07:00
jpark37andJim 894e37d0e1 libobs-winrt,win-capture: Allow forcing SDR
We don't know if there's a way to get window color space, so we've been
using the monitor color space of the window. This toggle forces OBS to
ignore the monitor color space, and assume the window is SDR.
2022-09-04 17:16:07 -07:00
jpark37andJim e583e86b35 image-source: Add JXR HDR support to slide show
Only supported on Windows.
2022-09-04 16:15:05 -07:00
jp9000 76c9b2b297 win-dshow: Update libdshowcapture 2022-09-02 18:00:26 -07:00
jp9000 bfa2053b08 Revert "win-dshow: Save and restore video device config props"
This reverts commit a36b5bee99.

After this commit was merged, apparently devices were not functioning
correctly for some people. Especially regarding their internal settings.
Just revert it for now.
2022-09-02 17:35:58 -07:00
jp9000 2f8d28f7fa decklink: Keep deckLinkConfiguration while in use
Apparently this annoying, stupid variable was leaking before the ComPtr
was added, which ironically was necessary to ensure devices worked.
After that ComPtr commit some devices stopped capturing properly.
Basically, it implies that this pointer needs to stick around while the
device is in use.

(Jim note: This was one of the most painful things I've ever had to
debug)
2022-09-02 17:09:12 -07:00
jp9000 9176348176 decklink: Remove unnecessary AddRef
Caused leaking memory
2022-09-02 17:09:12 -07:00
Richard StanwayandRodney 3332beece5 obs-ffmpeg: Fix seek offset being calculated incorrectly
If FFmpeg wrote data and then seeked back to immediately overwrite it,
the second seek would be skipped as our virtual offset was incorrectly
thinking it hadn't changed. This caused MP4 corruption when seeking
back in the file to write the moov atom.

Fixes https://github.com/obsproject/obs-studio/issues/7269
Fixes https://github.com/obsproject/obs-studio/issues/7144
2022-09-03 01:34:14 +02:00
jp9000 09da3ac439 win-dshow: Fix avermedia HDR tonemapping 2022-08-31 12:05:07 -07:00
gxalphaandRyan Foster bbd1e8b485 obs-ffmpeg: Always reset timestamp 2022-08-30 22:41:29 -04:00
jp9000 21da0b0462 obs-ffmpeg: NVENC "(new)" begone
It's about time to get rid of this being labeled as "(new)".

Also rename the FFmpeg variant. And make it more explicit when the
FFmpeg encoder is being used in the log file.
2022-08-30 17:05:36 -07:00
tt2468 b5bb5df58d plugins: Update obs-websocket to 5.0.2 (Crowdin translations) 2022-08-30 16:43:28 -07:00
Translation UpdaterandTranslation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Richard StanwayandJim 894bc4078b obs-ffmpeg: Log codec when creating NVENC encoders
With HEVC and H264 settings being near-identical, it was impossible to
figure out which codec was being used by context alone. This applies to
both ffmpeg output and jim-nvenc.

Fixes #6976.
2022-08-29 21:43:04 -07:00
jpark37andJim 8f6f761631 obs-ffmpeg: Rename NVENC type for clarity 2022-08-29 20:41:42 -07:00
jpark37andJim 26fce825a7 obs-ffmpeg: Fix NVENC HEVC regression
Forgot to switch enableEncodeAsync to 0.
2022-08-29 20:41:42 -07:00
Norihiro KamaeandJim f393adb7e6 plugins: Rename Partial to Limited in localization files
The commit 9409ce1ea7 rephrased Limited instead of Partial. Other
plugins should follow the updated phrase.
2022-08-29 10:03:12 -07:00
jpark37andJim 5c85f8ae17 obs-ffmpeg: Add AVContentLightMetadata to MPEG-TS 2022-08-29 10:02:49 -07:00
jpark37andJim 29be9bff7a obs-ffmpeg: Don't use NVENC async mode
Fixes hang on stop presumably because header read failed from being too
early?

Our buffering scheme makes async mode moot anyway.
2022-08-29 10:01:57 -07:00
gxalpha dbcafb62ff mac-capture: Remove explicit call to setBackgroundColor
This was necessary since the default background color was meant to be
clear, but wasn't set properly. The bug is fixed in macOS 13 Beta 6, so
we can remove this statement.
2022-08-29 14:38:52 +02:00
jpark37andJim 614119db21 obs-ffmpeg: Fix NVENC async usage pattern
Fix async API usage problems reported by NVIDIA.
2022-08-28 17:50:48 -07:00