obs-studio/plugins/obs-ffmpeg
Richard Stanway 898256d416 obs-ffmpeg: Add a circlebuf to buffer output in ffmpeg-mux
This adds a circular buffer to ffmpeg-mux when writing to a file.
Output from ffmpeg is buffered so that slow disk I/O does not block
ffmpeg writes, as this causes the pipe to become full and OBS stops
sending frames with a misleading "Encoding overloaded!" warning. The
buffer may grow to 256 MB depending on the rate of data coming in and
out, if the buffer is full OBS will start waiting in ffmpeg writes.

A separate I/O thread is responsible for processing the contents of
the buffer and writing them to the output file. It tries to process 1 MB
at a time to minimize small I/O.

Complicating things considerably, some formats in ffmpeg require seeking
on the output, so we can't just treat everything as a stream of bytes.
To handle this, we record offsets of each write and try to buffer as
many contiguous writes as possible. This unfortunately makes the code
quite complicated, but hopefully well commented.
2022-05-30 10:06:09 -07:00
..
data/locale obs-ffmpeg: Use period for localized sentences 2022-05-28 18:31:55 -04:00
external obs-ffmpeg: Update nv-codec-header files 2022-02-26 15:08:03 -08:00
ffmpeg-mux obs-ffmpeg: Add a circlebuf to buffer output in ffmpeg-mux 2022-05-30 10:06:09 -07:00
CMakeLists.txt obs-ffmpeg: Refactor FFmpeg video encoders 2022-04-22 12:51:38 -07:00
jim-nvenc-helpers.c obs-ffmpeg: Improve dialog text for NVENC errors 2022-05-28 06:48:27 -07:00
jim-nvenc.c obs-ffmpeg: Localize NVENC error dialog messages 2022-05-28 08:36:18 -07:00
jim-nvenc.h obs-ffmpeg: Improve dialog text for NVENC errors 2022-05-28 06:48:27 -07:00
obs-ffmpeg-audio-encoders.c obs-ffmpeg: Fix for channel layout API change 2022-05-16 16:17:32 -04:00
obs-ffmpeg-av1.c obs-ffmpeg: Refactor FFmpeg video encoders 2022-04-22 12:51:38 -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: Add HEVC support to NVENC 2022-04-28 08:59:53 -07:00
obs-ffmpeg-formats.h obs-ffmpeg: Use YVYU for FFmpeg pix fmt YVYU422 2022-04-19 19:39:22 +02:00
obs-ffmpeg-hls-mux.c obs-ffmpeg: Add missing int cast 2020-11-04 04:45:07 -08:00
obs-ffmpeg-logging.c obs-ffmpeg: Separate logging code 2019-07-09 10:07:24 -07:00
obs-ffmpeg-mux.c obs-ffmpeg: Set 1000 nits for HLG metadata 2022-05-17 05:18:46 -07:00
obs-ffmpeg-mux.h obs-ffmpeg: Split file by PTS instead of DTS 2021-12-24 16:04:15 +09:00
obs-ffmpeg-nvenc.c obs-ffmpeg: Default NVENC HEVC Max B-frames to 0 2022-05-07 01:33:05 -07:00
obs-ffmpeg-output.c obs-ffmpeg: Set 1000 nits for HLG metadata 2022-05-17 05:18:46 -07:00
obs-ffmpeg-output.h obs-ffmpeg: Add max luminance metadata for PQ 2022-04-16 16:26:01 -07:00
obs-ffmpeg-source.c obs-ffmpeg: Remove duplicate "FFmpeg Options" locale 2022-05-21 15:45:17 -07:00
obs-ffmpeg-vaapi.c obs-ffmpeg: Fix compiler warnings 2022-05-04 01:37:10 -07:00
obs-ffmpeg-video-encoders.c obs-ffmpeg: Refactor FFmpeg video encoders 2022-04-22 12:51:38 -07:00
obs-ffmpeg-video-encoders.h obs-ffmpeg: Refactor FFmpeg video encoders 2022-04-22 12:51:38 -07:00
obs-ffmpeg.c obs-ffmpeg: Add HEVC support to NVENC 2022-04-28 08:59:53 -07:00