878 Commits
Author SHA1 Message Date
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
tytan652andRyan Foster 42670ab4e3 plugins/test: Remove legacy CMake remnants
Some legacy files were missed in 72428ccd97
2024-10-03 17:32:08 -04:00
PatTheMavandRyan Foster 6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
ExeldroandRyan Foster 7a35d7c549 obs-ffmpeg: Add logging of audio track 2024-09-12 18:07:19 -04:00
tytan652andRyan Foster 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
tytan652andRyan Foster 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
Norihiro KamaeandLain 15038232c5 obs-ffmpeg: Remove unexisting class name declaration
The class `Logger` was declared but it is never defined nor used.
2024-08-24 16:12:12 -07:00
derrodandRyan Foster baa1e1dc35 obs-ffmpeg: Remove compatibility with FFmpeg < 6.1 2024-08-23 13:44:04 -04:00
Lluís Batlle i RossellandRyan Foster 7c85253667 obs-ffmpeg: Fix VAAPI/NVENC ifdefs
VAAPI init was under NVENC clauses, so it was disabled if no NVENC.

That was introduced in af555b9372
from #10536, which refactored NVENC.
2024-08-16 13:25:07 -04:00
PatTheMavandRyan Foster b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
pkvandtt2468 1451554fb8 obs-ffmpeg: Fix SRT listener bug
Fixes #10504.
There was a bug in FFmpeg implementation which was hidden by a bug in
libsrt; it was fixed in a recent commit [1].
When we ported FFmpeg libsrt.c to obs, we brought the said bug along.
When starting an SRT stream in listener mode, if no connection is made
by a client, there were two issues:
- 1) obs was stuck into a connecting loop,
- 2) the socket was not closed when exiting OBS.
This fixes the issue so that SRT is displaying that a stream started
when in listener mode even if NO client is connected.
This is the correct behaviour for a listener.
The stream now closes properly.

[1] https://git.videolan.org/?p=ffmpeg.git;a=commit;h=87677c2195e86b126c3438439a05d0a46ae5bb50
Signed-off-by: pkv <pkv@obsproject.com>
2024-08-10 01:54:27 -07:00
derrod af555b9372 obs-ffmpeg: Remove native/disable FFmpeg NVENC 2024-08-08 22:52:40 +02:00
Norihiro KamaeandRyan Foster e9c440401c obs-ffmpeg: Resolve unused-function warnings 2024-08-07 17:27:49 -04:00
Ruwen HahnandRyan Foster b2d83efcf3 obs-ffmpeg: Disable AMF DTS adjustment for AV1 2024-07-30 11:10:47 -04:00