Allows the ability to override the default keyframe interval via
advanced output mode as long as that interval is smaller than the
recommended keyframe interval.
Fixes an issue where it was impossible to set a lower keyframe interval
than the recommended keyframe interval.
Before OBS Studio 27, we used our own hard-coded internal encoder IDs on
for the mac-vth264 plugin: vt_h264_hw and vt_h264_sw. As of OBS Studio
27, we changed to using the encoder IDs that Apple's API reports.
Specifically, this behavior occurs due to PR #4105 and commit
6a9f25c8ea1b244b4a439667be33f4a5cc6cdf4b.
Unfortunately, this change in encoder IDs failed to take into account
existing user configurations, resulting in users with broken encoder
settings. This change attempts to gracefully upgrade user configurations
to handle the changed encoder IDs.
Fixes#4799.
This shows notifications in the status bar with the following:
- When screenshot is saved
- When replay buffer is saved
- When recording is saved
- When recording is auto remuxed
If the user hasn't specifically set a rate control and left OBS at the
default of CBR, the settings loaded by GetDataFromJsonFile will not have
a rate_control parameter present. This causes the replay buffer to think
the user is in VBR mode and use the wrong settings for determining
maximum buffer size. Fixes#2516.
The vod track in advanced output mode would be overwritten by twitch
soundtrack's vod track. Additionally, simple output mode would overwrite
twitch's soundtrack vod track even when vod track was turned off in
settings.
So instead, if vod track is off, don't clear the secondary encoder
unless it's explicitly our encoder. Additionally, make sure that
advanced output mode's vod track encoder behaves consistently with
simple output mode's vod track so it doesn't get overwritten.
Moves the "Enforce streaming service bitrate" option from simple output
mode to the stream section, renames it to "Ignore streaming service
setting recommendations" (inverting it). When trying to check it, it
will now also display a message box warning the user that it's generally
a not-so-good idea.
Also displays recommended settings for the service.
Adds a VOD track option (specific to Twitch) that allows a user to
specify which audio track to use for their Twitch VODs, which uses a
separate encoder to encode the track. This allows users the ability to
choose what audio goes on their VOD, separately from the live stream.
The frontend API event OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED was not
being triggered when hotkeys were used because it was only set to
trigger when the replay buffer button was clicked, not when a hotkey was
used. This fixes it so that the frontend event sends a signal to the
frontend so that hotkeys will actually work.
Due to the fact that a global was used on GenerateSpecifiedFilename to
save the remux file name, when a screenshot was made, it would overwrite
the filename being remuxed, because screenshots use the same function to
generate filenames as well.
This solves that problem by removing the global and the changes to
GeneratedSpecifiedFilename, and isolating that to the output handler.
Coincidentally, this bug probably also happened with replay buffers
under certain circumstances.
Fixesobsproject/obs-studio#3497Closesobsproject/obs-studio#3498
In 218b936b1dae, the virtual camera was ignored when checking the active
state, which is kind of a lackluster solution. Instead, this makes
SetupOutputs() a virtual function, and calls it before starting the
virtual camera to be more consistent with the rest of the outputs.
The BasicOutputHandler::Active() function was used for checking whether
outputs had started or not. However, the virtual camera is not used in
the subclasses; instead it's a part of the base class. Because of that
fact, when the virtual camera is started, the procedures used to start
up the other outputs are never called, causing outputs to crash because
they hadn't been initialized properly. For example, starting the
virtual camera, then starting stream/recording would crash.
So, as a simple fix to this, when checking the active status in the
derived classes, do not factor in the virtual camera.
Adds a virtual camera button to the main user interface. If virtual
camera is not installed, it will not add the button. On Windows, it
detects whether the virtual camera filters are properly registered, and
will only add the button if the virtual camera filter is confirmed
registered.
Also adds a virtual camera option to the auto-configuration wizard,
which will just simply set the user's resolution/scale to 1920x1080 at
30 FPS.
Automatically generate directories if slashes are present in a recording
name format set in advanced settings or in the replay buffer
prefix/suffix settings.
Fixesobsproject/obs-studio#2416Closesobsproject/obs-studio#2858
The audio track should always be 0 for RTMP output. The previous code
accidentally used the audio track index to set the encoder track index.
If the chosen audio track was track 2, this enabled the experimental
multi-track RTMP output code. This then caused streams to fail as if
there were network problems, as popular RTMP services like Twitch don't
understand the multi-track RTMP stream and the connection hangs.
Lookahead causes playback issues when bitrate changes mid-stream.
Bitrate can suddenly drop to 0, and other issues such as audio
stuttering on Twitch have been observed. Turning off lookahead fixed
the issue. Lookahead is normally off by default anyway.
When the streaming audio track was separated from the recording tracks
in advanced output mode in be8c06334, it mistakenly removed the opus
audio encoder code when FTL is used. This restores that code.
Adds support for pausing recordings. When settings are eligible for
recordings, a pause button will appear next to the recording button. If
the settings are not eligible, it will warn the user in the output
settings that they cannot pause recordings if those settings are used.
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
In commit d17ee20863, we attempted to fix a race condition crash in the
Logitech plugin by deferring the "stream/recording/replay buffer active"
calls to the UI thread. However, the Logitech plugin loop_function
funciton can call obs_frontend_streaming_active/etc functions while the
UI thread waits for the loop_function thread for many OBS events,
causing a hard lock in the Logitech plugin. This fixes that by making
the obs_frontend_streaming_active/etc functions completely atomic
instead. It's a bit of a hack but it's better than accessing objects.
A stream will fail to start if the output_info does not have an
encoded_audio_codecs string, even if the output is not flagged as
encoded. This allows unencoded outputs to omit that string.
The first audio track was not recorded following the API changes for
custom ffmpeg recording (adding multi-track support).
This fixes the issue (spotted by EposVox, thanks to him for the report).
When the user had advanced output mode selected and they created a new
profile, enforced service settings for advanced output mode would not be
applied because GetDataFromJsonFile would return a nullptr (because the
settings file did not yet exist). Instead of returning nullptr, always
return a valid data object, and in addition, apply the defaults of the
encoder to pass to obs_service_apply_encoder_settings just to be safe.