Commit graph

4151 commits

Author SHA1 Message Date
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