4f873376 as part of PR #3460 changed ffmpeg_mux_packet to
fail = !ffmpeg_mux_packet. ffe4c855 only reverted that one line
instead of the entire previous commit. When the change was
reintroduced in 6071098a as part of PR #3740, it became
fail = ffmpeg_mux_packet without the negation.
This commit reverts db1e6aa and fixes the logic check.
ffmpeg-mux does not notice if ffmpeg returns an error from
av_interleaved_write_frame() which means that OBS never knows if there
is a problem in ffmpeg.
This is the biggest issue for cases like srt:// or tcp:// streams that
can regularly fail. Without this change OBS never knows that something
went wrong.
Only network streams are checked to prevent impacting potential
transient errors in recordings.
With certain audio encoders, gaps can be introduced into the audio
packets, causing the audio duration to be miscalculated because it
calculated audio duration based upon the PTS of the current packet to
the last packet. However, this audio encoder also did not store
timestamps for most of its audio packets, causing PTS values to be
calculated based upon duration values. So those two things combined
caused audio timestamps to go all out of whack when playing back certain
videos with the media source. This is particularly prevalent with WMV
files using Microsoft codecs.
So to fix it, when the duration needs to be calculated, just calculate
the duration based upon the sample count of the audio packet. This fixes
the issue with the video in question that caused problems, and likely
fixes issues in a lot of videos that may have been floating out there
for some time. Basically this is a fix for a potential long-standing
issue.
Closesobsproject/obs-studio#3683
Detect other instances of the obs by creating an extra dummy thread,
named "OBS runonce". The process of threads enumeration of current user
is guarded by an O_EXLOCK file advisory lock when opening the lock file.
Such file lock would be dropped once the thread name is changed.
This should be usable on FreeBSD and possibly compile on DragonFly BSD.
fixes: #3053
If a service has a maximum resolution and/or maximum framerate, shows
that to the user in the stream section of settings where the maximum
video/audio bitrate are shown.
Allows services to limit and enforce resolution and framerate values the
user can select in the UI if "ignore service recommendations" is not
checked. If the "ignore service recommendations" option is not checked,
the user will not be able to select or use a resolution and/or framerate
in the user interface that the service does not support. If "ignore
service recommendations" is checked, it will work as it normally would,
allowing any value to be used as per normal.
Fortunately, and hopefully for the foreseeable future, there is only one
service that enforces resolutions and framerates.
(This commit also modifies rtmp-services and UI)
Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.
(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
Allows the ability to block all the signals if resetting downscale
values, which will prevent values from triggering a widget update
unintentionally, forcing the user to have to save settings.
Replaces SetComboItemDisabled in context-bar-controls.cpp with a global
function in qt-wrappers called SetComboItemEnabled, which allows both
enabling and disabling items in a combo box.
Add explicit casts to convert data pointers to function pointers.
Add references for unused parameters.
Replace accidental BOOL* return values with BOOL.
Moves the "Enforce streaming service bitrate" option from simple output
mode to the stream section, renames it to "Ignore streaming service
setting recommendations" (inverting it). When trying to check it, it
will now also display a message box warning the user that it's generally
a not-so-good idea.
Also displays recommended settings for the service.
(This commit also modifies rtmp-services)
Implements obs_service_get_max_bitrate, which allows retrieving the
maximum audio/video bitrates directly rather than being forced to use
the apply method. Makes it a bit easier to get the bitrate values.