Due to an oversight in enc-amf with strcmp, the code currently causes
certain weirdness to appear. This fixes it so it will use "High"
Profile instead of attempting to use "Constrained Baseline" and also
changes it to actually set things up for "Constant Bitrate" instead of
"Variable Bitrate (Latency Constrained)". Finally I've added a slight
change that always makes it set the B-Frame Pattern to 0 in order to
work better with VCE2.0 and VCE3.0 cards.
Closesjp9000/obs-studio#978
This fixes the issue presented in:
https://obsproject.com/mantis/view.php?id=885
Minimum size is changed to 700x512. I arrived at this number from testing
the minimum sizes that I felt the settings UI was still perfectly usable
and readable. Any smaller, and things became difficult to see and adjust.
As a note, this does increase the minum width of the settings window, as
the previous minimum allowed you to cut off objects and render the window
too small to be usable.
QMainWindow::resizeDocks isn't supported on certain long-term support
distros (ubuntu trusty in particular), so instead just restore the
starting state and don't try to recalculate the ideal positioning.
Changes the UI to an adjustable user interface, allowing the user to
fully customize how the scenes list, sources list, the mixer,
transitions, and the buttons are oriented on the main window window.
If the service settings change and the output type changes, the previous
signals would attempt to disconnect after the output has been destroyed,
and subsequently that would cause a crash.
This allows the ability for certain types of modules (particularly
scripting-related modules) to initialize extra data when all other
modules have loaded. Because front-ends may wish to have custom
handling for loading modules, the front-end must manually call
obs_post_load_modules after it has completed loading all plug-in
modules.
Closesjp9000/obs-studio#965
Allows an output to automatically specify which audio codec it requires
and use it instead of AAC. This change is intended to be
behind-the-scenes and seamless to the user.
Allows a service to specify the output it needs in order to function as
configured.
NOTE: This functionality should be considered temporary as a seamless
means of implementing support for different output types within the same
service. Ideally, different services should be used for this
functionality.
Deprecates "Theme" global config value and uses "CurrentTheme" instead
to ensure backward compatibility with older versions of OBS, which will
fail to load if you have a theme that isn't available.
(Jim Edit: Putting this back because I misunderstood the purpose of
jp9000/obs-studio#936)
Adds the ability to zoom into the preview when fixed scaling mode is
enabled.
(Edit by Jim: Also now saves zoom and scroll position)
Closesjp9000/obs-studio#917
(Edit by Jim: Removed "Fullscreen Preview" because that's already sort
of served by the normal fullscreen projector option via the preview
context menu)
Closesjp9000/obs-studio#846
(Edit by Jim: Changed it to just add the fullscreen projector sub-menu
like when right-clicking the preview, that way it doesn't have to add
new locale text for translators, and allows the users to specify which
monitor to use)
Closesjp9000/obs-studio#845
If a video card is unsupported, it will attempt to initialize the stats
window, querying values from a video subsystem that doesn't exist, and
crash instead of alerting the user that their hardware is unsupported.
If the user changes one of the devices in audio settings, it would reset
all of its data, including settings, filters, flags, and all that. This
changes the handling so that the source and all of its other settings
are preserved if the user just changes the device. (Note that if the
user disables the device, settings will be lost; this only applies to
when the user changes the device to a different device for whatever
reason)
When the statistics window starts up for the first time, it reset values
at that very moment so that stray lagged frames due to OBS' startup
wouldn't be displayed. However, that's really a bad place to reset
those values because the user could want to view the stats window after
a long stream, and having those values reset when he/she views the
window for the first time would sort of make the point of viewing your
stats moot.
Instead, reset the values only when applicable, such as after OBSInit or
when video is reset.
I have always felt that the out of the box themes for OBS were quite
lacking, and have spent a lot of time going through and sorting out the
difficulties with the current setup. I've added a new themeID parameter to
several elements that were otherwise impossible to target with QSS in a
theme. Since Qt has pushed for the use of QML over QSS at this point,
these should be considered workarounds. Included is the theme I was
working on that can serve as a base. I'm hoping to encourage others to
make their own themes, so we can grow the available themes for OBS.
I am happy for any feedback on the theme itself, or other updates that
can me made to make creating new themes easier overall.
When using the full installer, there'll be a section where you can
choose what to install -- one section is a tree view with a "plugins"
section, and in that section there's "Browser plugin" and "Realsense
plugin". Instead of superfluously saying "plugin" for each of those,
replace with "source" instead -- so browser source and realsense source.
Also somewhat helps prevent the user from getting confused and thinking
we're installing a browser or something.
When custom server is used, it would still use the "common" RTMP service
to cap its bitrate. So if Twitch was selected and you changed over to
custom RTMP server, it would still cap to Twitch's bitrate limits even
though you're not using Twitch anymore.
Prevents the output from hard-locking on itself when the stop call would
trigger the callback and then try to lock again. Probably could be
solved with a recursive mutex, but at that point it's not really
necessary.
The radio buttons had been changed so "Streaming" would be selected by
default, but it only sets the wizard's "type" to streaming if the user
actually clicks the radio button themselves manually, so it would stay
set to "Invalid" by mistake, causing settings to not be applied.
Changes the default autoconfig test bitrate to 10000kb/s, which will
then be capped by the user's service selection (so it'll still only use
6000 on Twitch for example, but will allow 10000 on Youtube and others).
When running the program for the first time, no scene collections will
show up in the scene collection menu. This changes it to forcibly save
the first scene collection on the first run of the program, and then
re-enumerates the list to ensure it's listed.
This commit fixes creating log files in windows with Unicode profile
names.
I encountered this bug when running obs-studio 18.0.2 in Windows 8.1 x64
with my user profile path containing Unicode characters.
Steps to reproduce:
1) Create a windows user with a Unicode name: "пользователь"
2) Run OBS Studio, go to Help -> Log Files -> View current log (Nothing
happens)
The expected result is opening current log file.
Closesjp9000/obs-studio#916
There's a loophole that would allow users to activate an output while in
the settings window via hotkeys -- this prevents that from being able to
happen. Note that users can still shut down outputs, but they can no
longer start them up while in the settings window.
While an output is active, the user may try to reset the settings in the
settings window, causing a misleading error message to be thrown in the
log indicating that it's "falling back" to OpenGL.
Instead, if an output is currently active, do not reset video.
Fixes a bug where the individual drop-down lists of each quick
transition would not have the correct available transitions listed if
transitions were added, renamed, or removed
Uses a named mutex to detect if multiple instances of the program are
open, and if so warns the user. When running in portable mode, uses a
separate unique mutex name mapped to the user's config directory to
ensure that no two portable builds use the same config directory. This
way, portable builds do not conflict with normal builds or other
separate portable builds.
Instead, quit only when the main window has been fully closed (and not
minimized to tray). Fixes a bug where if the main window is minimized
to tray and another non-child window is open (for example, the stats
window), and then that window is closed, would cause the program to
prematurely exit and crash.
This is the only case where the button's name does not match the
locale's text, the button name being "Ok" and the locale text item being
"OK", fully capitalized.
Shows performance stats, and streaming/recording stats, and helps warn
the user when they have less-than-optimal values with coloring on the
values (e.g. yellow when getting low on disk space, red when getting
really low)
This fixes a case where the user sets an IP but then that IP is no longer
valid, resulting in OBS showing "Default" in the settings but still trying
to bind to the invalid IP internally.
The auto-configuration wizard is designed to allow first-time or
novice/uneducated users or to set up video and encoding settings in a
very quick and easy way. It'll automatically perform a bandwidth test,
and/or test the user's video settings to determine the most ideal
settings for streaming and recording (assuming a 1-pc setup).
Adds 1920x1080 and 1280x720 to the drop-down list of "default"
base/canvas resolutions rather than just the user's monitor resolutions,
in case the user wants to set the canvas to 1920x1080 or 1280x720
without having to manually type it in. Added as a minor convenience.
The reasoning behind this is because having a very large canvas size can
negatively affect the user experience -- most sources end up seeming
smaller than they need to be to users, resulting in the user needing to
size up the sources, or in the case of webcams it makes the user try to
use much larger webcam resolutions than they should reasonably need to
do, resulting in higher unintentional resource usage. The program will
additionally require more fillrate to render and downscale things as
well.
This applies only to the default starting base/canvas resolution for new
users only.
Additionally, users that ran the program pre-19 will be unaffected by
this change, as it will detect that and set the old defaults to prevent
an unexpected change in resolution for those users.
If defaults change for the base or output resolutions, it could
unintentionally affect users who are using defaults by chance and have
never changed those values.
Instead, save those values are soon as defaults are set if the users
haven't already set them.
Fix a double free in the settings window that occurs on linux only.
The UI Element already gets deleted above as a child of the
advAudioGroupBox which is not present on linux.
Apart from making the code even more unreadable, this will likely
come back to haunt us if the advAudioGroup will ever be shown on linux.
Fixes an issue where scene data would reset if the file was not found,
even if a backup file existed. This should prevent those remaining
stray cases where user's scenes would seem to be suddenly deleted if the
original file was deleted for some reason or another. The backup files
should always be available, so this should clear up that last remaining
case.
When building with VS2017 the compiler shows some warnings which is
undesirable.
The compiler rightly complains about declarations which hide older ones
which are trivially fixed.
Finally only POD types should be passed to variadic functions which is
why the String should be converted to c_str().
Relying on the current undefined behavior is a bad idea as it can change
with compilers and compiler versions.
Closesjp9000/obs-studio#902
With these new functions, plugin developers can enable, disable and
get the status of Studio Mode, as well as get and set the current
preview scene and transition the current preview to Program
Here is a list of the Studio Mode events:
- Studio Mode enabled
- Studio Mode disabled
- Previewed scene in Studio Mode changed
The audio subsystem of windows is by default configured to lower the
volume of other things while a communications device (mic) is currently
active. This patch prevents that from being enabled with OBS. If the
user needs audio ducking enabled again for whatever reason, there is now
an option to re-enable it in advanced settings.
Closesjp9000/obs-studio#884
Currently the captioning code is a bit intertwined with the UI, and the
captioning is hard-coded towards microsoft speech API.
This patch abstracts captions to allow other APIs to be implemented
later.
This adds close buttons to remux dialog, output timer dialog, and
advanced audio properties dialog. I also did a small refactor of the
remux dialog so the buttons were consistent with other dialogs.
Closesjp9000/obs-studio#876
After dragging and dropping a file, the source name will be the
filename.
(Jim: When dragging and dropping raw text, the raw text would then be
used as the source's name, which is bad if there's a lot of text. It's
now been changed so that it uses the source type's display name, i.e.
"Text (GDI+)" as the source name in that case)
Closesjp9000/obs-studio#888
This commit adds functions to get, set and save the service and its
settings, and is plugged straight into the existing internal functions
serving this purpose
(Jim: Fixed commit message and missing newline at end of file)
Closesjp9000/obs-studio#895
Added a shortcut to "Edit Transform", with Ctrl+E (lines 1191-1193).
Editing was very easy in OBS Classic, and I could not find the option
for stretching a source to bounds in OBS Studio, so the "Edit Transform"
dialogue should be more user-facing. Giving it a keyboard shortcut
denotes that it is important enough to have a shortcut, as opposed
to the myriad options with no shortcut
OpenGL on Windows is rather unstable and can result in graphical
corruption or the complete inability to start OBS since some GPUs do not
support the minimum requirements after switching to OpenGL. The UI option
is now hidden unless --allow-opengl is passed on the command line.
The D3D adapter is currently unused and we often find users are concerned
when their GPU does not appear in the list.
This would cause people to download the 64bit files when they were on
the 32bit version of windows, even though those files aren't meant to be
installed.
The GetTempPath and GetTempFileName functions weren't being used
correctly, GetTempFileName always create a temporary file, and was
creating a temporary file in the root directory of the hard drive
unintentionally.
OBS Browser Source uses command line arguments for flags. Exiting on
command line arguments that are unknown to OBS prevent's that
functionality from working.
Due to the default value assigned to AMF.H264.VBVBuffer.Strictness and AMF.H264.Version, the config upgrade code ran every time someone tried to use simple mode. That caused the AMF.H264.VBVBuffer.Strictness value to always be stuck at 100, which is wrong for streaming and recording.
Currently if you have a scene, "Scene" for example, and you create a new
scene, the dialog will pop up with a default name, but it'll start with
"Scene 1" instead of "Scene 2". Same thing occurs with sources. This
fixes that to start from 2 instead.
This changes the logic to show all encoders in the Recording tab but
only show selected supported codecs in the Streaming tab (at least with
Advanced Output Mode). The only (to my knowledge) streaming format that
supports other formats than H264 is WebRTC, which in theory should
support H264, VP8, VP9 and HEVC. However I don't know about any ingest
server that works well with it yet.
Closesjp9000/obs-studio#794
This is mainly to give visual feedback to those affected by NVENC not
working with older driver versions. Currenlty obs fails silently which
could go unnoticed for users who are using hotkeys as well as confuse
users who are not trained to read their logs when issues occur.
Closesjp9000/obs-studio#788
When the OBS signal is triggered for these widgets, the invokeMethod
could cause the thread to stall, which could make it wait much longer
than necessary to output audio data. When that happens, it causes audio
monitoring to get backed up and get unnecessarily delayed, as well as
cause general audio buffering in libobs to increase unnecessarily.
A simple fix both in terms of preventing that stall and improving UI
performance is to not call invokeMethod to update the widget each time,
and then instead have those widgets update themselves via a timer at a
specific interval.
On linux, the main window isn't immediately set to a native widget, so
the call:
connect(windowHandle(), &QWindow::screenChanged, displayResize);
on line 189 will fail, causing the preview widget to not properly resize
when the main window is resized.
Closesjp9000/obs-studio#776
Fixes bug 617 on mantis. Scaling the source manually in the viewport
wouldn't work properly when the source is flipped horizontally or
vertically.
Closesjp9000/obs-studio#751
Prevents the program from unintentionally quitting if the program is
minimized to the task tray and the user closes all projectors
Closesjp9000/obs-studio#737
Fixes an issue where non-english debug text wouldn't display correctly
in the debugger output on windows. Also, only output debug text when
actually debugging.
Closesjp9000/obs-studio#734
streamEncoder.json and recordEncoder.json are missing. Thess files are
generated when the output mode is advanced, and the user modifies
encoder settings.
Closesjp9000/obs-studio#741
Allows generating captions via the windows speech recognition API
(SAPI).
This is currently marked as experimental due to speech recognition
technology still being less than ideal. Speech recognition technology
in general is probably never going to be anywhere near perfect.
Microsoft's speech recognition in particular requires a bit of training
via the windows speech recognition tool to ensure it can dictate better.
Clear speech with a good mic is recognized fairly well, but casual
speech and/or speaking with a poor microphone will have some significant
issues. Captions can often be way off when speaking casually rather
than with clear diction.
This commit adds the ability to copy a scene item's transform and crop
settings and paste those settings onto another scene item in any scene
or scene collection. It also changes the menu shortcut key for the
Transform action "Center to screen" from "C" to "n" because "C" is the
standard shortcut key for "Copy" in most other applications.
Closesjp9000/obs-studio#719
This enables use of the dedicated GPUs for AMD PowerXpress systems.
Especially important for Adapter selection, as usually the dedicated GPU
is hidden/inactive until needed.
Closesjp9000/obs-studio#706
In the filters dialog, when the properties are being updated due to
filters being added/removed/switched, using deleteLater on the previous
view would cause it to linger in the view until the deleteLater is
processed by the Qt queue, displaying two views instead of one.
Additionally because of that, this would also cause the display in the
filters dialog to resize as well, causing the reorder mutex hard lock
which was fixed by the parent commit.
Closesjp9000/obs-studio#714
This commit fixes a bug that would cause the frontend API function
obs_frontend_set_current_scene_collection to never be successful. Due
to the bug, the following null pointer check would always fail, so the
action would never be triggered.
Modification by Jim: Instead of fixing the typo that caused this to
occur, make it so both scene collection menus and profile menus both use
"file_name" consistently.
Closesjp9000/obs-studio#712
Adds the ability to use a specific prefix and/or suffix on replay buffer
filenames to distinguish them from normal recordings. Defaults to
having the prefix "Replay".
Replay buffer and recording should be separate in case the user wants to
start recording from a specific point rather being forced to reconfigure
for regular recording.
Creates a new button on the main window below the recording button for
turning on/off the replay buffer.
(Note: This commit also modifies the UI)
Being able to generate file names based upon a specification is useful
for more than just the UI; it can also be useful for things such as the
replay buffer where file names need to be generated on the fly.
As reboot pointed out, it's assumed that the intention of a locked
preview is to prevent editing the scene. Because scrolling the preview
does not have any interaction with the scene and its sources, you should
be able to still scroll around and look at different parts of your
preview while the preview is locked.
There is also a bugfix included: previously, if you were to
right click while space bar was held down, you would be stuck in
scroll mode until spacebar is pressed/released again. This gets around
it by forcing scroll mode to end when a right click is issued on the
preview.
Adds preview scaling to the right-click context menu for the preview
pane. This allows the ability to, for example, zoom the preview and
edit the preview 1:1 (canvas/base resolution). This was a missing
parity feature. Additionally, also allows scaling to the
"output/scaled" resolution the program is set to.
When the preview is in scale mode and is the focused widget, you can
hold space and drag with left click to change the zoomed position.
(Notes added by Jim)
Closesjp9000/obs-studio#687
--verbose enables logging of messages and LOG_INFO and --unfiltered_log disables repeated log line filters. Both are useful for extreme support sessions where things have gone so far south that you actually would need this.
QScreen::availableGeometry() does not return the full screen size on X11
if areas of the screen are reserved by the window manager. In this case
the full screen projector does not cover the whole screen. Using
QScreen::geometry() instead fixes this issue.
The original pull request that added the system tray feature was riddled
with bad pointer usage. Bare pointers that are never properly freed,
never contained within a QPointer or unique_ptr.
These have now been changed to use QPointer variables, and to always
check when the variables are valid before using. The order of
destruction for QMenu that uses the actions has now been prioritized
first before the actions.
When the system tray is not available, the system tray variables would
still be used despite not being initialized.
Fixes mantis bug 640 on linux systems in particular that may not always
have system tray available.
All of the monitor discovery logic can be implemented with Qt. This
change removes all the x11 implementations in favor of Qt and removes a
fair amount of platform specific code.
When adding a new regex rule to the Automatic Scene Switcher, OBS would
crash if the regex was invalid. This was because the regex was added to
the Regex object without a test or try-catch. This commit fixes that
behavior, and adds a warning message when attempting to add an invalid
regex.
Instead of checking to see if the window's position is valid, check to
see if the rectangles of the window and the monitor intersect via a
rectangle intersection test.
Fixes a crash that could happen where you close the window while the
main window is hiding, and then the app mistakenly thinks that "all
windows are closed" and initiates shutdown while the main window is
still active but hidden.
If the user hits the "stop stream" button it'll transition in to
"stopping stream..." and will continue to output until the stream
reaches the timing in which "stop" was pressed.
However, if there is significant congestion, stopping the stream can
take far longer than the user may like. So there needs to be an option
to forcibly stop the stream in that case; pushing the "stop" button a
second time should allow the user to tell the stream/recording to stop
right away instead of waiting for the precise stop timing.
- Checks for previous instances by using the FindProcDLL NSIS plugin
- No longer allows ignoring if there is a sharing violation.
- Added version information section to allow friendly description in
the UAC elevation prompt.
- Kill lingering instances of cef-bootstrap before installing.
This allows using the functions via Qt message queue. The reason for
this is so a frontend API can queue these functions to call safely from
another thread.