441 Commits

Author SHA1 Message Date
tytan652 71ef44f06e cmake: Require MbedTLS 3 and exclude 4 or later
Until the codebase is updated to support it, CMake will explicitly search
for version 3 that is supported by the codebase.
2026-08-21 15:00:09 -04:00
derrod f89ad4bee5 obs-outputs: Fix file splitting overshooting when b-frames are used
I discovered while testing that the first split would always be one GOP
too long (e.g. 1m2s instead of 1m) due to the fact that b-frames and
negative start DTSes were not accounted for.

This is now fixed by setting the start_time to the nonzero negative DTS
produced for the first packet. Additionally, a small tolerance of 1 ms
was also added to account for rounding issues present in the first GOP.
2026-08-21 14:33:06 -04:00
derrod 575c77f19d obs-outputs: Do not drop last packet when flushing Hybrid file
Originally, before file splitting was introduced, I made the choice to
simply ignore the last frame in the packet queue of the muxer, because
frame N+1 is required to properly determine the duration and I figured
nobody would notice if their recording is one frame short.

However, when using frame splitting this would result in the last frame
before the split being dropped. To fix this, we can simply reuse the
previous sample's duration for the final sample in a file. Since OBS
only does CFR, they should all be identical anyway.
2026-08-21 14:33:06 -04:00
Matt Gajownik f2db0972ee Update translations from Crowdin 2026-07-09 14:48:07 -04:00
PatTheMav cb9b4f119a plugins: Apply clang-format 22 formatting 2026-06-17 15:17:09 -04:00
PatTheMav d838e11983 plugins: Force C language for clang-format
Only applies to actual C-based plugins.
2026-06-17 15:17:09 -04:00
Alex Luccisano 83ed914ecf obs-outputs: Use multitrack DBR capability flag
Use the new `OBS_ENCODER_CAP_MULTITRACK_DYN_BITRATE` flag when
streaming with multiple tracks, instead of relying on the single-
track `OBS_ENCODER_CAP_DYN_BITRATE` flag. In multitrack cases where
multiple codecs are being used (e.g. mixed AVC and HEVC), all encoders
must support the multitrack capability flag otherwise the dynamic
bitrate (DBR) feature is disabled for the streaming session.
2026-06-05 14:11:55 -04:00
Ruwen Hahn 4c97c62ccf obs-outputs: Implement multitrack dynamic bitrate 2026-06-05 14:11:55 -04:00
Anton Kesy 526c8928af plugins: Fix typos 2026-01-14 13:47:30 -05:00
Matt Gajownik a5f0988933 Update translations from Crowdin 2026-01-10 01:02:43 -05:00
Gary Holmes 6076ada562 obs-outputs: Fix chapter ts when using file splitting
Chapters take their timestamp from the total video frame time. With
file splitting enabled in recording settings, the time offset since
the start of the current split was made needs to be considered before
submitting chapters to the muxer.
Change to subtract start_time of the current output from the chapter
timestamp.
2026-01-09 15:26:05 -05:00
Matt Gajownik 99c3a4b797 Update translations from Crowdin 2025-09-08 22:38:40 -04:00
derrod 3f393faa3c obs-outputs: Reset start time and remove unnecessary timestamp adjustments 2025-08-25 20:04:08 -04:00
derrod 2eabfdad55 obs-outputs: Allow enabling BPM for Hybrid MP4 output 2025-08-22 17:35:16 -04:00
derrod 5f2a4e976f obs-outputs: Add support for Hybrid MOV 2025-08-21 18:14:33 -04:00
derrod 3e82c919e5 obs-outputs: Remove FFmpeg-style timebase adjustment
Since OBS enforces a constant frame rate and monotonic timestamps
this is not necessary for us.
2025-08-21 18:14:33 -04:00
derrod 966f086c96 obs-outputs: Use packet time callback for frame-accurate chapter markers 2025-08-20 16:07:51 -04:00
derrod 91e90817d2 obs-outputs: Fix tkhd/mvhd box version with 64-bit timestamps 2025-08-19 23:37:02 -04:00
Matt Gajownik ffef7504ac Update translations from Crowdin 2025-06-09 14:55:50 -04:00
Dennis Sädtler 8e129b171d obs-outputs: Correct FLV composition time offset calculations
The conversion to milliseconds rounds down. Rounding down DTS and CT
values independently results in a cumulative error that results in the
PTS (DTS + CT) being incorrect (off-by-one).
2025-05-19 15:32:11 -04:00
gxalpha 281f8137f5 UI,libobs,obs-outputs: Remove HAVE_OBSCONFIG_H ifdefs
With the removal of all legacy code paths, obsconfig.h always exists and
the compile definition always gets set. As such, it's no longer
necessary to check for it.

As removing the definition itself could be seen as a breaking change,
this simply moves the definition to pc.in and cmake.in files for now to
preserve the value for plugins that might expect this to be set. We may
remove the definition entirely in a later release.
2025-04-30 13:05:35 -04:00
Ruwen Hahn 0576182f96 obs-outputs: Include all audio encoder bitrates
When network optimizations are enabled, `new_socket_loop` is enabled,
and an accurate total output bitrate is required. Include the audio
bitrates in this calculation.
2025-04-30 12:27:03 -04:00
jsnkan 0fc69fb913 obs-outputs: Correct mp4_output_destory to mp4_output_destroy 2025-04-28 18:16:09 -04:00
thirumalai-qcom 6862de6d14 obs-outputs: Use _CountTrailingZeros() in ctz32 for ARM64
This change modifies the `ctz32` function to use `_CountTrailingZeros`
when `_M_ARM64` is defined, as `_tzcnt_u32` is not available on WOA.
2025-02-28 16:29:57 -05:00
derrod fb56e06edd obs-outputs: Make MP4 output buffer/chunk size configurable 2025-01-28 14:37:28 -05:00
tt2468 9f4e0c52e1 obs-outputs: Attempt to generate path if one is not specified
Changes the MP4 muxer to attempt to use the path generation logic if
a path is not explicitly specified. This allows MP4 muxer outputs to
be configured with file splitting, without requiring both the `path`
and `directory`+`format` fields to be specified (saving effort on
the side of developers of custom plugins).
2025-01-27 16:02:53 -05:00
Translation Updater 0b2c85845e Update translations from Crowdin 2024-12-06 23:21:55 +00:00
Ed Maste 038c91d823 librtmp: Use /etc/ssl/certs/ path on FreeBSD
All supported FreeBSD releases include a root certificate bundle in the
base system.  The path is the same as on Linux.
2024-10-30 15:01:46 -04:00
Dimitry Andric 94866fbcc5 obs-outputs: Add cast to fix build with Clang 19
Clang 19 has become more strict about mixing different enum types, which
resulted in an error building multimedia/obs-studio on FreeBSD:

/wrkdirs/usr/ports/multimedia/obs-studio/work/obs-studio-30.2.3/plugins
    /obs-outputs/flv-mux.c:659:37: error: bitwise operation between
    different enumeration types ('enum multitrack_type_t' and 'enum
    packet_type_t') [-Werror,-Wenum-enum-conversion]
2024-10-16 11:59:06 -04:00
Translation Updater e6d9f73736 Update translations from Crowdin 2024-10-05 05:02:27 +00:00
Ryan Foster a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMav f9f974fe7b cmake: Update use of MbedTLS to support update to version 3.6.0
MbedTLS changed a lot of internals with their LTS version 3.6.0, which
are incompatible with the find module currently shipped with
OBS Studio.

The solution requires several changes to be applied at once:

* Rename the generated target name to MbedTLS::mbedtls to match the
  name used by MbedTLS' own CMake package
* Update find module to use the updated target name(s)
* Set CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE before trying to find
  MbedTLS to ensure that CMake package files are used with priority
  (Those are shipped only with MbedTLS 3.6.0 in obs-deps).
* A deprecation warning is emitted if the find module is used with
  MbedTLS 3.6.0 available
2024-09-13 18:30:42 -04:00
PatTheMav 6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
tytan652 31385006d5 Remove legacy_check CMake macro
The macro was not removed in 72428ccd97
waiting for submodules to be be updated to a commit where their legacy
code path is removed.
2024-09-11 13:24:39 -04:00
tytan652 72428ccd97 Remove CMake legacy code path
Except submodules and legacy_check macro since the former depend on it.
2024-08-28 13:53:25 -04:00
PatTheMav b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
derrod dd3ffc1e34 obs-outputs: Defer muxer destruction to task queue 2024-08-11 05:06:16 +02:00
Norihiro Kamae 6532be4140 obs-outputs: Remove unused functions on non-Windows
Also adjusted mixed usage of `#if defined` and `#ifdef`.
2024-08-07 17:27:49 -04:00
Ryan Foster b9f63632a1 Merge pull request #10019 from derrod/remove-ftl
Remove FTL.
2024-07-29 16:41:31 -04:00
tytan652 2a53015ad7 deps,shared,plugins: Move opts-parser to shared folder 2024-07-27 07:38:36 +02:00
tytan652 fa0ffff7c0 deps,shared,obs-outputs: Move happy-eyeballs to shared folder 2024-07-27 07:38:36 +02:00
derrod 31963f8dac obs-outputs: Set FLV DTS offset based on first audio or video packet 2024-07-22 17:43:45 -04:00
Translation Updater e7d6707fa7 Update translations from Crowdin 2024-07-17 09:34:12 +00:00
derrod b83df1b141 obs-outputs: Remove FTL output 2024-07-14 06:09:49 +02:00
derrod e741a817e9 rtmp-services: Remove FTL entries 2024-07-14 05:55:26 +02:00
derrod 2e6e79b4f5 obs-outputs: Skip trak box if track has no data 2024-06-26 13:57:59 -04:00
derrod 6cc0e2b803 obs-outputs: Fix file splitting ts offset using video DTS instead of PTS 2024-06-25 23:36:33 -04:00
derrod ed2478535f obs-outputs: Do not create MP4 track chunks without samples 2024-06-25 23:36:33 -04:00
tt2468 d1bf6f951a obs-outputs: Add multitrack flag to null output 2024-06-15 16:35:59 -07:00
Translation Updater 8999d9fef9 Update translations from Crowdin 2024-06-07 09:47:58 +00:00