As per mantis issue 1403, the current wording for ClearOnMediaEnd is
ambiguous. Since it says "Hide source", some may believe it to mean the
scene item in the sources list will have it's visibility set to hidden.
This wording makes it clearer what the checkbox actually does.
According to nvidia's documentation using b-frames as reference results in
a slight quality improvement with no/negligible performance impact and is
recommended to be enabled by default when using multiple b-frames.
Because the new NVENC implementation requires texture sharing, if the
user chooses to use a secondary GPU, fall back to the old implementation
instead.
Adds a texture-based NVENC implementation which passes OBS NV12 output
textures directly to NVENC without downloading them off of the GPU,
increasing NVENC performance by a significant margin.
If NV12 textures are unavailable or the new encoder fails to initialize
for whatever reason, it will fall back to the FFmpeg NVENC
implementation safely.
Adds VBR rate control mode, adds a lookahead option, adds psycho visual
tuning option, removes level property (now always set to 'auto'),
removes "2pass" option (replaced by new "Max Quality" preset which uses
2pass by default), modifies a few defaults, and updates their locale
text.
This implements a blacklist of devices that ship with NVENC libraries,
but do not support NVENC, which would cause the plugin to mistakenly
think that NVENC was available when it was not. If these devices are
the only NVIDIA devices on the system, consider NVENC unavailable.
This is much more efficient than spawning an encoder on startup to see
if NVENC is available, which would incur a ~500 millisecond hit on
startup. Additionally, also much less crash-prone.
A bit of a hack, but this is one of the more common errors that users
are encountering, so showing useful information will help cut down on
the number of support issues.
Input buffer by default is set to 2MB - for some sources, for example streaming
RTSP input over UDP, this is not enough and causes significant playback issues
that are not present while playing back the same source under ffplay/mpv.
It looks like someone actually started working on this feature as there are
translated strings, properties and everything ready - only the control was
missing from the UI. This commit adds that control.
Currently, the range is set to 1-16MB, step 1MB. This is somewhat arbitrary,
so suggestions to tweak this range with more real-world use cases are welcome.
After you call av_frame_alloc(), ffmpeg expects you to fill in certain
fields on the frame, depending on whether it's an audio or video frame.
obs-ffmpeg did this in the two places where it allocates video frames,
but not where it allocates audio frames. On my system, using trunk
ffmpeg and the Opus codec, this causes OBS to crash while calling
avcodec_send_frame, ultimately because av_frame_copy fails due to
'dst->format < 0' (as 'format' stays at the default of -1), causing a
null pointer to be added to a buffer queue, which later gets
dereferenced.
Oddly, the fields in question can just be copied directly from
corresponding fields in the AVCodecContext, but I don't see any ffmpeg
API to automatically copy all relevant fields, and all the examples I've
seen do it by hand. So this patch does the same.
The cutoff hack was added many, many years ago as recommended by
Konverter. Since then, there has been much work on the AAC encoder, so
this hack should no longer be necessary.
(This commit also modifies the obs-ffmpeg module)
The default channel layouts from aac spec are implemented in FFmpeg
native aac encoder as follows:
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_SURROUND,
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_5POINT0_BACK,
AV_CH_LAYOUT_5POINT1_BACK,
AV_CH_LAYOUT_7POINT1,
The correspondence of speaker layouts to AV_CH_LAYOUT from FFmpeg is
changed to reflect the previous table.
Although FFmpeg native aac encoder can now encode all the layouts listed
in avutil channel_layout.h (on master), there might be issues with older
FFmpeg binaries.
Note that 2.1 speaker layout will be encoded as AV_CH_LAYOUT_SURROUND
(FL FR FC) because it is not listed as the default layout for three
channels.
This just means some optimizations for LFE channel will not be used by
the encoder which will treat it as an SCE (single channel element).
Closesjp9000/obs-studio#1182