Commit Graph

4010 Commits

Author SHA1 Message Date
PatTheMav
bb2a99cec8 obs-transitions: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
3175e699ea obs-filters: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
19c131c981 obs-ffmpeg: Remove unused variables 2023-02-18 15:22:33 -08:00
PatTheMav
6e0d802874 obs-ffmpeg: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
PatTheMav
c4d60f47c7 decklink: Add missing newlines at the end of files 2023-02-18 15:22:33 -08:00
PatTheMav
ce9854a11b aja: Remove unused variables 2023-02-18 15:22:33 -08:00
pkv
e355a32066 obs-ffmpeg: Relax 'lookahead' constraint when bitrate is updated
When bitrate is updated, a check against 'lookahead' setting is done.
If 'lookahead' is enabled, the bitrate update is disabled.
We indeed used to observe crashes with nvenc when frequent bitrate
resettings were effected while lookahead option was enabled.
But recent tests have shown that the issue is gone.
As a result this commit allows 'lookahead' with bitrate live update.

Signed-off-by: pkv <pkv@obsproject.com>
2023-02-17 15:41:43 -05:00
Lukáš Cezner
5d1f0efc43 vlc-video: Fix videos larger than 1080p being squished
Fix an overflow in display_width caused by unsafe multiplication of the
video width by Sample Aspect Ratio.
2023-02-17 14:59:08 -05:00
Richard Stanway
e280fd6cd0 obs-ffmpeg: Add GeForce MX350 variant to unsupported NVENC list 2023-02-17 11:19:08 -05:00
Richard Stanway
25f01357e6 obs-ffmpeg: Handle NV_ENC_ERR_NO_ENCODE_DEVICE error 2023-02-17 11:19:08 -05:00
Richard Stanway
7dae8d307c obs-ffmpeg: Restore bad GPU index NVENC error message
FFmpeg wipes priv_data if the encoder fails to start, so we need some
way of knowing if the GPU index was non-zero. This is a bit ugly but the
best way to do it for now.
2023-02-17 11:19:08 -05:00
Richard Stanway
e593335086 obs-ffmpeg: NVENC error logging improvements
This writes the result of nvEncGetLastErrorString to the last encoder
error instead of just the log file. This makes it user-visible, which
should help users diagnose and solve the problem.

Also strips off leading colons from NVENC error strings as these can
look odd given our format string. An example of such an error:

::NV_ENC_TWO_PASS_FULL_RESOLUTION is only supported multipass encoding
on this architecture.
2023-02-17 11:19:08 -05:00
univrsal
cddf69d69f linux-jack: Prepend devices with "OBS Studio: "
This makes it more clear that the device belongs to OBS.
Fixes #7988
2023-02-16 15:17:11 -03:00
Richard Stanway
0121533e3e win-capture: Convert monitor name to UTF-8 for display
Also increase the buffer size to account for potential wide characters
consuming many bytes.
2023-02-15 15:36:13 -05:00
Jan Beich
0a257a71e8 plugins: Enable linux-pipewire on FreeBSD 2023-02-15 14:44:36 -05:00
Jan Beich
e98c9fbd65 linux-pipewire: Drop unused Linux-only header
<dma-buf.h> provides DMA_BUF_IOCTL_* which were never used by OBS.
2023-02-15 14:44:36 -05:00
Paul Hindt
003241511c aja: Add audio channel selection to capture
Adapted audio repacker for 32-bit samples,

with an ifdef to use SIMD or C version.
2023-02-15 10:38:39 -05:00
练亮斌
b5b3563479 vlc-video: Support subtitle track up to 1000 2023-02-15 10:05:28 -05:00
Georges Basile Stavracas Neto
be629b93ce linux-pipewire: Demote error to debug message
Receiving buffers flagged as corrupted, or empty, is a casualty of
how things are implemented in various compositors, and it's not
a critical situation to be afraid of. We can expect a few buffers
to be flagged as corrupted here and there, and that's fine.

Demote these warnings to debug messages, as they're still useful
for debugging.
2023-02-14 18:50:57 -03:00
Roman Huts
c5a06d3cf2 obs-ffmpeg: Update AMF SDK to v1.4.29 2023-02-13 14:38:18 -05:00
Georges Basile Stavracas Neto
fad7420198 linux-pipewire: Trivially shuffle some code around
A trivial cosmetic change. This groups the constructor and
destructor together. Two sides of the same coin, yin and yang,
bound by their nature, and linked by their position in code.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
f8a7b13cd3 linux-pipewire: Rename obs_pipewire_data to obs_pipewire
Next commits will introduce new obs_pipewire_* types, so this
renaming will make it slightly easier to read the code with
different types.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
b7daa89f85 linux-pipewire: Split initialization of core and streams
This commit introduces an important distinction in the initialization
process that is essential to future camera and audio work: it splits
creating and connecting to the PipeWire socket, from connecting to
specific PipeWire nodes.

Right now, for the only consumer in existence - the ScreenCast portal
code - this distinction is irrelevant, but from an API perspective it
just makes sense to model it this way.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
5065e86bb9 linux-pipewire: Remove unnecessary struct field
We don't actually need to restore the node id anymore, since this
is handled by the screencast-portal.c code now.

Remove the pipewire_node field, and just create the stream directly
from the passed file descriptor now.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
890ca94b0b linux-pipewire: Inline play_pipewire_stream()
This separation of obs_pipewire_create() and play_pipewire_stream()
was an artifact of how the original code was written, and there is
no reason to keep this separation anymore. Inlining it will help
future commits too.
2023-02-13 12:28:09 -03:00
columbarius
86be35ae99 linux-pipewire: Move stream properties to constructors
And let each portal pass the stream properties relevant to them.
This makes the pipewire.c more independent of the actual portal
by providing a wrapper to create a stream. This will be relevant
later, when linux-pipewire introduces more portals like the Camera
one.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
874c30cb88 linux-pipewire: Cleanup D-Bus proxy on unload
When the linux-pipewire plugin is unloaded, make sure to cleanup
the D-Bus proxy for the ScreenCast portal too. This effectively
doesn't change anything, but it's always good to keep up with the
code hygiene.
2023-02-13 12:28:09 -03:00
Georges Basile Stavracas Neto
b8cfe1aab1 linux-pipewire: Return actual type in obs_pipewire_create
Instead of returning an opaque void* pointer, return the leaf
C type obs_pipewire_data*.

This commit introduces no functional changes.
2023-02-13 12:28:09 -03:00
Service Checker
5b370d4e3a rtmp-services: Remove defunct servers/services 2023-02-13 02:20:50 +01:00
gxalpha
67e6b8649a mac-videotoolbox: Load encoders from system asynchronously
Copying the encoder list takes a while which blocks the main thread.
Doing the copying asynchronously removes instead of blocking the main
thread improves startup performance by about 60ms.
2023-02-12 17:38:21 +01:00
Exeldro
3840f92777 win-dshow: Fix virtualcam output a default video format 2023-02-11 16:21:49 -08:00
bin
d831e9403f obs-vst: Read plugins in symlink 2023-02-11 15:50:29 -08:00
bin
228a170361 obs-filters: Fix preset properties refresh 2023-02-11 15:14:00 -08:00
pkv
ad3df88fe3 obs-ffmpeg: Fix encoding of 2.1 with FFmpeg aac encoder
The aac spec has a list of default channel layouts that are implemented
by all aac encoders / decoders.
Unfortunately 2.1 is not in that list. When I wrote the surround sound
support into OBS, as a workaround I decided to encode 2.1 as
AV_CH_LAYOUT_SURROUND = FL+FR+FC.
The LFE channel is encoded as a regular audio channel which uses more
bits but this allows compatibility with all aac decoders.
Recently we updated to the new channel layout API of FFmpeg, but the
mapping of 2.1 to AV_CH_LAYOUT_SURROUND was forgotten in the FFmpeg
native aac encoder. This is remedied here.

Signed-off-by: pkv <pkv@obsproject.com>
2023-02-11 15:06:47 -08:00
jpark37
6734167bf1 win-capture: Log display ids 2023-02-11 15:05:28 -08:00
tt2468
b2375a0660 obs-ffmpeg: Initialize SRT stats object before requesting stats
The `srt_bstats()` function is not guaranteed to zero the stats object
before filling in stats. If a socket was connected, then disconnected,
without any data being sent over it, the stats object would remain
uninitialized, and weird results could occur.
2023-02-08 11:13:41 -08:00
Jim
4488202247 obs-ffmpeg: Remove unused variables 2023-02-05 02:55:24 -08:00
jpark37
148122f5aa graphics-hook: Stop trying to connect early
It never works, and leaves a confusing message behind.
2023-02-04 15:44:16 -08:00
R1CH
c36583d794 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:05:46 -08:00
Crocodile Gena
a96211a0ee obs-vst: Add reporting of vendor name 2023-01-28 23:07:48 -08:00
Norihiro Kamae
e7c40a1d29 obs-ffmpeg: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae
72e7437ce9 win-capture: Remove unused macros 2023-01-28 19:03:55 -08:00
Norihiro Kamae
a4a85af787 obs-text: Remove unused macros 2023-01-28 19:03:55 -08:00
Norihiro Kamae
d89ca58467 obs-outputs: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae
1069d81019 obs-filters: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae
be2e082961 mac-capture: Remove unused macros 2023-01-28 19:03:55 -08:00
Richard Stanway
668775f4f0 obs-ffmpeg: Use gai_strerrorA for error logging on Windows
Avoids wide characters in the format string which cause truncation.
2023-01-27 23:41:07 +01:00
Richard Stanway
062cfcf63d obs-filters: Fix wrong number of arguments to error macro 2023-01-27 23:21:41 +01:00
Richard Stanway
9b1f7d6d21 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.
2023-01-27 13:03:22 -08:00
pkv
10e6d0fbd0 obs-filters: Improve upward compressor with soft knee
This adds a knee setting to the upward compressor.

Signed-off-by: pkv <pkv@obsproject.com>
2023-01-26 23:23:45 -08:00