Commit graph

4216 commits

Author SHA1 Message Date
gxalpha 1c15066cc4 mac-videotoolbox: Differentiate unsupported format and range errors 2023-04-29 16:15:42 -07:00
Service Checker dba6544265 rtmp-services: Remove defunct servers/services 2023-04-27 15:21:40 +02:00
Adam Taylor c25b81886d obs-filters: Add invert LUT 2023-04-24 12:35:47 -07:00
tytan652 ac241faff1 rtmp-services: Fix building with service updates disabled
Two constants are marked as -Wunused-variable which turns into an error
2023-04-24 12:04:11 -07:00
tytan652 15e0064179 rtmp-services: Enable service updates by default
Fix an oversight of 1f6cf34c2c

Which turns off by default service updates on any *nix
2023-04-24 12:02:57 -07:00
tt2468 1f6cf34c2c rtmp-services: Allow service updates to be disabled on *nix
Effectively reverts 8b315186a7, as the
cmake referenced in the description has long since been completely
rewritten and replaced.
2023-04-23 23:47:09 -07:00
jpark37 901986cbf4 libobs,obs-filters: Align HDR to SDR disparity
Adjust colors from BT.1886 to sRGB.
2023-04-23 23:43:09 -07:00
Kurt Kartaltepe f0f704249f linux-pipewire: Only consider chunks with size set
Compositors did not agree on how to communicate invalid buffers until
recently, so e0a4d8628d resulted in
regressions on KDE. This restores our old behavior which is too
conservative but mostly works on old and new compositors (which contain
similar workarounds to pass in invalid but non-zero sizes for dma-bufs).

Once all old compositors are out of use we can remove this workaround
and then compositors can remove their random size workaround.
2023-04-22 16:45:50 -07:00
tytan652 41cec5540c rtmp-services: Bump format version to v5 2023-04-22 16:17:40 -07:00
derrod 72759ae69d obs-outputs: Don't set DTS offset for enhanced FLV SEQ start/end packets
Sequence start and end packets never have a valid DTS, but with a
non-zero offset the timestamp in the packet would end up also being
non-zero, which leads to librtmp attempting to calculate a timestamp
delta and underflowing.

As a fix, simply remove the ability to even set a DTS offset for
start/end packets and always keep it at zero.
2023-04-17 17:42:15 -04:00
derrod 64f3070753 obs-outputs: Fix enhanced RTMP frame type not being set 2023-04-17 16:39:13 -04:00
PatTheMav ea60fc2869 mac-virtualcam: Fix DAL plugin entrypoint not being exported
With the recent change to enforce C17 standard for compilers, default
visibility was also enforced to be hidden. This also automatically hid
the `PlugInMain` symbol required for DAL plugins. Adding the
`__exported` decorator makes the symbol explicitly visible.
2023-04-15 16:51:18 -07:00
pkv dfac68b189 obs-outputs: Log encoder incompatible with dynamic bitrate
This logs that dynamic bitrate is disabled when a codec which does not
support bitrate reconfiguration is used, such as aom, svt-av1 ...

Signed-off-by: pkv <pkv@obsproject.com>
2023-04-15 16:33:33 -07:00
jpark37 5adcd51a68 decklink: Ignore "default" output device
obs_get_output_properties leads to a callback with an empty settings
object, so ignore it to avoid adding a dummy entry to the device list.
2023-04-09 11:53:12 -07:00
PatTheMav 158a2e10aa cmake: Skip plugin target setup when ENABLE_PLUGINS is not set 2023-04-08 16:33:18 -07:00
PatTheMav 8b186bac9b mac-avcapture: Fix questionable use of comma 2023-04-08 16:26:34 -07:00
PatTheMav 1172629492 rtmp-services: Remove macro-based constant usage
Macros make the code you see different from the code the compiler sees.
Modern C renders traditional uses of macros for constants and utility
functions unnecessary. Macros should only be used when there is no
other solution available.
2023-04-08 16:12:55 -07:00
derrod 3de564258d obs-outputs: Fix AV1 header parser adding ref count to data
The header packets are only used within the rtmp-output and do not need
or use the ref counter as the data is manually free'd directly.

The presence of this ref counter causes a crash on *nix platforms due to
our memory alignment hack attempting to free memory but reading the
wrong offset due to the ref counter being there rather than the
alignment offset.
2023-04-06 23:30:24 +02:00
derrod 3fed2e081e mac-videotoolbox: Enforce non-zero keyframe interval in CRF mode 2023-04-05 17:03:21 -07:00
derrod cf6adf84ab obs-ffmpeg: Fix iteration over sample formats 2023-04-05 21:53:23 +02:00
derrod ba38a7d9f4 obs-ffmpeg: Disable AMF texture encoder runtime reconfiguration 2023-04-05 10:18:20 -07:00
PatTheMav 43f12d1fbd mac-videotoolbox: Fix compile issue if HEVC is disabled
The format is only checked for 10-bit capable formats, which in this
case applies to HEVC only. When HEVC is disabled, then `format` is
not checked and becomes an unused variable otherwise.
2023-04-04 23:14:27 +02:00
nquah eca5c51df0 obs-outputs: Fix HEVC/RTMP composition time missing
Fixes bug in Enhanced RTMP implementation. Populates non-zero
HEVC composition times in the FLV extended video tag header.
2023-04-04 23:14:14 +02:00
Ryan Foster 13dc9a2b0d obs-websocket: Update version to 5.2.2
See 6ef055a369249f6d7b008914fe2bc360c96f23dc for changelog.
2023-04-04 15:30:14 -04:00
Ryan Foster 27f5c307c3 obs-browser: Update version to 2.21.1
ee2f309 - CI: Fix build errors with Xcode 14.3 and platform SDK 13.3
2023-04-04 15:28:36 -04:00
tt2468 bfbc189853 obs-ffmpeg: Use event for source reconnect thread
Fixes an issue where update/destroy of a media source during reconnect
would block the parent thread until the next reconnect attempt. This
would result in significant quantities of dropped frames, delayed OBS
shutdown, or frozen UI during this period.
2023-04-04 15:11:59 -04:00
PatTheMav ee3c2d0e8a CI: Fix build errors with Xcode 14.3 and platform SDK 13.3
Xcode 14.3 and the macOS 13.3 platform SDK introduced a few breaking
changes:

* Updated AppleClang emits warnings about unqualified std cast calls
  when using C++ - as `move` is too broad a word, developers are to use
  `std::move` to make this explicit. Alas this is exactly what `json11`
  uses and because that library is archived, there is no possibility
  of an upstream update.

* Apple guarded calls to old screen capture APIs as "available but
  deprecated", but seems to have chosen the wrong lower version
  boundary: The calls are flagged as being available for macOS 13 and
  macOS 14 only.

  To fix this, the existing macOS platform SDK header is replaced by a
  local copy that uses macOS 11 as the lower boundary (the oldest macOS
  version supported by obs-studio anyway)
2023-04-04 17:27:59 +00:00
PatTheMav 6e07b86729 cmake: Remove EXCLUDE_FROM_ALL directive from interface libraries 2023-04-04 17:27:54 +00:00
Ryan Foster a4f3eb7fcf obs-qsv11: Log selected codec 2023-04-04 00:48:03 +00:00
Ryan Foster a973b97036 obs-ffmpeg: Set framerate for AVCodecContext outputs
In avcodec.h, the docs for AVCodecContext->framerate say:
encoding: May be used to signal the framerate of CFR content to an
          encoder.

OBS is designed to always output Constant Frame Rate (CFR) content.
Instead of letting this be implied, let's explicitly set the framerate
per the docs.
2023-04-03 23:28:31 +00:00
derrod c2e66942d0 obs-ffmpeg: Allow specifying audio sample format 2023-04-03 23:37:22 +02:00
tt2468 d2902c1316 obs-ffmpeg: Compensate for invalid NVENC DTS when using b-frames
When using FFmpeg-based NVENC, with b-frames, and a non-1 framerate
numerator (eg. `1001/60000` aka 59.94fps), the DTS values outputted
by FFmpeg result in invalid DTS values.

Detect when using an unpatched FFmpeg build and correct the values
accordingly.
2023-04-03 16:42:31 -04:00
Matt Gajownik b620dd4c50 obs-ffmpeg: Don't use standard newlines in HTML error messages
Qt by default will render strings that contain new line characters as
plain text, bypassing the HTML renderer.
2023-04-02 04:09:54 +02:00
jpark37 b2a83a3145 decklink: Pass frames between threads using queues
Eliminates the stalls that have been seen when waiting for frame copies.

We shouldn't be copying at all ideally, but that would break the API.
2023-04-01 16:49:12 -07:00
Richard Stanway 0f614034ca obs-ffmpeg: Handle mux errors when writing replay buffer
Without this, we could continuously call signal_failure in write_packet,
crashing OBS with a stack overflow with all the error callbacks.
2023-04-01 16:21:37 -07:00
gxalpha eaf6444236 mac-capture: Simplify coreaudio_get_device_id
The current method would enum though all devices looking for a matching
uid instead of directly asking for kAudioHardwarePropertyDeviceForUID.
Asking directly instead would also enable finding hidden devices that
can only be found directly via uid and not via enumerating (were we ever
to need to find such a device).
2023-04-01 16:13:17 -07:00
Asahi Lina 584de6b264 linux-pipewire: Use premultiplied alpha
Pipewire desktop portal capture assumes premultiplied alpha, so make
sure to use the right blend equation to make translucent pixels work
correctly.

This is still broken for emissive pixels (alpha < color) since OBS seems
to unpremultiply at some point during blending, but it works properly
for translucent pixels (emissive pixel support requires an end-to-end
premultiplied pipeline).
2023-04-01 16:11:19 -07:00
jpark37 7a3beec87b decklink: Avoid swscale for color space
Any color space adjustments should be done on the GPU.
2023-04-01 16:08:54 -07:00
jpark37 e4a80d0396 decklink: Query for preroll frame count
Three is recommended though, so use at least that many.
2023-04-01 16:08:54 -07:00
Friedhelm Birth b3b5e7eae8 win-dshow: Change buffering for Elgato devices
The default is now buffering disabled except for very old devices
accessed through virtual capture filter "Elgato Game Capture HD".
2023-04-01 16:03:33 -07:00
Richard Stanway d71fa5248f obs-ffmpeg: Fix memory corruption during cleanup
We were calling avio_close on a field that might have held an
AVIOContext. This commit checks which type was allocated so we
can call the appropriate cleanup function.
2023-03-31 13:19:48 -04:00
derrod aea0867945 obs-outputs: Do not strip AV1 padding for RTMP/FLV 2023-03-29 16:53:33 -04:00
derrod d98abf8ce9 obs-ffmpeg: Enable padding for NVENC CBR modes 2023-03-29 16:53:33 -04:00
derrod 82c63db94b win-capture: Fix compat info showing in hotkey mode 2023-03-29 03:16:34 +02:00
jpark37 ac87106f03 decklink: Schedule video frames for playback
DisplayVideoFrameSync is unusable at 4K, over 20 milliseconds per call.
ScheduleVideoFrame is probably what we should have been using all along.
2023-03-28 11:19:43 -07:00
Ryan Foster ddb4f41d7d obs-websocket: Update version to 5.2.1
Fix macOS build failures.
2023-03-27 13:07:16 -04:00
Translation Updater 7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00:00
Ryan Foster 5a2567a604 obs-websocket: Update version to 5.2.0
See 7ca8d5fc2b7738d5cf04a4bddbbae0468b8a150d for changelog.
2023-03-26 22:28:08 -04:00
Ryan Foster c1cc7fc6e7 obs-browser: Update version to 2.21.0
75b926d - Add Copy page address option to browser dock context menu
35226e9 - obs-browser: Update for CMake Framework 3.0
2023-03-26 22:28:08 -04:00
Ryan Foster 2cbbc28f86 enc-amf: Update to 2.8.0
Changes:
 * Fixes for stricter MSVC standards compliance
 * Modernization of CMake
2023-03-26 22:28:08 -04:00
derrod 678a98ace2 obs-outputs: Fix compilation without ENABLE_HEVC 2023-03-26 20:43:27 -04:00
PatTheMav 349372b3b3 cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:20:38 -04:00
Jeremy Woertink 90e8e81e99 rtmp-services: Add Joystick.TV
Adding JoystickTV as an official service

Closes obsproject/obs-studio#8414
2023-03-26 14:40:57 -07:00
tt2468 1cd802810b rtmp-services: Add IRLToolkit Sydney ingest 2023-03-26 14:23:23 -07:00
Yuriy Chumak d68a75c60c rtmp-services: Add AV1 and HEVC to YouTube RTMPS service 2023-03-26 16:37:31 +02:00
derrod 4b038c9a40 rtmp-services: Add AV1 to services schema 2023-03-26 16:37:31 +02:00
derrod e767cacf0a rtmp-services: Explicitly set codecs for RTMP services 2023-03-26 16:37:31 +02:00
Yuriy Chumak 27dc30b672 obs-outputs: Prevent streaming HDR AV1/HEVC over RTMP
Currently unsupported by all remotes accepting enhanced RTMP. This
commit may be removed at a later date.
2023-03-26 16:37:31 +02:00
Yuriy Chumak 2d4f0ac440 obs-outputs: Add support for AV1/HEVC over RTMP
Implements AV1 and HEVC according to enhanced RTMP spec found at
https://github.com/veovera/enhanced-rtmp

Co-authored-by: derrod <dennis@obsproject.com>
2023-03-26 16:37:31 +02:00
jpark37 ccb2c06540 decklink: Add HDR capture support
Also add true 10-bit support.
2023-03-26 01:52:44 -07:00
Richard Stanway 0ed53ada03 obs-ffmpeg: Use more actionable error messages for hardware encoders
Telling a user to "Check your driver is up to date" is too open to
interpretation, many users will use Windows Update or Device Manager to
check for updates which doesn't help. Instead, let's explicitly tell
them what is most likely to fix the problem.
2023-03-25 22:48:19 -04:00
tytan652 4d5cf98de0 linux-pipewire: Add missing struct typedef for older PipeWire
This allows building against PipeWire versions lower than 0.3.62.

The missing structure is copied verbatim from:
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1423
2023-03-25 22:02:29 -04:00
shiina424 af5d4fb8bb vlc-video: Fix translation key 2023-03-25 18:29:07 -07:00
shiina424 100258b0f6 obs-filters: Fix translation key 2023-03-25 18:29:07 -07:00
Jim 7a30d535aa
Merge pull request #8289 from derrod/more-audio-codecs
libobs,obs-ffmpeg: Add option for recording lossless audio
2023-03-25 16:52:49 -07:00
cg2121 1ac609f1ff UI, libobs: Fix not handled in switch warnings
These warnings were being spit out by GCC on Linux.
2023-03-26 10:47:01 +11:00
derrod 1a51aad582 obs-ffmpeg: Add unclamped 32-bit floating point PCM encoder 2023-03-25 10:38:18 +01:00
derrod cf837fa38a obs-ffmpeg: Add FLAC encoder 2023-03-25 10:22:45 +01:00
derrod 3ae98511d0 obs-ffmpeg: Add PCM and ALAC encoders 2023-03-25 10:22:45 +01:00
derrod 33e4ffd3fe ffmpeg-mux: Properly support lossless codecs
- Do not set sample rate (not required here, but can be 24/32 now)
- Only set bit_rate for lossless codecs
- Only set frame_size for codecs using a fixed one
2023-03-25 10:22:45 +01:00
tytan652 19acb8cc5f rtmp-services: Fix supported audio codecs in rtmp_common 2023-03-25 10:03:22 +01:00
jpark37 feae65c472 graphics-hook: Handle VK_KHR_imageless_framebuffer
Applications that use this Vulkan extension would have image usage
mismatches because we add VK_IMAGE_USAGE_TRANSFER_SRC_BIT to
VkSwapchainCreateInfoKHR::imageUsage, so make the same modification to
VkFramebufferAttachmentImageInfo::usage.
2023-03-24 15:17:43 -07:00
Yuriy Chumak 1a05097304 obs-ffmpeg: Add HDR and HEVC to VA-API encoder 2023-03-24 15:16:10 -07:00
tytan652 6f755451d9 rtmp-services: Set protocol in rtmp_common if none set 2023-03-24 16:07:40 -04:00
Matt Gajownik f1e728ea03 obs-browser: Update version to 2.20.0
30d2b6f - Add ability to zoom browser docks with Ctrl - and +
cbad08a - Use officially documented data type to persist CEF preferences
4236b56 - Persist CEF Preferences
501f624 - Add proc handler for javascript event
5a55d18 - Replace SIGNAL and SLOT macro with new style
72afb16 - Increased maximum width and height
e9eb123 - Fix leak with SchemeHandlerFactory
ea9f59d - Fix issue with unknown speaker layouts
00f1396 - Remove redundant macOS hardware acceleration check
c2aaaef - Move custom FPS property next to its FPS
2023-03-22 08:51:52 +11:00
Matt Gajownik 1af982fcfa rtmp-services: Fix formatting and indentation of services schema
Also define editorconfig for rtmp-services to match existing structure.
2023-03-21 20:58:05 +11:00
Jim 1ea5917973 image-source: Add slide_changed signal
Allows a plugin or script to know when a slide has changed, and which
index/file it's switched to
2023-03-20 11:31:21 -07:00
derrod f96ae65d1b obs-ffmpeg: Pass correct audio codec to muxer subprocess 2023-03-20 17:01:47 +01:00
derrod 198debe945 ffmpeg-mux: Set experimental compliance for FFmpeg < 6.0
With 5fe417bce1 it became possible to use
Opus in local recordings, this could potentially have the user try to
record Opus in MP4.

FLAC in MP4 was marked as stable in FFmpeg 6.0
Opus in MP4 was marked as stable in FFmpeg 4.3

For Ubuntu 20.04 we still need the latter, for 22.04 (and potentially
other Linux distributions) the former.

While FLAC is not yet implemented, we may want to do that in the near
future so for simplicity just keep it at 6.0.
2023-03-20 17:01:47 +01:00
Jim e9ef38e3d3
Merge pull request #7978 from jpark37/dxgi-display-sdr-on-hdr
libobs-d3d11,win-capture: Add Force SDR for DXGI duplicator
2023-03-20 01:43:14 -07:00
Jim 0a9ed4569b
Merge pull request #7814 from jpark37/decklink-preview-rescale
decklink: Move preview output rescaling to GPU
2023-03-20 01:42:36 -07:00
tytan652 d917ceafe8 rtmp-services: Add connect infos checks 2023-03-19 17:38:02 +01:00
tytan652 5e4ed49a2d obs-outputs,obs-ffmpeg: Use connect infos in outputs 2023-03-19 17:38:02 +01:00
tytan652 258e339d2f rtmp-services: Add connect infos to services 2023-03-19 17:38:02 +01:00
tytan652 b2d686e8f4 obs-ffmpeg: Allow opus for SRT and RIST 2023-03-19 17:27:43 +01:00
tytan652 cd83b94c7c plugins: Rename audio encoders 2023-03-19 17:27:43 +01:00
tytan652 1514f1597a plugins: Fix codec name on AAC encoders 2023-03-19 17:27:42 +01:00
tytan652 aeab6b8fc4 libobs,docs,rtmps-services: Add supported audio codecs
Also remove Opus-only "supported audio codecs" in the services JSON.
2023-03-19 17:27:42 +01:00
tytan652 213eb613d3 rtmp-services: Remove output getter from rtmp_common 2023-03-19 17:16:13 +01:00
tytan652 e317c88f55 obs-ffmpeg: Remove AV1 from SRT/RIST supported codecs
MPEG-TS standard is not ready for AV1
2023-03-19 17:08:06 +01:00
tytan652 9d8d98b142 rtmp-services: Remove fallback to H264 if no codec found
The fallback in now inside the output.
2023-03-19 17:08:06 +01:00
tytan652 fa58a38b24 rtmp-services: Add protocol getter to services 2023-03-19 16:31:05 +01:00
tytan652 513c6bc489 rtmp-services: Add protocols to services JSON
If the server URL is not an RTMP(S) URL, the protocol field becomes
required.

The output field becomes required on non-RTMP(S) services to keep
backward compatibility.

Also skip service if the protocol is not available.
2023-03-19 15:29:03 +01:00
tytan652 855956f60e obs-outputs,obs-ffmpeg: Add protocol to service outputs 2023-03-19 15:29:03 +01:00
derrod f1c95b2bd0 win-capture: Fix compatibility info showing in any mode 2023-03-19 02:16:05 -07:00
Jim 6eace37e06
Merge pull request #8229 from derrod/hashed-tables
Hashtable Adventures
2023-03-19 00:34:44 -07:00
9p4 23ce4fe2f1 linux-v4l2: Fix fallback framerate for camera 2023-03-19 09:39:36 +11:00
Richard Stanway c9dd230a72 obs-outputs: Explicitly close RTMP socket on send error
Some send() errors are not treated as fatal but the connection gets shut
down regardless. When this happens, librtmp may send an FCunpublish
message which various services interpret as an "end of stream" message
and disable features like "disconnect protection". Instead, let's
explicitly close the socket so that the remote end is aware that this is
an unclean disconnect.
2023-03-18 15:38:54 -07:00
tytan652 a0905d3972 obs-outputs,UI: Disable Windows-only options on non-Windows
"New Socket Loop" and "Low Latency Mode" RTMP options are only available
on Windows.

Those options should be ignored and forced-disabled on non-Windows
builds.
2023-03-18 15:29:50 -07:00
derrod 5aecbebc98 obs-outputs: Remove Windows 7 sndbuf auto-tuning check 2023-03-18 15:19:48 -07:00