Commit graph

4265 commits

Author SHA1 Message Date
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
Norihiro Kamae 8938aeebfa obs-ffmpeg: Remove an empty clause
The empty clause was originally introduced to set a cutoff settings as a
hack at a commit ae862c16a and later removed at a commit a89470d2e. At
this time, the clause became empty but another commit aa58b9cf5 reuse
the clause and finally a commit 9baedb1c6 removes so that the clause is
empty now.
2023-03-18 15:16:44 -07:00
Norihiro Kamae b742938a6f aja: Remove an empty clause
Remove an `if` statement that test a variable `rd`, which is an `enum
class RasterDefinition` type .
2023-03-18 15:16:44 -07:00
Richard Stanway 7e9b071a6c
obs-ffmpeg: Add GeForce MX450 variant to unsupported NVENC list 2023-03-18 13:31:42 +01:00
derrod 13040ad241 obs-ffmpeg: Fix translation key capitalisation 2023-03-18 10:47:50 +01:00
Kurt Kartaltepe 9bde0afc74 linux-pipewire: Report modifiers in hex
Use hex for modifiers because they are generally formed from a high byte
and low bytes. This makes it easier to see these bytes and identify
unusual modifiers.
2023-03-17 10:48:51 -03:00
田七不甜 03691eb0a9 win-capture: Remove the redundant "-" in the CSGO launch option and Steam url language code 2023-03-15 22:31:06 +01:00
Robert Mader 0a36dc9d80 linux-pipewire: Clear cursor texture on empty bitmap
If we receive an empty cursor bitmap - one without valid size - we
should hide the cursor. Do so by clearing the texture.

This fixes visible cursors when recording various games with Wayland
compositors.

Closes https://github.com/obsproject/obs-studio/issues/4895
2023-03-14 10:52:17 -03:00
Norihiro Kamae baddacc111 Revert "obs-ffmpeg: Use FFmpeg's "fast" AAC encoder by default"
This reverts commit aa58b9cf5f.

FFmpeg has reverted their default AAC encoder from fast to twoloop,
which has much better rate control management, making it closer to CBR,
and it sounds much better.
2023-03-12 10:21:27 -07:00
gxalpha 9c6a3a1d49 obs-vst: Fix memory leaks on macOS when VST's fail to load
Detected by clang-analyzer.
2023-03-09 15:18:38 -05:00
Mathijs Kadijk 970c284a65 mac-virtualcam: Prevent PTS rounding
All presentation time stamps are rounded to whole seconds during the
conversion from nanoseconds to seconds, because of the immediate cast
to `int64_t`. This results in the same presentation time stamp being
send to consumers for a whole second.

In previews/live streams this isn't super visible as last frame is
often assumed to be the newest and the stream is updated. It's more
problematic when recording since APIs like Apple's AVFoundation don't
allow duplicate presentation time stamps or it can look like frames are
produced in huge bursts once per second.

In this PR `CMTimeMakeWithSeconds` is used instead of `CMTimeMake` to
make sure the conversion is done correctly and simplify the calculation
we have to do a little.
2023-03-09 15:45:48 +01:00
Mathijs Kadijk ecaa5466cb mac-virtualcam: Fix incorrect PTS on Apple Silicon
The `fillFrame` method of the mac-virtualcam plugin is creating samples
directly using the value from `mach_absolute_time()` as `hostTime`.
This assumes this value is in nanoseconds, while it is in fact in mach
tick units. On Intel Macs mach tick units will be exactly 1 nanosecond
resulting in valid values, but on Apple Silicon macs this is no longer
the case.

This results in sample buffers with the placeholder image that have
much lower presentation time stamps than the samples containing content
produced by OBS. In previews/live streams this shows due to the last
content sample being shown frozen until the whole buffer is filled with
samples containing the placeholder image. Applications recording the
video stream are even more confused and crash or record videos with
wildly incorrect lengths.

In this PR `clock_gettime_nsec_np` is used to convert from mach tick units
to nanoseconds. This will make sure the `hostTime` value is correct on
both Apple Silicon and Intel macs. Making sure we produce stable
presentation time stamps from the virtual camera plugin at all times.
2023-03-09 15:45:48 +01:00
Ryan Foster 002bd0b5a4 win-capture: Suppress LNK4098
Suppress LNK4098 to allow building against pre-built Jansson for now.
2023-03-08 17:14:11 -05:00
derrod 2c48e61207 UI,obs-vst: Set Qt RCC format to 1
v2 introduces last-modified timestamps that ruin reproducibility.
2023-03-07 18:13:24 -05:00
tytan652 278973576e obs-outputs: Fix RTMP undefined symbols if built without Mbed TLS 2023-03-07 17:01:49 -05:00
derrod 2e57e09036 win-capture: Display compatibility information 2023-03-07 16:03:18 -05:00
tytan652 f4e90a5bd7 obs-ffmpeg,cmake: Add a finder for AMF headers 2023-03-07 14:55:03 -05:00
tytan652 6db418fb3f obs-ffmpeg: Replace external/AMF folder by obs-deps headers 2023-03-07 14:55:03 -05:00
PatTheMav 0fe28e9ceb mac-syphon: Fix warnings in ObjC code for CMake rework
Removes unused functions and explicitly casts higher-precision
CoreFramework data types into lower precision obs-module types.
2023-03-07 19:23:35 +01:00
Kurt Kartaltepe 0fb89dc9a1 obs-ffmpeg: Fix crash during ratecontrol check
When iterating over an array of structs we incorrectly check for a null
pointer, but the actual sentinel value is the empty struct.
2023-03-04 16:07:12 -08:00
gxalpha ffd6ae699c obs-transitions: Add long description for full decode option 2023-03-04 15:33:17 -08:00
Chris (Flaeri) e7cd29bbe5 obs-ffmpeg: Implement QVBR for AMF encoders
Makes QVBR rate control usable. Fix wrong rate control check on line
1457. Switch from bitrate to CQ/QP value (no bitrate needed).
2023-03-03 21:48:59 +00:00
Mico Häsänen d33abf68e5 rtmp-services: Add Enchant.events to service list 2023-03-02 18:00:52 -05:00
Ryan Foster 681014bec2 rtmp-services: Fix whitespace issues in services.json
* Remove trailing whitespace
 * Use spaces instead of tabs for indents
2023-03-02 13:24:39 -05:00
Georges Basile Stavracas Neto f62f370edd linux-pipewire: Remove unnecessary variable
No functional changes. The code is just ever so slightly easier to
read now.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto 436787c1f4 linux-pipewire: Check for effective crop region
Some compositors send buffer crop information even when the crop
matches the buffer size. It doesn't really matter in practice,
but it's good hygiene to check for the effective crop instead of
simply checking if crop exists.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto d68b061d57 linux-pipewire: Adjust cosmetics
Move code into auxiliary functions, to improve the legibility of the
draw function. It also gets rid of these pesky switch fallthroughs.
No functional changes.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto 925888b763 linux-pipewire: Fix wrong error message
In the non-DMA path, we are logging an error message saying that
the DMA format is wrong. That's not the DMA format, it's the raw
buffer format.

Fix the message.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto f520b251fb linux-pipewire: Demote yet another error to debug
This was an oversight from commit be629b93c.
2023-03-01 20:47:49 -03:00
Albert 414937a963
rtmp-services: Update Streamvi (#7921)
Co-authored-by: Joel Bethke <joel.bethke@gmail.com>
2023-03-01 17:36:58 -06:00
Stripchat 8fd6949778
rtmp-services: Update Stripchat streaming service (#8269) 2023-03-01 16:16:01 -06:00
Tophicles 87b7f7785f
rtmp-services: Add LiveStreamerCafe (#8203)
Incremented version number as requested.

Co-authored-by: Kristopher Marentette <tophicles@syslog.brucenet>
2023-03-01 16:15:45 -06:00
Regan Black 6e0f5dccb2
rtmp-services: Update Switchboard Live Servers (#8180)
Co-authored-by: Regan Baah <one0ten@outlook.com>
2023-03-01 16:15:25 -06:00
Kevin Deng 480a8700da
rtmp-services: Update Mildom more_info_link (#8334)
Co-authored-by: kevin.dww <kevin.dww@nonolive.com>
2023-03-01 16:13:38 -06:00
derrod 166dc4909d enc-amf: Update submodule 2023-03-01 20:39:53 +01:00
derrod 3c92413674 win-dshow: Remove obsolete name in REGFILTERPINS 2023-03-01 20:39:53 +01:00
derrod 2ac8ce8f65 obs-ffmpeg: Fix __VA_ARGS__ for comma ellision 2023-03-01 20:39:53 +01:00
derrod 19b6d79597 win-capture: Fix possible macro redefinition 2023-03-01 20:39:53 +01:00
pkv 2e79d4c902 obs-ffmpeg: Fix for FFmpeg 6 deprecating a flag
Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed in avcodec 60 [1].
We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
3ceffe7839

Signed-off-by: pkv <pkv@obsproject.com>
2023-03-01 13:23:51 -05:00
gxalpha fea4a19c8b obs-ffmpeg: Add full_decode to media source log
This is an option that while very powerful also provides a footgun for
users if they don't have enough memory. It will be helpful for support
volunteers to be able to see if the option has been enabled.
2023-02-25 19:26:51 -08:00
Jim 4bf14d09b4 obs-transitions: Add option to preload stinger video to RAM
Stingers -- and especially track matte stingers -- are currently subject
to real time decoding, which can be detrimental in a production
environment where a stinger video may not be able to decode in a timely
fashion.

To remedy this, this change adds an option to fully decode stingers
immediately and cache the decoded video/audio in RAM for playback to
greatly improve stinger performance.
2023-02-25 18:13:11 -08:00
columbarius 8abc3528cf linux-pipewire: Read buffer transformation from PipeWire
PipeWire allows since 0.3.62 [1] to attach metadata to a buffer
describing a transformation of the buffercontent. Clients should then
undo that transformation to import it correctly.

We can enable this feature using macro guards and runtime server version
checks on supported systems.

[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1423
2023-02-25 11:49:51 -03:00
Georges Basile Stavracas Neto a1a98f9cfd plugins: Drop win-ivcam
Apparently this was a prototype from Intel that never really
properly launched. Remove the plugin.
2023-02-24 14:04:29 +01:00
Georges Basile Stavracas Neto 4ab9cd1005 plugins: Drop win-mf
The win-mf plugin is deprecated, and disabled by default. Let's drop
it entirely.
2023-02-24 13:22:52 +01:00
PatTheMav 8061652051 mac-videotoolbox: Refactor implementation
Existing code made use of macros which broke parsing in Xcode and
complicated debugging as crucial code was executed within macros and
not actual source code.

Use of mutable CoreFramework data structures (which were never mutated)
is replaced by use of faster non-mutable variants.

When an allocator needs to be used, `kCFAllocatorDefault` is specified
explicitly.

VideoToolbox session properties are also set in bulk instead of
multiple consecutive calls.

Also simplifies detection of Apple Silicon hosts to make code more
readable.
2023-02-21 21:29:12 +01:00
jpark37 09c2a321ce mac-videotoolbox: Add ProRes 4444 (XQ) support
Also leverage P216/P416 pixel formats to retain precision.
2023-02-21 18:48:44 +01:00
jpark37 463bf0dff5 libobs,UI: Add P216/P416 pixel formats
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
gxalpha 433c85bcd7 mac-capture: Fix various SCK memory leaks
Detected by clang analyzer.
2023-02-21 17:40:56 +01:00
jpark37 06b8cef665 decklink: Set video conversion earlier
Owner needs this info set sooner to move rescale from CPU to GPU.
2023-02-19 11:46:20 -08:00
jpark37 695f476553 win-capture: Add logging for Force SDR checkbox 2023-02-19 11:40:32 -08:00
jpark37 7bf3015864 win-capture: Add Force SDR for DXGI duplicator
Also plumb support for wide SDR although DXGI chooses narrow anyway?
2023-02-19 11:40:32 -08:00
PatTheMav 8c8a44b26a mac-virtualcam: Fix compiler warnings
CMake build framework 3.0 introduces more strict typing checks, which
require additional code fixes to silence.

* Fixes warnings about implicit casts
* Fixes warnings about weak references used multiple times inside
  blocks
2023-02-18 15:22:33 -08:00