891 Commits
Author SHA1 Message Date
Richard StanwayandRyan Foster 88de106cff frontend, plugins: Remove PreferSystem32Images mitigation
This process mitigation flag is inherited by child processes and applies
to load-time DLL resolution, pushing the application's own directory
below the system directories. If there are system-installed copies of
dependent DLLs such as FFmpeg, those get loaded when OBS is updated as
the updater and subsequent relaunch of OBS inherit the mitigation.

As we use SetDefaultDllDirectories, this mitigation is less important,
the proper fix would be to use /DEPENDENTLOADFLAG to protect load-time
import resolution.
2026-08-04 17:19:45 -04:00
Matt GajownikandRyan Foster f2db0972ee Update translations from Crowdin 2026-07-09 14:48:07 -04:00
PatTheMavandRyan Foster cb9b4f119a plugins: Apply clang-format 22 formatting 2026-06-17 15:17:09 -04:00
PatTheMavandRyan Foster d838e11983 plugins: Force C language for clang-format
Only applies to actual C-based plugins.
2026-06-17 15:17:09 -04:00
Warchamp7andRyan Foster 30b63c6849 Update C++ files with braces 2026-06-09 13:41:19 -04:00
Richard StanwayandRyan Foster e29a640ddd obs-ffmpeg, win-capture: Use better default DLL directory settings 2026-06-05 15:27:30 -04:00
Alex LuccisanoandRyan Foster 0943ea2cf6 plugins: Apply multitrack dynamic bitrate flag
Enable the `OBS_ENCODER_CAP_MULTITRACK_DYN_BITRATE` capability on
the encoders that support it.
2026-06-05 14:11:55 -04:00
Alex LuccisanoandRyan Foster b1be50013f obs-ffmpeg: Rework AMF dynamic bitrate change behavior
The `amf_xxx_update()` functions for AVC, HEVC, and AV1 are
unconditionally invoking Flush() and ReInit() even though this is not
required in all situations. Changing the bitrate at least in CBR mode
does not require the flush operation and can result in unaligned IDR
frames across members of an encoder group. Do not flush the pipeline
for CBR bitrate changes; instead, force an IDR to occur with the
bitrate change.
2026-06-05 14:11:55 -04:00
derrodandRyan Foster dd89ae7432 obs-ffmpeg: Set initial_padding in FFmpeg muxer 2026-01-14 10:48:04 -05:00
derrodandRyan Foster 40a08490d0 obs-ffmpeg: Implement priming samples API 2026-01-14 10:48:04 -05:00
Matt GajownikandRyan Foster a5f0988933 Update translations from Crowdin 2026-01-10 01:02:43 -05:00
TaruliaandRyan Foster 1290898c74 plugins: Set missed default bitrates to 6000 kbps
efca325 already increased the default bitrate for various encoders.
However, some were missed and this commit fills the gap:

* Mac-VT
* OpenH264
* Texture AMF
* VAAPI
2025-12-17 21:12:59 -05:00
Warchamp7andRyan Foster cea2d6938a frontend: Remove Source from source names 2025-12-17 20:34:05 -05:00
Richard StanwayandRyan Foster efca325c2c frontend, plugins: Set default bitrate to 6000 kbps
The default of 2500 kbps was chosen 10 years ago and times have changed.
Logs and forums posts show that many users of OBS for recording don't
change their bitrate and end up with a 2.5 mbps recording which looks
terrible.

Now that service bitrate enforcement exists, this will be automatically
capped to the maximum bitrate for streaming services, so the only time
this should result in a problem is if the user's upload speed is the
limiting factor, hopefully rarer these days with increasing internet
speeds.
2025-09-17 19:56:04 -04:00
Matt GajownikandRyan Foster 99c3a4b797 Update translations from Crowdin 2025-09-08 22:38:40 -04:00
Sebastian BeckmannandRyan Foster ef93ef6950 obs-ffmpeg: Null-check url query parameters
Fixes a crash if someone streams to a URL that does not have any query
parameters.

Amends 55c4ca9e63.
2025-09-02 17:13:46 -04:00
Brahmajit DasandRyan Foster 69162b12ec obs-ffmpeg: Fix build with FFMPEG 8 and above
With commit https://github.com/FFmpeg/FFmpeg/commit/822432769868 FFMPEG
has removed almost all of the FF_API_FF_PROFILE_LEVEL related defines.
They were deprecated since 2023-09-06. This results in build failures.

This is first found on Gentoo with FFMPEG pre-release version.

Downstream-bug: https://bugs.gentoo.org/961699
Signed-off-by: Brahmajit Das <listout@listout.xyz>
2025-08-28 16:31:37 -04:00
pkvandRyan Foster 55c4ca9e63 obs-ffmpeg: Fix crash when using a pkt_size != 1316
This fixes a crash when using a pkt_size which is not the UDP default of
1316 Bytes ( 7 * 188 ).

Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 67b0b44fec obs-ffmpeg: Log SRT listener waiting for a connection
Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 1407398e7f obs-ffmpeg: Change OBS-OUTPUT-XXX returns for RIST protocol
This updates a few OBS-OUTPUT-XXX to better reflect the output failures
for the RIST protocol.
Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 467967eab6 obs-ffmpeg: Fix a crash with invalid URL
This fixes a crash when an invalid URL is used.

Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 651544a487 obs-ffmpeg: Reimplement reconnection logic in mpegts muxer
This reimplements the reconnect logic in mpegts muxer.
Taking cues from the WHIP output, a start and stop thread is used,
controlled by a mutex, ensuring the start and stop pipelines can never
be run concurrently.
Fixes bugs #11885, #11721, #11620, #11062, #12133.
For better readibility, this commits also breaks the big set_config
function into smaller units.

Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 8d9bd44179 obs-ffmpeg: Fix reconnection for SRT protocol
This is the first part of a fix for reconnection issues with SRT
protocol.
This part implements the logic on the side of the protocol.
The fixes are as follows:
- a cleanup of return values of the various functions used. The main
libsrt_open function returns OBS_OUTPUT_XXX enum members. But the other
functions return now only AVERROR(xxx).
- an explicit check of the socket state before returning
OBS_OUTPUT_SUCCESS. This fixes an issue due to relying on socket
non-blocking mode; in caller mode, the srt_connect function will return
a success even before a connection has succeeded since it relies on
notifications by srt_epoll_wait. This would prompt obs UI to display a
successful reconnection in spite of a failure.

Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
pkvandRyan Foster 3ae9d6a106 obs-ffmpeg: Cleanup for mpegts muxer
The do_log function defined for the muxer expects that the struct is
named stream rather than output. So rename output to stream.
This also avoids confusion with stream->output which is an obs_output_t
pointer.

Signed-off-by: pkv <pkv@obsproject.com>
2025-08-22 19:07:21 -04:00
Huts, RomanandRyan Foster ef4c542850 obs-ffmpeg: Add missing color range property setting for AMD AV1 encoder 2025-08-21 17:16:06 -04:00
Dennis SädtlerandRyan Foster c1a65901f5 obs-ffmpeg: Correct P-frame packet priority in AMF encoder 2025-08-21 14:12:20 -04:00
Huts, RomanandRyan Foster 345700b199 obs-ffmpeg: Add Pre-Analysis checkbox for AMD encoder 2025-08-20 15:15:08 -04:00
Huts, RomanandRyan Foster 4fb20ee9ad obs-ffmpeg: Update default AMD encoding settings 2025-08-20 15:15:08 -04:00
Matt GajownikandRyan Foster 70c85f9875 Update translations from Crowdin 2025-07-01 13:34:08 -04:00
Matt GajownikandRyan Foster ffef7504ac Update translations from Crowdin 2025-06-09 14:55:50 -04:00
Huts, RomanandRyan Foster 48feb2c593 obs-ffmpeg: Add B-frame CQP support for AMD AV1 encoder 2025-06-05 14:37:20 -04:00
Ryan Foster 720f37046f Revert "obs-ffmpeg: New default AMD encoding settings"
This reverts commit 5a1f622ac1.
2025-05-05 18:52:29 -04:00
Ryan Foster a96de1e5dc Revert "obs-ffmpeg: Add Pre-Analysis checkbox for AMD encoder"
This reverts commit c518f69c84.
2025-05-05 18:52:29 -04:00
Huts, RomanandRyan Foster c518f69c84 obs-ffmpeg: Add Pre-Analysis checkbox for AMD encoder 2025-05-05 17:43:00 -04:00
Huts, RomanandRyan Foster 5a1f622ac1 obs-ffmpeg: New default AMD encoding settings
# Conflicts:
#	plugins/obs-ffmpeg/texture-amf.cpp
2025-05-05 17:43:00 -04:00
Alex LuccisanoandRyan Foster d31271834f obs-ffmpeg: Query and log the AMF codec level
Log the codec level being used by AMF-based encoders after
ffmpeg_opts have been parsed. Users could have manually changed the
codec level so query the level via AMF then determine the string for
logging.
2025-04-25 16:48:18 -04:00
Alex LuccisanoandRyan Foster 2217eb4d95 obs-ffmpeg: Set AMF codec level properly
The default "level" setting was being used for each codec (AVC, HEVC,
AV1) supported by AMF. For example, all HEVC encoders were using
level 6.2 and this caused some playback devices to reject the
bitstream for decode because the device reported a maximum decode
level lower than 6.2.

Add functionality to determine the best match for the codec level
instead of relying on the defaults.
2025-04-25 16:48:18 -04:00
Neal GompaandLain 39a692d960 obs-ffmpeg: Add OpenH264 H.264 software codec
This allows users to leverage the OpenH264 codec from Cisco to encode
H.264 video content. It is significantly reduced in capability from
alternatives, but it does the job.

This also provides a framework for adding support for other H.264
software codecs provided through FFmpeg.
2025-04-03 12:43:20 -07:00
Alex LuccisanoandRyan Foster 7decef8ab0 obs-ffmpeg: Make VAAPI rc_mode comparison case insensitive
`get_rc_mode()` compares the incoming rate control mode string
to the .name member of rc_mode_t, and the table entries are
all upper-case. This caused a crash when the incoming string
is set to "cbr" instead of "CBR". Make the string comparison
case insensitive.
2025-04-01 23:18:15 -04:00
Huts, RomanandRyan Foster 11f2322711 obs-ffmpeg: Fix throughput checks for older AMD driver 2025-03-14 08:43:14 -04:00
Huts, RomanandRyan Foster 1a2f8c2844 obs-ffmpeg: Add AMD AV1 B-frame support 2025-03-13 16:53:16 -04:00
PatTheMavandRyan Foster d6e5ecd88a plugins: Add ARM64 support to obs-ffmpeg, obs-filters, and obs-outputs 2025-03-12 16:33:00 -04:00
Alex LuccisanoandRyan Foster e8c0e35fb4 obs-ffmpeg: Use obs_encoder_video_tex_active() for AMF
Use the recently added `obs_encoder_video_tex_active()` API
for AMD AMF-based encoders, similar to the recent commit for
obs-nvenc. This allows the OBS canvas to use non-NV12 pixel
formats (such as I444) while the multitrack video encoders will
use NV12 or P010 textures converted using the GPU.
2025-01-29 15:01:19 -05:00
tytan652andRyan Foster ecb0381b8e obs-ffmpeg: Fix deprecation with FFmpeg 7.1 2025-01-24 17:38:24 -05:00
David RoscaandRyan Foster 173487afaf obs-ffmpeg: Add QVBR rate control for VA-API 2025-01-24 15:04:50 -05:00
Translation UpdaterandTranslation Updater 0b2c85845e Update translations from Crowdin 2024-12-06 23:21:55 +00:00
tytan652andRyan Foster dfc3a69c52 obs-ffmpeg: Avoid setting negative bitrate for lossless audio codec
Since FFmpeg 7.1 a check was added to disallow pre-initializing encoder
with a negative bitrate.

https://github.com/FFmpeg/FFmpeg/commit/74385dd496bdcda9a6e029fabf4946f2234a0d13
2024-11-20 13:27:38 -05:00
ExeldroandRyan Foster 9e7b51a585 obs-ffmpeg: Fix deadlock on shutting down muxer 2024-10-07 15:16:42 -04:00
Translation UpdaterandTranslation 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