obs-studio/plugins/obs-ffmpeg
jp9000 eabebd1774 obs-ffmpeg: Fix deadlock with nvenc lookahead
Lookahead requires examining frame data over a large number of frames,
so when pkv added the change to fully reset the encoder when the bitrate
changes, nvenc will invalidate all buffers and basically starts over
from a completely clean slate.

It's possible to make lookahead work when changing the bitrate, but due
to how lookahead seems to works internally in nvenc, it will cause
continually increasing latency every time the bitrate is updated, which
is unideal.

Additionally, when lookahead is enabled, deadlocks can occur when
changing the bitrate in a thread other than the graphics thread.
Currently we allow it to be reset outside of the graphics thread.  From
limited investigating, it would appear this deadlock occurs because
nvenc is locking and releasing old textures.

So instead of dealing with all these potential issues, disable the
ability to adjust bitrate when the user has lookahead enabled on nvenc.
It's not really worth implementing dynamic bitrate support when
lookahead is enabled if the latency is just going to continually
increase for every bitrate adjustment anyway.
2019-10-04 04:39:15 -07:00
..
data/locale Update translations from Crowdin 2019-09-17 23:21:00 +02:00
external obs-ffmpeg: Move external headers to external dir 2019-06-23 23:54:26 -07:00
ffmpeg-mux libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation 2019-07-29 20:34:13 -07:00
closest-pixel-format.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
CMakeLists.txt obs-ffmpeg: Separate logging code 2019-07-09 10:07:24 -07:00
jim-nvenc-helpers.c clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
jim-nvenc.c obs-ffmpeg: Fix deadlock with nvenc lookahead 2019-10-04 04:39:15 -07:00
jim-nvenc.h obs-ffmpeg: Move external headers to external dir 2019-06-23 23:54:26 -07:00
obs-ffmpeg-audio-encoders.c libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation 2019-07-29 20:34:13 -07:00
obs-ffmpeg-compat.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
obs-ffmpeg-config.h.in obs-ffmpeg: Separate logging code 2019-07-09 10:07:24 -07:00
obs-ffmpeg-formats.h obs-ffmpeg: Fix video warnings 2019-08-30 22:13:11 -07:00
obs-ffmpeg-logging.c obs-ffmpeg: Separate logging code 2019-07-09 10:07:24 -07:00
obs-ffmpeg-mux.c obs-ffmpeg: Add support for pausing 2019-07-07 16:38:22 -07:00
obs-ffmpeg-nvenc.c libobs: Mark encoders that support dynamic bitrate 2019-08-18 03:14:38 -07:00
obs-ffmpeg-output.c libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation 2019-07-29 20:34:13 -07:00
obs-ffmpeg-source.c obs-ffmpeg: Do not enable hardware decoding by default 2019-09-24 03:04:18 -07:00
obs-ffmpeg-vaapi.c libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation 2019-07-29 20:34:13 -07:00
obs-ffmpeg.c libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation 2019-07-29 20:34:13 -07:00