3479 Commits

Author SHA1 Message Date
Matt Gajownik
0744e260e3 obs-browser: Don't auto-focus, remove init hack
a4e163e - Remove CefInitialize hack argument on Windows
a6df681 - cmake: Fix handling of debug wrapper libraries
a707cb7 - Don't allow browser panels to steal focus on navigate
2022-06-20 18:30:53 +10:00
Norihiro Kamae
a255b0f742 aja: Implement buffering property
Buffering inside libobs is enabled by default and it causes latency of
video. This commit provides a property to switch the buffering.
Since the latency of the buffering changes every startup, set the
default to unbuffered mode, though the previous implementation was
enabled buffering.
2022-06-18 16:12:20 -07:00
Grzegorz Godlewski
c5015d0e6c linux-v4l2: Add support for H.264 2022-06-17 18:49:12 +10:00
gxalpha
a1f9170180
mac-virtualcam: Free virtualcam data when destroying
Fixes a memory leak introduced in db733032e
2022-06-16 18:45:24 +02:00
Exeldro
e52018f210 win-dshow: Save and restore video device config props 2022-06-15 12:30:09 -07:00
tytan652
a9cb952628 linux-pipewire: Restore PipeWire minimim version requirement
a147315f33 removed it without adding it to linux-pipewire.
2022-06-15 13:50:33 -03:00
jp9000
a31d7acb14 obs-outputs: Fix missing function declaration 2022-06-15 00:52:43 -07:00
jp9000
7ba9db3744 obs-outputs: Reset TLS on reconnect
Reverts e8b2b2092bd3e and properly fixes an issue where bad TLS data
would persist through reconnections when the connection is encrypted.
2022-06-15 00:31:08 -07:00
Patrick Heyer
1f72dad245
Merge pull request #6573 from fabianishere/feat/mac-virtualcam
mac-virtualcam: Avoid transcoding where possible
2022-06-12 15:52:05 +02:00
Norihiro Kamae
8a41c7298f decklink: Avoid sending 0x0 frame to libobs
When the mode is set to auto, the API sometimes send frames with 0x0
size. Without filtering such frames, which causes libobs to output error
messages.
2022-06-11 16:22:22 -07:00
tytan652
6cc7cf3d55 obs-ffmpeg: Remove codec property from VAAPI encoder
Encoders have only one codec so this property is not needed.

Also rename the encoder to "FFMPEG VAAPI H.264".
2022-06-11 16:09:11 -07:00
Fabian Mastenbroek
37c76abf0d
mac-virtualcam: Fix CMIO errors due to unsettable properties
This change fixes an issue with the CMIO DAL plugin where the CMIO
subsystem would log multiple errors when starting the virtual camera,
due to certain properties that could not be set (frame rate and format).

For now, we just ignore the assignment, but mark the property as
settable to suppress the error messages that are reported by the CMIO
subsystem.
2022-06-10 14:29:55 +02:00
Fabian Mastenbroek
40cb92a7a5
mac-virtualcam: Fix port leakage in Mach server
This change fixes an issue in the Mach server exposed by the macOS
virtual camera for OBS, where it would not invalidate ports that were
disconnected by the remote application, causing sporadic crashes.

These crashes can be reproduced in the previous builds by opening the
virtual camera in a remote application and closing the application
(without stopping the virtual camera).
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
db733032e0
mac-virtualcam: Do not rely on global state
This change updates the implementation of the mac-virtualcam plugin to
not use any global state and instead rely on the state object that is
passed by the OBS module system.

This approach is similar to the virtual camera implementations for Linux
and Windows.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
5edabfe7c1
mac-virtualcam: Remove unused CMSampleBuffer utility functions
This change removes the unused CMSampleBuffer utility functions that
were still left from the previous implementation. Since we construct the
CMSampleBuffer directly from an IOSurface, we do not need any custom
construction logic anymore, since that is now performed by the OBS
plugin.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
202eb8f513
mac-virtualcam: Prevent output conversion if possible
This change updates the mac-virtualcam implementation to conditionally
enable conversion of the output video format. Previously, the output
video was always converted into UYVY. However, this conversion exhibits
high CPU usage, as reported in:
https://github.com/johnboiles/obs-mac-virtualcam/issues/102

Therefore, we disable conversion when the selected output format (e.g.,
NV12) is natively supported by CoreVideo's pixel buffers.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
8683eb10e1
mac-virtualcam: Support multiple AV planes
This change updates the plugin to support video formats that contain
multiple planes (such as NV12). Such functionality is necessary to
prevent transcoding the raw video data, which is often delivered in a
planar format.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
29ca91852b
mac-virtualcam: Pool pixel buffers
This change updates the mac-virtualcam implementation to pool the
CVPixelBuffers used to share the output frames. This allows the plugin
to recycle the pixel buffers used by the plugin.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
aa3781fde9
mac-virtualcam: Use IOSurface to share output with virtual cameras
This change updates the virtual camera implementation on macOS to
utilize IOSurface to share the output feed with the virtual cameras.

By using IOSurface, we remove the need for copying the frames across
multiple buffers, since they can be shared across Mach connections using
zero-copy.
2022-06-10 13:36:54 +02:00
Fabian Mastenbroek
9e29be5c79
mac-virtualcam: Build DAL plugin for ARM64e target as well
This change fixes an issue where the DAL plugin would not load due to
not supporting the architecture arm64e. We update the build
configuration to build a universal binary that includes arm64e as well.

See https://github.com/obsproject/obs-studio/issues/6285 for more
information regarding this issue.
2022-06-10 13:34:17 +02:00
jp9000
e8b2b2092b obs-outputs: Clear RTMP data before initiating connect
Sometimes when reconnecting the internal RTMP data is not cleared
(particularly the TLS data). This can cause TLS data to carry over from
one connection to another, causing issues with the secondary connection.
2022-06-06 10:12:50 -07:00
Service Checker
d30484cef6 rtmp-services: Remove defunct servers/services 2022-06-05 01:40:20 +02:00
evandroduarte
47e2398ce5 rtmp-services: Update Eventials ingests 2022-06-01 22:04:14 +02:00
Richard Stanway
898256d416 obs-ffmpeg: Add a circlebuf to buffer output in ffmpeg-mux
This adds a circular buffer to ffmpeg-mux when writing to a file.
Output from ffmpeg is buffered so that slow disk I/O does not block
ffmpeg writes, as this causes the pipe to become full and OBS stops
sending frames with a misleading "Encoding overloaded!" warning. The
buffer may grow to 256 MB depending on the rate of data coming in and
out, if the buffer is full OBS will start waiting in ffmpeg writes.

A separate I/O thread is responsible for processing the contents of
the buffer and writing them to the output file. It tries to process 1 MB
at a time to minimize small I/O.

Complicating things considerably, some formats in ffmpeg require seeking
on the output, so we can't just treat everything as a stream of bytes.
To handle this, we record offsets of each write and try to buffer as
many contiguous writes as possible. This unfortunately makes the code
quite complicated, but hopefully well commented.
2022-05-30 10:06:09 -07:00
Jim
1705edf8f9
Merge pull request #6475 from GeorgesStavracas/gbsneto/drop-glx
Au revoir, GLX
2022-05-28 17:04:17 -07:00
tytan652
9a33e49087 cmake: Fix enabling PulseAudio monitoring
Also adds a warning if null monitoring is "enabled".
2022-05-28 18:36:36 -04:00
jpark37
3b0ccbb77d obs-x264: Use period for localized sentence 2022-05-28 18:31:55 -04:00
jpark37
f1e0844a58 obs-ffmpeg: Use period for localized sentences 2022-05-28 18:31:55 -04:00
jpark37
8e2e1e212c obs-x264: Convey lack of Rec. 2100 support 2022-05-28 08:36:18 -07:00
jpark37
f21ea744f8 obs-ffmpeg: Localize NVENC error dialog messages
Localize messages for lack of 10-bit support, and exceeding the hardware
B-frame limit.
2022-05-28 08:36:18 -07:00
jpark37
699e89d859 obs-ffmpeg: Improve dialog text for NVENC errors
Add dialog messages for lack of 10-bit support, and exceeding the
hardware B-frame limit. Also move code around to test these just once.
2022-05-28 06:48:27 -07:00
jpark37
fa8f1c33e9 win-dshow: Removed used UNUSED_PARAMETER 2022-05-27 14:56:47 -07:00
jpark37
235e025570 win-capture: Rename Rec. 2020 to Rec. 2100 2022-05-27 04:38:02 -07:00
Georges Basile Stavracas Neto
ca2d02c2ce Drop GLX renderer
"They must often change, who would be constant in happiness or wisdom"

 - Confucius
2022-05-24 14:31:48 -03:00
Georges Basile Stavracas Neto
ddb692ab2d linux-capture: Drop GLX code paths
Default to EGL and remove the sad amount of hacks from xcomposite.
2022-05-24 14:30:14 -03:00
Kurt Kartaltepe
fb639e303c linux-capture: Fix map-like behavior for watcher
The original PR missed assigning the `idx` variable in unregister. When
compiled without asserts this would silently not delete sources. Instead
correctly assign idx and skip unregistration if the source doesnt appear
registered.

fixes #6532
2022-05-24 08:16:10 -03:00
gxalpha
cedc397b9f mac-avcapture: Capture audio if supported
Some webcams, or other AVCaptureDevices like connected iOS devices which
are supported since 162450c, have an audio output which so far got
ignored.
Now, if supported, the audio will be captured alongside the video. For
existing sources, the properties have a button enabling this; while new
sources have it enabled by default.
2022-05-23 08:59:24 -04:00
gxalpha
bfa7f1a88e obs-ffmpeg: Remove duplicate "FFmpeg Options" locale 2022-05-21 15:45:17 -07:00
derrod
56264befab rtmp-services: Apply automatic formatting to JSON 2022-05-20 08:55:56 -04:00
Matt Gajownik
2960669f9a rtmp-services: Add JSONSchema definitions for services 2022-05-20 20:25:19 +10:00
Torge Matthies
5ac6c03a8a obs-ffmpeg: Initialize mapped_res field in nv_texture_init
Otherwise it might never be initialized and nv_texture_free might unmap
a non-existant resource.
2022-05-19 16:36:14 -07:00
Torge Matthies
fe776a83eb obs-ffmpeg: Reserve jim-nvenc textures buffer space
Textures dynamic array buffer space was not reserved.
2022-05-19 16:36:14 -07:00
tytan652
831fe03048 vlc-video: Fix sign-compare warning 2022-05-19 17:10:47 -04:00
Matt Gajownik
73e6df5d09 obs-ffmpeg: Fix memory leak 2022-05-17 23:13:17 +10:00
jpark37
d70c6b9dfb obs-ffmpeg: Set 1000 nits for HLG metadata 2022-05-17 05:18:46 -07:00
Richard Stanway
c7e83518e1 win-wasapi: Log source name when showing device errors
Sometimes users have a forgotten source pointing to an invalid device,
which is very difficult to locate without us showing the source name.
2022-05-17 02:47:08 -07:00
pkv
12d1f1c335 obs-ffmpeg: Fix 4 channel layout in ffmpeg-mux
Previously SPEAKER_4POINT0 was assigned to AV_CH_LAYOUT_QUAD, but later
was changed to AV_CH_LAYOUT_4POINT0 [1]. The change was forgotten in
obs-ffmpeg-mux. This is remedied here.
[1] 67e48ecc2c

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
pkv
5b6cc73c24 obs-ffmpeg: Fix for channel layout 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 ffmpeg-mux,
obs-ffmpeg-output & to obs-ffmpeg-audio-encoders.

[1] Bump minor versions after the channel layout changes
cdba98bb80
[2] lavc: switch to the new channel layout API
548aeb9383
[3] avutil/channel_layout: Add a new channel layout API
086a804806
[4] avframe: switch to the new channel layout API db6efa18
db6efa1815

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
stopforumspam
035ac5e3b7 obs-ffmpeg: Allow setting FFmpeg options for media sources 2022-05-16 15:17:13 -04:00
Grzegorz Godlewski
b98ce32670 linux-v4l2: Fix camera reconnecting issue
Unable to add device after OBS start. Function device_added is never
called. HAVE_UDEV is not set correctly by cmake.
2022-05-16 13:29:52 -04:00