0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

98 Commits

Author SHA1 Message Date
wayne wang
2be5291a3e UI: Fix non-standard string character in source
(Jim) For some reason a character outside of the standard ASCII
character set was used in this source file.  "Eight Spoked Asterisk",
Unicode character 0x02733.  Non-ASCII characters should probably not be
used directly in source files due to potential character encoding
issues that can occur depending on the operating system and compiler.

Closes jp9000/obs-studio#485
2015-10-14 01:18:06 -07:00
jp9000
0b119ba1e8 UI: Remove 22.05khz
22.05khz audio really doesn't make sense to have available, and causes
issues with encoders (primarily CoreAudio)
2015-09-21 19:31:08 -07:00
jp9000
17fa004104 UI: If audio bitrate not available, use closest
When an encoder has been removed (such as CoreAudio) and the audio
bitrates currently configured no longer are available to the current
audio encoders anymore, it would cause GetAACEncoderForBitrate to return
false with no encoder available.

To fix the issue, instead just choose the closest bitrate relative to
the current bitrate (rounded up).
2015-09-21 18:49:07 -07:00
jp9000
54a3e6696f 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-19 17:04:22 -07:00
jp9000
165766254a UI: Remove duplicate widget connection 2015-09-19 08:20:20 -07:00
Palana
cf69f24917 UI: Fix crash when saving advanced FFmpeg output
Selecting any supported FFmpeg format where ff_format_desc_extensions
returns NULL would crash the std::string constructor, so we pass an
empty extension instead (rtsp is one candidate format that triggers
the crash, on my machine at least)
2015-09-16 16:25:47 +02:00
Palana
edec540695 UI: Add custom muxer settings to advanced FFmpeg output 2015-09-16 10:47:58 +02:00
jp9000
b574407c74 UI: Remove cbr/bufsize from simple output mode
CBR is now always on by default for streaming, so there's no reason to
have a setting for this in particular.  Still available in advanced
output settings of course, but simple output mode really should be kept
as simple as possible.
2015-09-11 08:43:10 -07:00
jp9000
a4f8d18948 UI: Move reconnect options to advanced settings
This is mostly just to remove the unnecessary clutter from the output
sections.  The reconnect settings are generally rarely modified by users
as it is.
2015-09-10 21:54:11 -07:00
jp9000
d1293b2b8a UI: Add stream delay options to advanced settings
I added stream delay options to advanced settings not just because I
feel it's an advanced option, but also to reduce clutter in the outputs
section and its sub-sections, which already have far too many options as
it is.
2015-09-10 12:13:40 -07:00
jp9000
ebf3abf04e UI: Use saving functions for profiles/scenes
Replaces all the json/config loading/saving functions with safe
variants to reduce the chance of potential file corruption as much as
possible.

Also does a minor refactor of json writing by using
obs_data_save_json_safe for writing json files instead of manually using
obs_data_get_json and os_quick_write_utf8 each time.
2015-08-21 18:22:25 -07:00
jp9000
75dcd1ffa3 UI: Allow generated filenames for FFmpeg output
This changes the way the advanced output section's FFmpeg output
settings work by allowing the user to select whether they want to output
to a file or output to a URL, and makes it so file names are
automatically generated like other recording outputs.

If they choose to output to a file, it'll only require an output
directory similarly to how other recording outputs work.  They can
select a directory to output to rather than being required to type in a
full path and filename; the filename is automatically generated.  The
extension is also automatically retrieved from libff depending on the
format selected.

Otherwise if they have Output to URL selected, it'll show a simple edit
box where they can type in the target URL.
2015-08-19 11:56:18 -07:00
jp9000
59592cf030 UI: When setting base res, use closest output res
When settings the base resolution, try to find the closest output
resolution to the old output resolution, and use that for its value.  If
the aspect ratio is about the same, then don't modify the value.  If the
aspect ratio is significantly different, then find the closest
approximation while keeping with the new aspect ratio.

This particular issue has been an annoyance for quite some time.
2015-08-16 14:41:43 -07:00
jp9000
3f9578dc33 UI: Make sure aero resets if settings cancelled
Fixes a bug where pressing "Cancel" on the settings window would not
reset aero to its original state.
2015-07-07 23:52:59 -07:00
jp9000
0b7cd0ac38 UI: Log when user changes settings 2015-07-06 17:03:39 -07:00
Palana
9f2566fe69 UI: Fix memory leak when saving stream settings
SetService started using addref in
71abed387f, so we have to release
the extra reference here
2015-07-06 13:39:08 +02:00
Palana
4725641c88 UI: Expose all available audio encoder bitrates 2015-07-04 13:30:13 +02:00
jp9000
f9314128ea UI: Add Profiles
Adds setting profiles to the basic user interface.  For each profile, a
subdirectory for the profile will be created in
[config_dir]/obs-studio/basic/profiles which will contain the settings
data for each profile.
2015-07-03 18:35:30 -07:00
jp9000
da358da9a7 UI: Save project only on new changes 2015-07-02 18:08:55 -07:00
jp9000
3b16477480 UI: Store global audio sources in scenes file only
Right now, information about global audio sources is stored in both
scene files and in the config.  These must be separated; there's no need
to store them in both when they can just be stored in the scenes file.
2015-07-02 17:18:47 -07:00
jp9000
94edb7f5d6 UI: Add warning if using no/multiple tracks
Certain output formats don't support multiple tracks, so it's important
to warn the user if they select multiple tracks.

Also warn the user if they select no tracks.
2015-06-21 22:34:58 -07:00
jp9000
a24af63527 UI: Allow multi-track recording in advanced output 2015-06-21 22:34:52 -07:00
jp9000
d07664b129 UI: Add option to select recording format
Add a listboxes to recording to allow changing file formats (allows mp4,
mov, mkv, ts, flv)
2015-06-21 22:34:51 -07:00
John Bradley
11bb0fecf6 UI: Fix settings reload selecting wrong fmt/codec 2015-06-10 17:46:08 -05:00
jp9000
e7eaa268e5 UI: Add option to disable aero on windows vista/7
On windows vista/7, you cannot really use display capture efficiently
without disabling aero, so this will add an option to settings to allow
it to be disabled and cause it to be disabled on startup.
2015-06-02 19:18:15 -07:00
jp9000
4b422d7d23 UI: Replace os_get_config_path with GetConfigPath
This allows the UI to be able to use a custom config path for cases such
as portable mode, where the config path is relative to the executable.
2015-06-01 16:42:30 -07:00
Palana
ee055b5799 UI: Make settings -> 'Audio' source list expand vertically
Reduces required scrolling when lots of new audio sources are added
(e.g. aux devices being enabled in the same dialog) when the dialog
was opened with just a few audio sources being present. Unfortunately,
the "restart required" warning is pushed all the way to the bottom
even if the source list is empty
2015-05-22 00:24:48 +02:00
Palana
c23c071ba2 UI: Add Push-to-talk/mute settings to audio settings 2015-05-11 20:45:27 +02:00
Palana
d28e80ae39 UI: Add hotkeys page in settings dialog 2015-05-11 20:45:27 +02:00
Palana
9cda23f4b9 UI: Add basic hotkey integration 2015-05-11 20:45:26 +02:00
Palana
9f0696c1d8 UI: Preserve service hotkey data 2015-05-11 20:45:26 +02:00
Palana
1d39c3e9b6 (API Change) libobs: Add hotkey data to *_create functions 2015-05-11 20:45:25 +02:00
Palana
f1f1ca45df UI: Selectively disable focus frame
NoFocusFrameStyle was meant to disable focus frames around the scenes/sources
list (on OSX); unfortunately it also removed focus frames from controls that
should have focus frames like input boxes in the settings window
2015-05-07 02:08:09 +02:00
kc5nra
a090ed5795 UI: Block signals while populating formats
Avoid unnecessarily triggering signals while populating
the ffmpeg formats combo box.
2015-04-26 22:34:55 -05:00
jp9000
724644ef03 UI: Add warning for non-NV12 color formats
Non-NV12 video formats are primarily intended for recording.  For
streaming, if the libobs color format is not set to NV12, it's likely
that the video frames will have to be converted to NV12, which will use
extra CPU usage.  Due to that fact, it's important to warn the user of
that potential extra increased CPU usage that may be required when
streaming.
2015-04-18 00:03:22 -07:00
Palana
70b2ffeee7 UI: Fix custom buffer size for simple output
The buffer size was being saved as 'VBufsize' while all read operations
tried to read 'Bufsize'
2015-04-04 22:17:10 +02:00
kc5nra
b218957f38 UI: Add Format, Audio and Video ComboBoxes
Adds ComboBoxes for selecting format and audio/video
codecs. The ComboBoxes also show only valid codec
combinations for a particular container format.
2015-03-30 18:16:57 -05:00
kc5nra
8743e722ae UI: Properly disable when scale disabled
Enable/Disable scale output ComboBox based on whether
the scale checkbox is selected.
2015-03-30 17:30:37 -05:00
Socapex
6a16778bc9 UI: Implement theme selection option
OBS will offer the user a list of themes which are .qss files inside
data/obs-studio/themes.  If no theme is found in the configuration, it
loads the default theme for the system.
2015-03-12 09:27:18 -07:00
jp9000
7bd85233cc UI: Make "output mode" label disabled if active
I had previous made the output mode list box become disabled, but
neglected to do it for the label as well.
2015-03-12 09:27:17 -07:00
jp9000
20d1c2c410 UI: Add 'Advanced' settings section
Currently, this allows the setting of values such as:
- Audio buffering time
- Color format (still somewhat unsupported)
- YUV color space (if a YUV format)
= YUV color range (if a YUV format)

More color formats will be added in the future, such as RGB and YUV
4:2:2 formats.
2015-02-11 13:10:57 -08:00
jp9000
c2832b8b1c UI: Add "enforce streaming service settings"
Add a checkbox named "Enforce streaming service encoder settings"
checkbox to advanced output.  Disabling this checkbox allows the user to
optionally disable the enforcement of streaming service encoder
settings.  I had a user complain that they didn't want to always have
the service's preferred encoder settings forced on them.
2015-02-10 22:10:40 -08:00
jp9000
fc574a0d7b UI: Fix custom encoder settings not applying
Somehow the code to hook this particular widget was deleted, so add it
back in.
2015-02-10 22:10:39 -08:00
jp9000
21ec81ebcc UI: Do not allow invalid downscale/rescale values
For the 'output resolution' setting in video settings, do not show
values in the list that it does not support (width must be aligned to a
128bit boundry, and height must be divisible by two)

For the 'rescale' settings in advanced outputs, the scales must all be
divisible by two.
2015-02-08 01:31:02 -08:00
jp9000
c69e7c96f3 UI: Base encoder rescales on output resolution
The 'rescale' values in advanced output section are supposed to be based
upon the output resolution of the program.  Meaning they should not be
used for scaling up, because the resolution downloaded from the graphics
processor is the output resolution set in video settings; thus any
resolution you set for the 'rescale' values is scaled from that.
2015-02-08 01:29:15 -08:00
jp9000
bbd48c7bf2 UI: Isolate filter localization strings
To prevent from causing confusion/issues for our most awesome and
respected locale editors, only localize and translate the relevant text
rather than the extensions of the filter.
2015-02-07 12:12:12 -08:00
jp9000
b72e68afe7 (API Change) Fix obs_service_gettype func name
Before:                After:
obs_service_gettype    obs_service_get_type

It seems there was an API function that was missed when we were doing
our big API consistency update.  Unsquishes obs_service_gettype to
obs_service_get_type.
2015-02-07 08:19:34 -08:00
jp9000
69c6714090 UI: Make service settings use OK/Apply/Cancel
Currently service settings are updated in real time via the properties
view, which means that OK/Cancel/Apply have no effect.  This fixes that
by using the new type of properties view that operates only on settings
data, not an object.
2015-02-07 08:11:46 -08:00
jp9000
8b2614ddc2 UI: Add advanced output settings
Adds an 'advanced' mode to the output settings to allow more powerful
and complex streaming and recording options:

- Optionally use a different encoder for recording than for streaming to
  allow the recording to use a different encoder or encoder settings if
  desired (though at the cost if increased CPU usage depending on the
  encoders being used)

- Use encoders other than x264

- Rescale the recording or streaming encoders in case the user wishes to
  stream and record at different resolutions

- Select the specific mixer to use for recording and for streaming,
  allowing the stream and recording to use separate mixers (to for
  example allow a user to stream the game/mic audio but only record the
  game audio)

- Use FFmpeg output for the recording button instead of only recording
  h264/aac to FLV, allowing the user to output to various different
  types of file formats or remote URLs, as well as allowing the user to
  select and use different encoders and encoder settings that are
  available in the FFmpeg library

- Optionally allow the use of multiple audio tracks in a single output
  if the file formats or stream services support it
2015-02-06 11:55:48 -08:00
jp9000
a2373b1258 UI: Add buffer size to 'simple' settings 2015-02-06 03:56:19 -08:00