Commit Graph

131 Commits (dc04acdb4433da8a0215e4ae1a0b8937007ced2a)

Author SHA1 Message Date
jp9000 50e1ec585d UI: Use defaults when changing to different encoders
In the advanced output section of settings, when a different encoder is
set, it would try to pass over settings from the other encoder, which
may or may not be fully compatible with different encoders.  Instead,
just set it to defaults if it's on an encoder that's different from the
currently loaded encoder.
2016-05-11 13:12:34 -07:00
jp9000 df04dd077b UI: Don't create encoder property views twice on load
When settings are being loaded in to the settings dialog, it would
recreate the encoder property views more than once unnecessarily.
2016-05-11 13:12:34 -07:00
jp9000 0288ea66af UI: Don't allow lossless preset when streaming NVENC 2016-05-05 00:19:38 -07:00
jp9000 5429832675 UI: Don't display x264 warning if using hardware
Don't display the warning for using two software encoders at the same
time if the stream encoder is not x264
2016-04-23 16:35:22 -07:00
jp9000 350855a2e7 UI: Show warning if using multiple separate QSV encoders
Warns users that two separate QSV encoders can't be active at the same
time.

This should be considered a temporary solution to two issues:
1.) Encoders need to be able to report these errors themselves
2.) If the QSV encoder is ever changed to allow more than one encoder at
    the same time this should be removed
2016-04-23 16:35:06 -07:00
jp9000 e3fbdb9293 UI: Add NVENC support to simple output 2016-04-19 09:20:27 -07:00
jp9000 60ec56b2c6 UI: Add support for QSV encoder to simple output 2016-04-19 08:29:24 -07:00
jp9000 21ea1b1947 UI: Do not show deprecated encoders if not selected
Hides video encoders marked as deprecated if they're not currently in
use.
2016-04-13 19:01:07 -07:00
jp9000 5191622d21 UI: Fix bug where bitrate limits wouldn't be shown
Bitrate limit warnings wouldn't be correctly shown if service settings
are changed but not yet saved before modifying the bitrates/settings.
It would use the currently active service settings instead of the
changed values.
2016-04-10 22:55:23 -07:00
jp9000 b9e4ff1ffb UI: Warn if streaming audio/video bitrate is too high
Allows the user to know that the maximum bitrate limit for a streaming
service is being enforced.
2016-04-10 03:12:25 -07:00
jp9000 d54bf1b8ab UI: Add "Enforce streaming bitrate limits" setting
Allows the user to disable streaming bitrate limits in simple output
mode if they so choose.  This option is enabled by default.
2016-04-10 03:11:41 -07:00
jp9000 2697732861 UI: Fix invalid signal for snap distance setting
A double spin control expects valueChanged(double), not
valueChanged(int).
2016-04-10 02:12:16 -07:00
Jeremiah Senkpiel 7463c0dbaa UI: Add option to snap to edges of other sources
Allows the user to snap sources to the edges of other sources, on by
default.

Closes jp9000/obs-studio#530
2016-04-06 18:29:04 -07:00
Jeremiah Senkpiel 5911b26578 UI: Add option to snap to vertical/horizontal center
Allows users to snap sources to the horizontal or vertical centers of
the screen.  Off by default.

Closes jp9000/obs-studio#528
2016-04-06 18:15:15 -07:00
Jeremiah Senkpiel ad70d023c4 UI: Add snap options to general settings section
Allows the user to disable snapping all together or control the snap
threshold.
2016-04-06 18:08:48 -07:00
bl 50961861c7 UI: Add file formatting options for recording
Allows the user to specify custom formatting for their recording file
names with many formatting options, viewed via tooltip.  The options
have been added to the advanced settings section.

Closes jp9000/obs-studio#507
2016-03-25 03:28:54 -07:00
jp9000 27edc1b045 Revert "UI: Unify output record paths across setting dialogs"
This reverts commit 911f2df130.
2016-03-19 10:33:22 -07:00
Charles Ray Shisler III 911f2df130 UI: Unify output record paths across setting dialogs
It seems more intuitive if the recording paths for the Simple
Output, Advanced Default Output and Advanced FFmpeg Output are
linked together, so that the user does not have to manage three
paths if switching between the different options.

The UI elements are also connected so that a change to one
signals a change to the others with the corresponding config
setting.
2016-02-25 01:41:23 -08:00
jp9000 fddb7d283d UI: Fix settings window data always being "changed"
Fixes a bug introduced in 6407707a04 where if you open the settings
window the settings would always think there were new changes.  It was
marking a control as changed when it shouldn't be
2016-01-31 15:32:43 -08:00
jp9000 6407707a04 UI: Ensure the output res. is modified along with base 2016-01-31 00:55:05 -08:00
jp9000 b0104fcee0 (API Change) libobs: Remove source_type param from functions
(Note: test and UI are also modified by this commit)

API Changed (removed "enum obs_source_type type" parameter):
-------------------------
obs_source_get_display_name
obs_source_create
obs_get_source_output_flags
obs_get_source_defaults
obs_get_source_properties

Removes the "type" parameter from these functions.  The "type" parameter
really doesn't serve much of a purpose being a parameter in any of these
cases, the type is just to indicate what it's used for.
2016-01-26 11:49:37 -08:00
jp9000 adcbf9311b UI: Remove "audio buffering time" (skip)
(Note: This commit breaks libobs compilation.  Skip if bisecting)
2016-01-26 11:49:30 -08:00
jp9000 832043fc7f UI: Disable OSX V-Sync when program is open
OSX has an annoying feature called "BeamSync", which on later versions
of OSX is always on.  For whatever reason, Apple devs decided to force
this feature to always be on, so applications must always render with
v-sync regardless of what they set their swap interval to.

This issue would cause syncing to the vertical refresh for each
additional active display, and wouldn't allow rendering above the
current refresh rate.  This caused major rendering stalls and prevented
video frame timing from being accurate.

This fixes the issue by using an undocumented set of functions to
disable BeamSync.  Note that because this is an undocumented method of
working around the issue, its existence cannot be guaranteed.  If the
functions no longer exist for whatever reason, it will safely do
nothing.
2016-01-25 17:44:41 -08:00
jp9000 c072ba55b2 UI: Hide renderer/adapter when not on windows
Also hide adapter list if not using Direct3D.
2016-01-25 17:29:11 -08:00
jp9000 22f7e6a82d UI: Move Renderer/Adapter to advanced
These really are advanced options that users shouldn't need to change
normally, so moving them to advanced makes sense, and keeps them away
from users who don't know what they're doing.
2016-01-25 17:29:11 -08:00
jp9000 9e4761347d UI: Fix a case where output res. stays invalid
If the base resolution is set to an invalid resolution, it would cause
the output resolution to automatically change to an invalid resolution.
After the invalid resolution was set for the output resolution, it would
stay at that invalid resolution.

This fixes it so it always tries to find the output resolution closest
to what was last actually set or actually edited.
2016-01-25 17:29:10 -08:00
jp9000 3749436cd5 UI: Fix "invalid" audio devices in audio settings
If a global audio device is disconnected or for whatever reason is no
longer available when audio settings is opened, it will erroneously
select index 0 of the combo box ("Disabled") by default because it can't
find it in the combo box.  This fixes that issue by making it insert an
item in to the combo box specifying that the previously available audio
device is no longer available, and properly preserving the user's
settings.
2016-01-25 17:29:10 -08:00
jp9000 bbbdd4442c UI: Add options to enable/disable stream confirm dialogs
Some streamers would accidentally hit start/stop streaming, which on
certain services would send out mass emails to all their followers.
This just adds options to general settings to optionally enable dialogs
that confirm whether to actually start/stop streaming when the button is
clicked.
2016-01-25 17:29:10 -08:00
jp9000 3c83be374e UI: Remove obs_source_add and sourceSceneRefs variable
Prunes code used to workaround libobs "user sources" (such as
sourceSceneRefs) and instead simply holds its own references and saves
sources it chooses with obs_save_sources_filtered.
2015-12-22 05:49:01 -08:00
Palana 124ccb68de UI: Allow file name generation without spaces
This will probably go away once proper file name formatting is
implemented (https://obsproject.com/mantis/view.php?id=361)
2015-11-27 15:48:30 +01:00
Palana d4c4a0d1aa UI: Add custom muxer settings for ffmpeg-mux 2015-11-27 15:48:29 +01:00
jp9000 8d895eaa6a UI: Prevent calling of obs functions with NULL params 2015-10-21 06:30:33 -07:00
jp9000 c59a796a8f UI: Use byte sequence for non-breaking spaces
Use explicit UTF-8 byte sequence for the "no-break space" character.

Prevents issues with certain editors, and fixes the following compiler
warning on Visual C++:

warning C4819: The file contains a character that cannot be represented
in the current code page (X). Save the file in Unicode format to prevent
data loss
2015-10-15 01:31:38 -07:00
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