Commit Graph
3457 Commits
Author SHA1 Message Date
evandroduarte 47e2398ce5 rtmp-services: Update Eventials ingests 2022-06-01 22:04:14 +02:00
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
Jim 1705edf8f9 Merge pull request #6475 from GeorgesStavracas/gbsneto/drop-glx
Au revoir, GLX
2022-05-28 17:04:17 -07:00
tytan652 9a33e49087 cmake: Fix enabling PulseAudio monitoring
Also adds a warning if null monitoring is "enabled".
2022-05-28 18:36:36 -04:00
jpark37 3b0ccbb77d obs-x264: Use period for localized sentence 2022-05-28 18:31:55 -04:00
jpark37 f1e0844a58 obs-ffmpeg: Use period for localized sentences 2022-05-28 18:31:55 -04:00
jpark37 8e2e1e212c obs-x264: Convey lack of Rec. 2100 support 2022-05-28 08:36:18 -07:00
jpark37 f21ea744f8 obs-ffmpeg: Localize NVENC error dialog messages
Localize messages for lack of 10-bit support, and exceeding the hardware
B-frame limit.
2022-05-28 08:36:18 -07:00
jpark37 699e89d859 obs-ffmpeg: Improve dialog text for NVENC errors
Add dialog messages for lack of 10-bit support, and exceeding the
hardware B-frame limit. Also move code around to test these just once.
2022-05-28 06:48:27 -07:00
jpark37 fa8f1c33e9 win-dshow: Removed used UNUSED_PARAMETER 2022-05-27 14:56:47 -07:00
jpark37 235e025570 win-capture: Rename Rec. 2020 to Rec. 2100 2022-05-27 04:38:02 -07:00
Georges Basile Stavracas Neto ca2d02c2ce Drop GLX renderer
"They must often change, who would be constant in happiness or wisdom"

 - Confucius
2022-05-24 14:31:48 -03:00
Georges Basile Stavracas Neto ddb692ab2d linux-capture: Drop GLX code paths
Default to EGL and remove the sad amount of hacks from xcomposite.
2022-05-24 14:30:14 -03:00
Kurt Kartaltepe fb639e303c linux-capture: Fix map-like behavior for watcher
The original PR missed assigning the `idx` variable in unregister. When
compiled without asserts this would silently not delete sources. Instead
correctly assign idx and skip unregistration if the source doesnt appear
registered.

fixes #6532
2022-05-24 08:16:10 -03:00
gxalpha cedc397b9f mac-avcapture: Capture audio if supported
Some webcams, or other AVCaptureDevices like connected iOS devices which
are supported since 162450c, have an audio output which so far got
ignored.
Now, if supported, the audio will be captured alongside the video. For
existing sources, the properties have a button enabling this; while new
sources have it enabled by default.
2022-05-23 08:59:24 -04:00
gxalpha bfa7f1a88e obs-ffmpeg: Remove duplicate "FFmpeg Options" locale 2022-05-21 15:45:17 -07:00
derrod 56264befab rtmp-services: Apply automatic formatting to JSON 2022-05-20 08:55:56 -04:00
Matt Gajownik 2960669f9a rtmp-services: Add JSONSchema definitions for services 2022-05-20 20:25:19 +10:00
Torge Matthies 5ac6c03a8a obs-ffmpeg: Initialize mapped_res field in nv_texture_init
Otherwise it might never be initialized and nv_texture_free might unmap
a non-existant resource.
2022-05-19 16:36:14 -07:00
Torge Matthies fe776a83eb obs-ffmpeg: Reserve jim-nvenc textures buffer space
Textures dynamic array buffer space was not reserved.
2022-05-19 16:36:14 -07:00
tytan652 831fe03048 vlc-video: Fix sign-compare warning 2022-05-19 17:10:47 -04:00
Matt Gajownik 73e6df5d09 obs-ffmpeg: Fix memory leak 2022-05-17 23:13:17 +10:00
jpark37 d70c6b9dfb obs-ffmpeg: Set 1000 nits for HLG metadata 2022-05-17 05:18:46 -07:00
Richard Stanway c7e83518e1 win-wasapi: Log source name when showing device errors
Sometimes users have a forgotten source pointing to an invalid device,
which is very difficult to locate without us showing the source name.
2022-05-17 02:47:08 -07:00
pkv 12d1f1c335 obs-ffmpeg: Fix 4 channel layout in ffmpeg-mux
Previously SPEAKER_4POINT0 was assigned to AV_CH_LAYOUT_QUAD, but later
was changed to AV_CH_LAYOUT_4POINT0 [1]. The change was forgotten in
obs-ffmpeg-mux. This is remedied here.
[1] https://github.com/obsproject/obs-studio/commit/67e48ecc2ca033020210f3aae05617195d37e248

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
pkv 5b6cc73c24 obs-ffmpeg: Fix for channel layout API change
The channel_layout API was overhauled by FFmpeg [1-4]. The previous
bitmask channel_layout is replaced by a struct ch_layout which combines
the number of channels, a bitmask and other infos. This struct must now
be supplied to AVframes since avutil >= 57.24.100 and to
AVCodecContext since avcodec 59.24.100 per (1].
This commit provides the required info to ffmpeg-mux,
obs-ffmpeg-output & to obs-ffmpeg-audio-encoders.

[1] Bump minor versions after the channel layout changes
https://github.com/FFmpeg/FFmpeg/commit/cdba98bb80e2ab73d34659c610771b020afc6a77
[2] lavc: switch to the new channel layout API
https://github.com/FFmpeg/FFmpeg/commit/548aeb93834b8425c86d1ce60fddc1d41805724d
[3] avutil/channel_layout: Add a new channel layout API
https://github.com/FFmpeg/FFmpeg/commit/086a8048061bf9fb4c63943f6962db48175f655c
[4] avframe: switch to the new channel layout API db6efa18
https://github.com/FFmpeg/FFmpeg/commit/db6efa1815e217ed76f39aee8b15ee5c64698537

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00
stopforumspam 035ac5e3b7 obs-ffmpeg: Allow setting FFmpeg options for media sources 2022-05-16 15:17:13 -04:00
Grzegorz Godlewski b98ce32670 linux-v4l2: Fix camera reconnecting issue
Unable to add device after OBS start. Function device_added is never
called. HAVE_UDEV is not set correctly by cmake.
2022-05-16 13:29:52 -04:00
Kurt Kartaltepe 9b6d39299e linux-capture: Add EGL support for xcomposite
When running on EGL we can use the new create_texture_from_pixmap
functions to implement xcomposite capture.

This removes the texture indirection previously implemented for GLX due
to not using the spriting functionality in the built in shaders. Now
that we texture directly from the pixmap we can remove the red/blue swap
workarounds.
2022-05-15 09:08:53 -03:00
Kurt Kartaltepe 1604400e48 linux-capture: Rewrite xcomposite
Generally moves all the plugin code into xcomposite-input.cpp and
removes all C++ dependencies.

Migrate as much as possible to xcb from Xlib to enable us to handle
errors and attribute them to the correct callers. This caused many other
knock on issues such as wrongly attributed errors and cleanup code
working incorrectly.

That allows us to use the xcursor-xcb implementation and delete the pure
Xlib implementation. We also add the missing functionality from the Xlib
implementation to the xcb implementation.

Capture glXCreatePixmap errors which occur most commonly on
nvidia+gnome due to nvidia's driver being unable to allocate more than 1
pixmap per window and gnome being the only compositor to read window
data via glx pixmaps.

Fix cleanup after failed glXCreatePixmap that might have leaked pixmaps
and prevented later captures on nvidia drivers for the same reason.
2022-05-14 17:01:08 -03:00
Jim f2ea473373 Merge pull request #6436 from jpark37/jxr-wic
libobs,image-source,UI: Add JXR support on Windows
2022-05-12 16:09:53 -07:00
vfernandes-sympla f516b4c9d9 rtmp-services: Add sympla service 2022-05-11 23:37:13 -07:00
jpark37 23f3b1da9f image-source: Support JXR on Windows 2022-05-08 15:25:43 -07:00
Dossy ShiobaraandSebastian Beckmann 4405072e29 mac-capture: Improve window capture performance
Replaces the current implementation of Window Capture, which uses Core
Graphics to render a bitmap raster, with one that accesses the window's
CGImage bitmap directly, blits it, and hands that off as a frame to OBS
instead.

Co-Authored-By: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-05-07 16:21:25 -07:00
tytan652 0c33069772 obs-ffmpeg: Fix HEVC include in jim-nvenc 2022-05-07 16:13:21 -07:00
Paul Mc Galey 59bdac1569 vlc-video: Fix video rotation and aspect ratio
Fixes #5250 and #3843.
Gets dimensions, aspect ratio and orientation/rotation from source video track.
2022-05-07 16:03:24 -07:00
Richard Stanway 8bd4ef61a0 obs-ffmpeg: Change types to avoid unnecessary casts 2022-05-07 16:01:48 +02:00
jpark37 5ee5a8e1d4 obs-ffmpeg: Log/fail NVENC for B-frame maximum
Check NV_ENC_CAPS_NUM_MAX_BFRAMES to avoid exceeding the GPU limit.
2022-05-07 01:33:05 -07:00
jpark37 e74dc0dfe3 obs-ffmpeg: Default NVENC HEVC Max B-frames to 0
All NVENC cards support H.264 B-frames, but Turing is the first
generation to support HEVC B-frames.
2022-05-07 01:33:05 -07:00
jpark37 79059153e8 obs-ffmpeg: Fix old NVENC ignoring Max B-frames 2022-05-07 01:33:05 -07:00
jpark37 4e35e3402b obs-x264: Restore video encoder name to log 2022-05-06 20:41:15 -07:00
jpark37 2f3c25b544 obs-x264: Disallow HDR attempts gracefully
Replace crash with standard recording failure dialog, and log message.
2022-05-06 14:41:39 -07:00
pkv 5e4081e563 vlc-source: Fix surround sound not properly downmixed
This fixes issue https://github.com/obsproject/obs-studio/issues/6295 .
libvlc does some downmixing/upmixing when the number of channels
requested is less than the number of channels of the source.
We take advantage of that feature to avoid doing it with swresample
because we're missing info that libvlc is not giving (the exact channel
layout of the source).

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-06 12:34:14 -04:00
jpark37 e513d1cb6b obs-ffmpeg: Fix NVENC HEVC fallback being H.264 2022-05-04 23:54:53 -07:00
PatTheMav 4ac3299575 vlc-video: Fix compiler warnings 2022-05-04 12:09:04 -04:00
PatTheMav a97f8b7128 mac-vth264: Fix compiler warnings 2022-05-04 12:09:04 -04:00
PatTheMav b52b292fa2 mac-capture: Fix compiler warnings 2022-05-04 12:09:04 -04:00
PatTheMav 5e13460fae mac-virtualcam: Fix compiler warnings 2022-05-04 12:09:04 -04:00
Jim 952988d9ec Merge pull request #6231 from mvji/prores_pix_fmt
Add support for GPU conversion of YUV422P10LE, YUV444P12LE, YUVA444P12LE
2022-05-04 02:01:27 -07:00
tytan652 16e19d2e9c obs-output: Fix compiler warnings
* obs-output: Fix unused-parameter warning

* obs-output: Fix pointer type mismatch warning
2022-05-04 01:37:10 -07:00