2013-12-11 20:50:10 -08:00
|
|
|
/******************************************************************************
|
|
|
|
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
|
2015-02-16 23:45:34 -08:00
|
|
|
Philippe Groarke <philippe.groarke@gmail.com>
|
2013-12-11 20:50:10 -08:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
******************************************************************************/
|
|
|
|
|
2013-12-10 20:14:20 -08:00
|
|
|
#pragma once
|
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
#include <util/util.hpp>
|
2014-01-24 20:19:50 -08:00
|
|
|
#include <QDialog>
|
2019-02-06 19:19:17 -08:00
|
|
|
#include <QPointer>
|
2013-12-12 20:47:42 -08:00
|
|
|
#include <memory>
|
2015-02-16 23:45:34 -08:00
|
|
|
#include <string>
|
2013-12-10 20:14:20 -08:00
|
|
|
|
2015-03-28 00:21:16 -07:00
|
|
|
#include <libff/ff-util.h>
|
|
|
|
|
2019-02-06 19:19:17 -08:00
|
|
|
#include <obs.hpp>
|
2014-03-07 11:56:31 -08:00
|
|
|
|
2019-02-06 22:37:36 -08:00
|
|
|
#include "auth-base.hpp"
|
|
|
|
|
2014-03-06 20:08:12 -08:00
|
|
|
class OBSBasic;
|
2014-01-24 20:19:50 -08:00
|
|
|
class QAbstractButton;
|
2014-03-07 11:56:31 -08:00
|
|
|
class QComboBox;
|
2015-05-25 01:37:13 -07:00
|
|
|
class QCheckBox;
|
2015-06-17 12:07:55 -07:00
|
|
|
class QLabel;
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
class OBSPropertiesView;
|
2014-11-01 13:50:36 -07:00
|
|
|
class OBSHotkeyWidget;
|
2014-01-24 20:19:50 -08:00
|
|
|
|
|
|
|
#include "ui_OBSBasicSettings.h"
|
2013-12-10 20:14:20 -08:00
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
#define VOLUME_METER_DECAY_FAST 23.53
|
|
|
|
#define VOLUME_METER_DECAY_MEDIUM 11.76
|
|
|
|
#define VOLUME_METER_DECAY_SLOW 8.57
|
2018-01-09 12:45:20 -08:00
|
|
|
|
2015-04-30 22:07:42 -07:00
|
|
|
class SilentUpdateCheckBox : public QCheckBox {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setCheckedSilently(bool checked)
|
|
|
|
{
|
|
|
|
bool blocked = blockSignals(true);
|
|
|
|
setChecked(checked);
|
|
|
|
blockSignals(blocked);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class SilentUpdateSpinBox : public QSpinBox {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setValueSilently(int val)
|
|
|
|
{
|
|
|
|
bool blocked = blockSignals(true);
|
|
|
|
setValue(val);
|
|
|
|
blockSignals(blocked);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
class OBSFFDeleter {
|
2015-03-28 00:21:16 -07:00
|
|
|
public:
|
|
|
|
void operator()(const ff_format_desc *format)
|
|
|
|
{
|
|
|
|
ff_format_desc_free(format);
|
|
|
|
}
|
|
|
|
void operator()(const ff_codec_desc *codec)
|
|
|
|
{
|
|
|
|
ff_codec_desc_free(codec);
|
|
|
|
}
|
|
|
|
};
|
2019-06-22 22:13:45 -07:00
|
|
|
using OBSFFCodecDesc = std::unique_ptr<const ff_codec_desc, OBSFFDeleter>;
|
|
|
|
using OBSFFFormatDesc = std::unique_ptr<const ff_format_desc, OBSFFDeleter>;
|
2015-03-28 00:21:16 -07:00
|
|
|
|
2014-01-24 20:19:50 -08:00
|
|
|
class OBSBasicSettings : public QDialog {
|
|
|
|
Q_OBJECT
|
2019-07-15 04:50:23 -07:00
|
|
|
Q_PROPERTY(QIcon generalIcon READ GetGeneralIcon WRITE SetGeneralIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon streamIcon READ GetStreamIcon WRITE SetStreamIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon outputIcon READ GetOutputIcon WRITE SetOutputIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon audioIcon READ GetAudioIcon WRITE SetAudioIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon videoIcon READ GetVideoIcon WRITE SetVideoIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon hotkeysIcon READ GetHotkeysIcon WRITE SetHotkeysIcon
|
|
|
|
DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon advancedIcon READ GetAdvancedIcon WRITE SetAdvancedIcon
|
|
|
|
DESIGNABLE true)
|
2013-12-11 20:50:10 -08:00
|
|
|
|
2014-01-24 20:19:50 -08:00
|
|
|
private:
|
2014-03-06 20:08:12 -08:00
|
|
|
OBSBasic *main;
|
|
|
|
|
2014-01-24 20:19:50 -08:00
|
|
|
std::unique_ptr<Ui::OBSBasicSettings> ui;
|
2014-11-01 13:50:36 -07:00
|
|
|
|
2019-02-06 22:37:36 -08:00
|
|
|
std::shared_ptr<Auth> auth;
|
|
|
|
|
2015-02-03 20:19:48 -08:00
|
|
|
bool generalChanged = false;
|
2015-02-07 08:09:57 -08:00
|
|
|
bool stream1Changed = false;
|
2015-02-03 20:19:48 -08:00
|
|
|
bool outputsChanged = false;
|
|
|
|
bool audioChanged = false;
|
|
|
|
bool videoChanged = false;
|
2014-11-01 13:50:36 -07:00
|
|
|
bool hotkeysChanged = false;
|
2015-02-11 12:55:06 -08:00
|
|
|
bool advancedChanged = false;
|
2019-06-22 22:13:45 -07:00
|
|
|
int pageIndex = 0;
|
2015-02-03 20:19:48 -08:00
|
|
|
bool loading = true;
|
2019-10-09 18:29:09 -07:00
|
|
|
bool forceAuthReload = false;
|
2015-02-16 23:45:34 -08:00
|
|
|
std::string savedTheme;
|
2020-01-12 11:30:06 -08:00
|
|
|
int sampleRateIndex = 0;
|
|
|
|
int channelIndex = 0;
|
2015-02-03 20:19:48 -08:00
|
|
|
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
int lastSimpleRecQualityIdx = 0;
|
libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)
Adds surround sound audio support to the core, core plugins, and user
interface.
Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
(due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST: stereo plugins keep in general only the first two channels.
surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
(not implemented due to lack of usefulness)
Closes jp9000/obs-studio#968
2017-05-26 17:15:54 -07:00
|
|
|
int lastChannelSetupIdx = 0;
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
|
2015-03-28 00:21:16 -07:00
|
|
|
OBSFFFormatDesc formats;
|
|
|
|
|
2015-02-03 20:19:48 -08:00
|
|
|
OBSPropertiesView *streamProperties = nullptr;
|
2015-01-26 13:41:22 -08:00
|
|
|
OBSPropertiesView *streamEncoderProps = nullptr;
|
|
|
|
OBSPropertiesView *recordEncoderProps = nullptr;
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
|
2015-06-17 12:07:55 -07:00
|
|
|
QPointer<QLabel> advOutRecWarning;
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
QPointer<QLabel> simpleOutRecWarning;
|
2015-06-17 12:07:55 -07:00
|
|
|
|
2016-04-18 00:56:51 -07:00
|
|
|
QString curPreset;
|
|
|
|
QString curQSVPreset;
|
2016-04-18 16:12:59 -07:00
|
|
|
QString curNVENCPreset;
|
2016-11-03 12:34:57 -07:00
|
|
|
QString curAMDPreset;
|
2016-04-18 00:56:51 -07:00
|
|
|
|
2016-05-09 05:36:28 -07:00
|
|
|
QString curAdvStreamEncoder;
|
|
|
|
QString curAdvRecordEncoder;
|
|
|
|
|
2015-04-30 22:07:42 -07:00
|
|
|
using AudioSource_t =
|
2019-06-22 22:13:45 -07:00
|
|
|
std::tuple<OBSWeakSource, QPointer<QCheckBox>,
|
|
|
|
QPointer<QSpinBox>, QPointer<QCheckBox>,
|
|
|
|
QPointer<QSpinBox>>;
|
2015-04-30 22:07:42 -07:00
|
|
|
std::vector<AudioSource_t> audioSources;
|
|
|
|
std::vector<OBSSignal> audioSourceSignals;
|
|
|
|
OBSSignal sourceCreated;
|
|
|
|
OBSSignal channelChanged;
|
|
|
|
|
2014-11-01 13:50:36 -07:00
|
|
|
std::vector<std::pair<bool, QPointer<OBSHotkeyWidget>>> hotkeys;
|
|
|
|
OBSSignal hotkeyRegistered;
|
|
|
|
OBSSignal hotkeyUnregistered;
|
|
|
|
|
2016-01-25 05:25:16 -08:00
|
|
|
uint32_t outputCX = 0;
|
|
|
|
uint32_t outputCY = 0;
|
|
|
|
|
2014-06-23 19:54:20 -07:00
|
|
|
void SaveCombo(QComboBox *widget, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value);
|
2014-06-23 19:54:20 -07:00
|
|
|
void SaveComboData(QComboBox *widget, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value);
|
2015-01-26 13:41:22 -08:00
|
|
|
void SaveCheckBox(QAbstractButton *widget, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value, bool invert = false);
|
2014-06-23 19:54:20 -07:00
|
|
|
void SaveEdit(QLineEdit *widget, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value);
|
2014-06-23 19:54:20 -07:00
|
|
|
void SaveSpinBox(QSpinBox *widget, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value);
|
2015-03-28 00:21:16 -07:00
|
|
|
void SaveFormat(QComboBox *combo);
|
|
|
|
void SaveEncoder(QComboBox *combo, const char *section,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *value);
|
2014-06-23 19:54:20 -07:00
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
inline bool Changed() const
|
|
|
|
{
|
2015-02-07 08:09:57 -08:00
|
|
|
return generalChanged || outputsChanged || stream1Changed ||
|
2019-06-22 22:13:45 -07:00
|
|
|
audioChanged || videoChanged || advancedChanged ||
|
|
|
|
hotkeysChanged;
|
2014-01-26 14:36:15 -08:00
|
|
|
}
|
|
|
|
|
2014-05-09 15:04:39 -07:00
|
|
|
inline void EnableApplyButton(bool en)
|
|
|
|
{
|
|
|
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(en);
|
|
|
|
}
|
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
inline void ClearChanged()
|
|
|
|
{
|
|
|
|
generalChanged = false;
|
2015-02-07 08:09:57 -08:00
|
|
|
stream1Changed = false;
|
2014-01-26 14:36:15 -08:00
|
|
|
outputsChanged = false;
|
2019-06-22 22:13:45 -07:00
|
|
|
audioChanged = false;
|
|
|
|
videoChanged = false;
|
2014-11-01 13:50:36 -07:00
|
|
|
hotkeysChanged = false;
|
2019-06-22 22:13:45 -07:00
|
|
|
advancedChanged = false;
|
2014-05-09 15:04:39 -07:00
|
|
|
EnableApplyButton(false);
|
2014-01-26 14:36:15 -08:00
|
|
|
}
|
|
|
|
|
2015-05-25 01:37:13 -07:00
|
|
|
#ifdef _WIN32
|
|
|
|
bool aeroWasDisabled = false;
|
|
|
|
QCheckBox *toggleAero = nullptr;
|
|
|
|
void ToggleDisableAero(bool checked);
|
|
|
|
#endif
|
|
|
|
|
2014-03-07 11:56:31 -08:00
|
|
|
void HookWidget(QWidget *widget, const char *signal, const char *slot);
|
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
bool QueryChanges();
|
|
|
|
|
2015-01-26 13:41:22 -08:00
|
|
|
void LoadEncoderTypes();
|
2015-02-11 12:55:06 -08:00
|
|
|
void LoadColorRanges();
|
2015-03-28 00:21:16 -07:00
|
|
|
void LoadFormats();
|
|
|
|
void ReloadCodecs(const ff_format_desc *formatDesc);
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
void LoadGeneralSettings();
|
2015-02-07 08:09:57 -08:00
|
|
|
void LoadStream1Settings();
|
2014-03-10 13:10:35 -07:00
|
|
|
void LoadOutputSettings();
|
2014-02-23 15:27:19 -08:00
|
|
|
void LoadAudioSettings();
|
2014-01-26 14:36:15 -08:00
|
|
|
void LoadVideoSettings();
|
2019-06-22 22:13:45 -07:00
|
|
|
void
|
|
|
|
LoadHotkeySettings(obs_hotkey_id ignoreKey = OBS_INVALID_HOTKEY_ID);
|
2015-02-11 12:55:06 -08:00
|
|
|
void LoadAdvancedSettings();
|
2014-02-23 15:27:19 -08:00
|
|
|
void LoadSettings(bool changedOnly);
|
2014-01-26 14:36:15 -08:00
|
|
|
|
2015-01-26 13:41:22 -08:00
|
|
|
OBSPropertiesView *CreateEncoderPropertyView(const char *encoder,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *path,
|
|
|
|
bool changed = false);
|
2015-01-26 13:41:22 -08:00
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
/* general */
|
|
|
|
void LoadLanguageList();
|
2015-02-16 23:45:34 -08:00
|
|
|
void LoadThemeList();
|
2014-01-26 14:36:15 -08:00
|
|
|
|
2019-02-06 19:19:17 -08:00
|
|
|
/* stream */
|
|
|
|
void InitStreamPage();
|
|
|
|
inline bool IsCustomService() const;
|
|
|
|
void LoadServices(bool showAll);
|
2019-02-06 22:37:36 -08:00
|
|
|
void OnOAuthStreamKeyConnected();
|
|
|
|
void OnAuthConnected();
|
2019-02-06 19:19:17 -08:00
|
|
|
QString lastService;
|
2020-02-16 13:15:33 -08:00
|
|
|
int prevLangIndex;
|
2020-03-18 03:47:23 -07:00
|
|
|
bool prevBrowserAccel;
|
2019-02-06 19:19:17 -08:00
|
|
|
private slots:
|
|
|
|
void UpdateServerList();
|
|
|
|
void UpdateKeyLink();
|
|
|
|
void on_show_clicked();
|
2019-02-14 23:09:43 -08:00
|
|
|
void on_authPwShow_clicked();
|
2019-02-06 22:37:36 -08:00
|
|
|
void on_connectAccount_clicked();
|
|
|
|
void on_disconnectAccount_clicked();
|
|
|
|
void on_useStreamKey_clicked();
|
2019-02-14 23:09:43 -08:00
|
|
|
void on_useAuth_toggled();
|
2019-02-06 19:19:17 -08:00
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
private:
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
/* output */
|
|
|
|
void LoadSimpleOutputSettings();
|
2015-01-26 13:41:22 -08:00
|
|
|
void LoadAdvOutputStreamingSettings();
|
|
|
|
void LoadAdvOutputStreamingEncoderProperties();
|
|
|
|
void LoadAdvOutputRecordingSettings();
|
|
|
|
void LoadAdvOutputRecordingEncoderProperties();
|
|
|
|
void LoadAdvOutputFFmpegSettings();
|
|
|
|
void LoadAdvOutputAudioSettings();
|
2019-06-22 22:13:45 -07:00
|
|
|
void SetAdvOutputFFmpegEnablement(ff_codec_type encoderType,
|
|
|
|
bool enabled,
|
|
|
|
bool enableEncode = false);
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
|
2014-03-06 06:02:25 -08:00
|
|
|
/* audio */
|
2015-06-23 18:47:22 -07:00
|
|
|
void LoadListValues(QComboBox *widget, obs_property_t *prop, int index);
|
2014-03-06 06:02:25 -08:00
|
|
|
void LoadAudioDevices();
|
2015-04-30 22:07:42 -07:00
|
|
|
void LoadAudioSources();
|
2014-03-06 06:02:25 -08:00
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
/* video */
|
|
|
|
void LoadRendererList();
|
2016-01-25 05:25:16 -08:00
|
|
|
void ResetDownscales(uint32_t cx, uint32_t cy);
|
2014-12-15 01:08:46 -08:00
|
|
|
void LoadDownscaleFilters();
|
2014-01-26 14:36:15 -08:00
|
|
|
void LoadResolutionLists();
|
|
|
|
void LoadFPSData();
|
|
|
|
|
|
|
|
void SaveGeneralSettings();
|
2015-02-07 08:09:57 -08:00
|
|
|
void SaveStream1Settings();
|
2014-03-10 13:10:35 -07:00
|
|
|
void SaveOutputSettings();
|
2014-02-23 15:27:19 -08:00
|
|
|
void SaveAudioSettings();
|
2014-01-26 14:36:15 -08:00
|
|
|
void SaveVideoSettings();
|
2014-11-01 13:50:36 -07:00
|
|
|
void SaveHotkeySettings();
|
2015-02-11 12:55:06 -08:00
|
|
|
void SaveAdvancedSettings();
|
2014-01-26 14:36:15 -08:00
|
|
|
void SaveSettings();
|
2013-12-17 12:56:58 -08:00
|
|
|
|
2015-09-06 16:12:03 -07:00
|
|
|
void UpdateSimpleOutStreamDelayEstimate();
|
|
|
|
void UpdateAdvOutStreamDelayEstimate();
|
|
|
|
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
void FillSimpleRecordingValues();
|
2016-04-18 00:56:51 -07:00
|
|
|
void FillSimpleStreamingValues();
|
2017-02-05 21:51:50 -08:00
|
|
|
void FillAudioMonitoringDevices();
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
|
2016-01-25 05:25:16 -08:00
|
|
|
void RecalcOutputResPixels(const char *resText);
|
|
|
|
|
2019-07-15 04:50:23 -07:00
|
|
|
QIcon generalIcon;
|
|
|
|
QIcon streamIcon;
|
|
|
|
QIcon outputIcon;
|
|
|
|
QIcon audioIcon;
|
|
|
|
QIcon videoIcon;
|
|
|
|
QIcon hotkeysIcon;
|
|
|
|
QIcon advancedIcon;
|
|
|
|
|
|
|
|
QIcon GetGeneralIcon() const;
|
|
|
|
QIcon GetStreamIcon() const;
|
|
|
|
QIcon GetOutputIcon() const;
|
|
|
|
QIcon GetAudioIcon() const;
|
|
|
|
QIcon GetVideoIcon() const;
|
|
|
|
QIcon GetHotkeysIcon() const;
|
|
|
|
QIcon GetAdvancedIcon() const;
|
|
|
|
|
2019-07-23 05:20:13 -07:00
|
|
|
int CurrentFLVTrack();
|
|
|
|
|
2014-01-24 20:19:50 -08:00
|
|
|
private slots:
|
2015-02-16 23:45:34 -08:00
|
|
|
void on_theme_activated(int idx);
|
|
|
|
|
2014-01-26 14:36:15 -08:00
|
|
|
void on_listWidget_itemSelectionChanged();
|
2014-01-24 20:19:50 -08:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
|
|
|
|
2019-02-06 19:19:17 -08:00
|
|
|
void on_service_currentIndexChanged(int idx);
|
2014-05-20 23:27:27 -07:00
|
|
|
void on_simpleOutputBrowse_clicked();
|
2015-01-26 13:41:22 -08:00
|
|
|
void on_advOutRecPathBrowse_clicked();
|
|
|
|
void on_advOutFFPathBrowse_clicked();
|
|
|
|
void on_advOutEncoder_currentIndexChanged(int idx);
|
|
|
|
void on_advOutRecEncoder_currentIndexChanged(int idx);
|
2017-02-17 09:07:32 -08:00
|
|
|
void on_advOutFFIgnoreCompat_stateChanged(int state);
|
2015-03-28 00:21:16 -07:00
|
|
|
void on_advOutFFFormat_currentIndexChanged(int idx);
|
|
|
|
void on_advOutFFAEncoder_currentIndexChanged(int idx);
|
|
|
|
void on_advOutFFVEncoder_currentIndexChanged(int idx);
|
2015-11-27 03:14:18 -08:00
|
|
|
void on_advOutFFType_currentIndexChanged(int idx);
|
obs-studio UI: Implement stream settings UI
- Updated the services API so that it links up with an output and
the output gets data from that service rather than via settings.
This allows the service context to have control over how an output is
used, and makes it so that the URL/key/etc isn't necessarily some
static setting.
Also, if the service is attached to an output, it will stick around
until the output is destroyed.
- The settings interface has been updated so that it can allow the
usage of service plugins. What this means is that now you can create
a service plugin that can control aspects of the stream, and it
allows each service to create their own user interface if they create
a service plugin module.
- Testing out saving of current service information. Saves/loads from
JSON in to obs_data_t, seems to be working quite nicely, and the
service object information is saved/preserved on exit, and loaded
again on startup.
- I agonized over the settings user interface for days, and eventually
I just decided that the only way that users weren't going to be
fumbling over options was to split up the settings in to simple/basic
output, pre-configured, and then advanced for advanced use (such as
multiple outputs or services, which I'll implement later).
This was particularly painful to really design right, I wanted more
features and wanted to include everything in one interface but
ultimately just realized from experience that users are just not
technically knowledgable about it and will end up fumbling with the
settings rather than getting things done.
Basically, what this means is that casual users only have to enter in
about 3 things to configure their stream: Stream key, audio bitrate,
and video bitrate. I am really happy with this interface for those
types of users, but it definitely won't be sufficient for advanced
usage or for custom outputs, so that stuff will have to be separated.
- Improved the JSON usage for the 'common streaming services' context,
I realized that JSON arrays are there to ensure sorting, while
forgetting that general items are optimized for hashing. So
basically I'm just using arrays now to sort items in it.
2014-04-24 01:49:07 -07:00
|
|
|
|
2015-04-17 23:40:35 -07:00
|
|
|
void on_colorFormat_currentIndexChanged(const QString &text);
|
|
|
|
|
2016-03-25 02:43:38 -07:00
|
|
|
void on_filenameFormatting_textEdited(const QString &text);
|
2016-01-25 05:25:16 -08:00
|
|
|
void on_outputResolution_editTextChanged(const QString &text);
|
2014-01-26 14:36:15 -08:00
|
|
|
void on_baseResolution_editTextChanged(const QString &text);
|
2014-03-07 11:56:31 -08:00
|
|
|
|
2016-01-25 17:09:59 -08:00
|
|
|
void on_disableOSXVSync_clicked();
|
|
|
|
|
2014-03-07 11:56:31 -08:00
|
|
|
void GeneralChanged();
|
|
|
|
void AudioChanged();
|
|
|
|
void AudioChangedRestart();
|
2015-04-30 22:07:42 -07:00
|
|
|
void ReloadAudioSources();
|
libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)
Adds surround sound audio support to the core, core plugins, and user
interface.
Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
(due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST: stereo plugins keep in general only the first two channels.
surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
(not implemented due to lack of usefulness)
Closes jp9000/obs-studio#968
2017-05-26 17:15:54 -07:00
|
|
|
void SurroundWarning(int idx);
|
|
|
|
void SpeakerLayoutChanged(int idx);
|
2014-03-10 13:10:35 -07:00
|
|
|
void OutputsChanged();
|
2015-02-07 08:09:57 -08:00
|
|
|
void Stream1Changed();
|
2014-03-07 11:56:31 -08:00
|
|
|
void VideoChanged();
|
|
|
|
void VideoChangedResolution();
|
|
|
|
void VideoChangedRestart();
|
2014-11-01 13:50:36 -07:00
|
|
|
void HotkeysChanged();
|
2019-06-22 22:13:45 -07:00
|
|
|
void ReloadHotkeys(obs_hotkey_id ignoreKey = OBS_INVALID_HOTKEY_ID);
|
2015-02-11 12:55:06 -08:00
|
|
|
void AdvancedChanged();
|
|
|
|
void AdvancedChangedRestart();
|
2014-01-26 14:36:15 -08:00
|
|
|
|
2015-09-06 16:12:03 -07:00
|
|
|
void UpdateStreamDelayEstimate();
|
|
|
|
|
2017-01-04 13:11:52 -08:00
|
|
|
void UpdateAutomaticReplayBufferCheckboxes();
|
|
|
|
|
2015-06-17 12:07:55 -07:00
|
|
|
void AdvOutRecCheckWarnings();
|
|
|
|
|
UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS. So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding. This feature will
automatically configure ideal recording settings based upon a specified
quality level.
Recording quality presets added to simple output:
- Same as stream: Copies the encoded streaming data with no extra usage
hit.
- High quality: uses a higher CRF value (starting at 23) if using x264.
- Indistinguishable quality: uses a low CRF value (starting at 16) if
using x264.
- Lossless will spawn an FFmpeg output that uses huffyuv encoding. If a
user tries to select lossless, they will be warned both via a dialog
prompt and a warning message in the settings window to ensure they
understand that it requires tremendous amounts of free space. It will
always use the AVI file format.
Extra Notes:
- When High/Indistinguishable quality is set, it will allow you to
select the recording encoder. Currently, it just allows you to select
x264 (at either veryfast or ultrafast). Later on, it'll be useful to
be able to set up pre-configured presets for hardware encoders once
more are implemented and tested.
- I decided to allow the use of x264 at both veryfast or ultrafast
presets. The reasoning is two-fold:
1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value. It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU. It will automatically compensate for the preset at
the cost of larger file size.
2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset). Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.
- When a recording preset is used, a secondary audio encoder is also
spawned at 192 bitrate to ensure high quality audio. I chose 192
because that's the limit of the media foundation aac encoder on
windows, which I want to make sure is used if available due to its
high performance.
- The CRF calculation is based upon resolution, quality, and whether
it's set to ultrafast. First, quality sets the base CRF, 23 for
"good" quality, 16 for "very high" quality. If set to ultrafast,
it'll subtract 2 points from the CRF value to help compensate. Lower
resolutions will also lower the CRF value to help improve higher
details with a smaller pixel ratio.
2015-09-18 22:29:36 -07:00
|
|
|
void SimpleRecordingQualityChanged();
|
|
|
|
void SimpleRecordingEncoderChanged();
|
|
|
|
void SimpleRecordingQualityLosslessWarning(int idx);
|
|
|
|
|
2016-12-07 05:21:44 -08:00
|
|
|
void SimpleReplayBufferChanged();
|
2017-09-05 17:01:49 -07:00
|
|
|
void AdvReplayBufferChanged();
|
2016-12-07 05:21:44 -08:00
|
|
|
|
2016-04-18 00:56:51 -07:00
|
|
|
void SimpleStreamingEncoderChanged();
|
|
|
|
|
2019-02-06 19:19:17 -08:00
|
|
|
OBSService SpawnTempService();
|
|
|
|
|
2018-12-14 05:42:05 -08:00
|
|
|
void SetGeneralIcon(const QIcon &icon);
|
|
|
|
void SetStreamIcon(const QIcon &icon);
|
|
|
|
void SetOutputIcon(const QIcon &icon);
|
|
|
|
void SetAudioIcon(const QIcon &icon);
|
|
|
|
void SetVideoIcon(const QIcon &icon);
|
|
|
|
void SetHotkeysIcon(const QIcon &icon);
|
|
|
|
void SetAdvancedIcon(const QIcon &icon);
|
|
|
|
|
2014-01-24 20:19:50 -08:00
|
|
|
protected:
|
|
|
|
virtual void closeEvent(QCloseEvent *event);
|
2013-12-17 12:56:58 -08:00
|
|
|
|
2013-12-10 20:14:20 -08:00
|
|
|
public:
|
2014-01-24 20:19:50 -08:00
|
|
|
OBSBasicSettings(QWidget *parent);
|
2017-05-15 14:26:05 -07:00
|
|
|
~OBSBasicSettings();
|
2013-12-10 20:14:20 -08:00
|
|
|
};
|