566 Commits

Author SHA1 Message Date
Bennik2000
26810c31b6 obs-ffmpeg: Fix media source not closing file when inactive 2020-04-13 09:13:16 +02:00
Richard Stanway
15781073dc obs-ffmpeg: Add error text for NVENC AVERROR_EXTERNAL
Since new NVENC still falls back, try to make the error from ffmpeg
NVENC more actionable for users.
2020-04-12 17:35:27 +02:00
Richard Stanway
5e3e9c1f13 obs-ffmpeg: Use new encoder error handling functions 2020-04-12 17:05:19 +02:00
Douglas Rhine
b216b90a5c
obs-ffmpeg: Rename and add more VAAPI levels
The Auto level lets the encoder decide which level to use.
Furthermore, some devices allow levels beyond 4.2. Therefore,
we add all levels allowed by H.264. This is of importance,
since using a resolution not supported by the specified level
can trigger undefined behavior on the hardware/kernel.
2020-04-03 07:12:05 +01:00
Douglas Rhine
04d7ff5854
obs-ffmpeg: Expose VAAPI profile choices
Allow choosing Constrained Baseline, Main and High.
2020-04-02 18:10:03 +01:00
Richard Stanway
75d1f74838 obs-ffmpeg: Expose old NVENC on Windows 7
New NVENC isn't available on Windows 7 and the old encoder was marked as
internal, giving users no option to use NVENC at all.
2020-03-27 00:17:49 +01:00
jp9000
113af5344c obs-ffmpeg: Make sure to show FFmpeg NVENC on non-windows 2020-03-18 17:02:56 -07:00
Gol-D-Ace
d74fc65047 Update translations from Crowdin 2020-03-16 20:14:50 +01:00
jp9000
f60c961ae1 obs-ffmpeg: Make sure hotkeys are actually pressed
Explicitly checks to make sure hotkeys are actually down, rather than
both down and up.  This was causing the restart hotkey to restart the
media twice, once on key down, once on key up.
2020-03-07 08:14:44 -08:00
pkv
759aa079e7 obs-ffmpeg: Fix some incorrect settings for srt output
This fixes some configuration parameters which were incorrect (for audio).
2020-03-05 00:03:13 +01:00
jpark37
1121f32b40 obs-ffmpeg: Fix type conversion warning 2020-02-29 20:57:17 -08:00
jp9000
11eafbda35 obs-ffmpeg: Mark FFmpeg NVENC as internal
Because we implemented the fallback for rescaling, there's no need to
show FFmpeg NVENC anymore.
2020-02-18 21:37:51 -08:00
jp9000
55d80e82e1 obs-ffmpeg: Fall back to FFmpeg nvenc if recale active 2020-02-18 21:00:30 -08:00
Clayton Groeneveld
0b3a1711d0 obs-ffmpeg: Use callbacks when starting/ending 2020-02-10 23:49:05 -06:00
LiamCoal
2b7f4dfa6b media-playback: Unbuffered Media Source
When using an IP camera on a local network, we wanted to minimize
delay. In order to achieve minimum delay, we allowed Media Source to
set BufferingMB to 0, and when it is 0, also enable AVFMT_FLAG_NOBUFFER
in the AVFormatContext flags.
2020-02-07 20:38:06 -08:00
Clayton Groeneveld
abcff0073c obs-ffmpeg: Add media hotkeys 2020-02-05 08:14:51 -08:00
Clayton Groeneveld
68f8206877 obs-ffmpeg: Add media control support 2020-02-05 08:14:49 -08:00
jpark37
55d47bed0d obs-ffmpeg: Fix VC++ warnings 2020-01-03 09:32:07 -08:00
Jim
0d45f4d577
Merge pull request #1748 from boxerab/ffmpeg-streaming
obs-ffmpeg: UI and back-end for obs-encoded streaming over various protocols such as SRT
2019-12-18 12:54:10 -08:00
Yves Dionne
2841dfc6db obs-ffmpeg: Enable VAAPI Rate Control
Enable choosing CBR, CQP and VBR.
2019-12-11 17:16:29 -05:00
Aaron Boxer
b55b1e9bfd obs-ffmpeg: Add new ffmpeg-encoded-output 2019-11-27 14:40:52 -05:00
Aaron Boxer
e13dae8299 obs-ffmpeg: Expose ffmpeg_data_init and ffmpeg_data_free methods 2019-11-27 14:40:52 -05:00
Clayton Groeneveld
82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
Jim
1d1c9e5fee
Merge pull request #2167 from kkartaltepe/vaapi-ffmpeg-4.2
obs-ffmpeg: Remove unexposed vaapi parameters
2019-11-24 02:57:19 -08:00
Jim
fa5454d1b8
Merge pull request #2124 from notr1ch/pci-device-ids
Use PCI database IDs instead of string matching for devices
2019-11-22 23:15:55 -08:00
Kurt Kartaltepe
d2f2aeb5d2 obs-ffmpeg: Remove unexposed vaapi parameters
In ffmepg 4.2 setting qp overrides bitrate, this option isnt exposed
currently so users cannot disable it.
2019-11-06 18:57:05 -08:00
derrod
5e183ff9a7 obs-ffmpeg: use avcodec_find_best_pix_fmt_of_list
The built-in format selector failed in certain cases like UtVideo now
using a differently packeg RGB format. FFmpeg has a format selection
functionality built-in that does pick the correct format however
(avcodec_find_best_pix_fmt_of_list), so we can simply use that instead.
2019-10-17 08:07:27 +02:00
Richard Stanway
da31881059 obs-ffmpeg: Use vendor and device ID for NVENC blacklist 2019-10-16 12:19:09 +02:00
Matt Gajownik
51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +11:00
derrod
5e6a538931 obs-ffmpeg: Use av_opt_set on context instead of priv_data
Certain ffmpeg parameters such as "bufsize" or "maxrate" have to be
applied to the context rather than to "priv_data". In order to make sure
options are still passed to the encoder setting set AV_OPT_SEARCH_CHILDREN.
2019-10-09 18:54:01 +02:00
jp9000
89586ef441 obs-ffmpeg: Remove unbuffered mode from media source
Unbuffered mode is causing the frames of media sources to potentially
have some slight jitter in playback, so instead of using unbuffered mode
with media sources, just leave buffering on.  There may be a frame or so
of latency, but it shouldn't be noticeable to most users.
2019-10-05 15:40:12 -07:00
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
jp9000
66967b7a55 obs-ffmpeg: Do not enable hardware decoding by default
If a user has a tremendous amount of media files, this can cause
instability.  Instead, make hardware decoding something the user has to
explicitly enable.

Although hardware decoding was technically enabled by default even
before we fixed it, fixing it was essentially a change to defaults for
users because it was just not even available before version 24.
2019-09-24 03:04:18 -07:00
Gol-D-Ace
03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
jpark37
4a81df759d obs-ffmpeg: Fix video warnings 2019-08-30 22:13:11 -07:00
pkv
adedd967d5 obs-ffmpeg: Use NV_FAILED() instead of FAILED()
The FAILED() macro is for HRESULT values; NV_FAILED() is what should be
used for NVENCSTATUS.
2019-08-24 18:24:28 -07:00
pkv
1a11e15a30 obs-ffmpeg: Force I-Frame when reconfiguring jim-nvenc
This forces an I-Frame when reconfiguring encoding parameters so that
the changes apply immediately.
2019-08-24 18:19:59 -07:00
jp9000
806ab5a022 libobs: Mark encoders that support dynamic bitrate
(This commit also modifies mac-vth264, obs-ffmpeg, obs-qsv11, and
obs-x264)
2019-08-18 03:14:38 -07:00
jp9000
ed43de5c75 obs-ffmpeg: Allow FFmpeg NVENC to be reconfigured
Adds the ability to reconfigure FFmpeg's NVENC implementation on the
fly.
2019-08-18 03:14:38 -07:00
jpark37
90c545b52c obs-ffmpeg: Add YUV alpha formats for completeness 2019-08-11 11:26:32 -07:00
jp9000
68a5a40df9 libobs, obs-ffmpeg, win-dshow: Fix FFmpeg 4.0 deprecation
Fixes FFmpeg 4.0 deprecation warnings.
2019-07-29 20:34:13 -07:00
James Park
37f663a789 libobs: obs-ffmpeg: win-dshow: Planar 4:2:2 video
This format has been seen when using FFmpeg MJPEG decompression.
2019-07-25 20:11:37 -07:00
Clayton Groeneveld
3ea354b4e4 UI, obs-plugins: Add spinbox suffixes where necessary 2019-07-18 04:03:38 -05:00
Jim
36c8090492
Merge pull request #1952 from obsproject/pause
Add the ability to pause and unpause recordings
2019-07-11 19:56:41 -07:00
jp9000
617086b040 obs-ffmpeg: Separate logging code
Cleans up obs-ffmpeg.c and separates all the logging code to a different
file, which can be enabled with ENABLE_FFMPEG_LOGGING.
2019-07-09 10:07:24 -07:00
jp9000
942ca6f709 obs-ffmpeg: Add support for pausing 2019-07-07 16:38:22 -07:00
jp9000
3b581a3727 obs-ffmpeg: Remove unnecessary function
This terrible boilerplate code is no longer necessary, as it is now
fixed by the previous commit.
2019-07-07 16:38:21 -07:00
jp9000
8caa4f938c obs-ffmpeg: Check for replay buffer button press
The replay buffer was triggering on both button press and button
release, which is redundant.
2019-07-06 09:27:40 -07:00
jp9000
8c54b7f393 obs-ffmpeg: Move external headers to external dir
Prevents automatic formatting with clang-format
2019-06-23 23:54:26 -07:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00