Commit graph

106 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
0aca1fc132 code: Always provide a default case for enumerations 2023-04-05 18:58:37 +02:00
Michael Fabian 'Xaymar' Dirks
4fa26dd2d6 code: Always initialize or cast to correct type 2023-04-05 18:58:37 +02:00
Michael Fabian 'Xaymar' Dirks
de703867e6 encoder/ffmpeg: Drop support for broken FFmpeg versions
This removes the Matroska fix for ProRes content, and upgrades from av_init_packet to av_packet_alloc.
2023-04-05 18:58:37 +02:00
Michael Fabian 'Xaymar' Dirks
0fe5c7e654 code: Don't use try-catch as function definition
This breaks MSVC and results in leaked exceptions.
2023-04-05 18:58:37 +02:00
Michael Fabian 'Xaymar' Dirks
5ea8aa2acc encoders/handlers/amf: Add missing deprecation notice 2023-04-05 18:58:35 +02:00
Michael Fabian 'Xaymar' Dirks
c150a1b0d7 encoders/aom-av1: Deprecate encoder 2023-04-05 18:58:35 +02:00
Michael Fabian 'Xaymar' Dirks
3883c4759c encoders/handlers/amf: Deprecate encoder 2023-04-05 18:58:34 +02:00
lainon
6e1566386e project: Apply more C++ paradigms to the code
- Use auto in places where code clarity is improved or identical.
- Replace trivial constructors and destructors with default.
- Use true random for random generation.
- Use std::string_view where it is valid to do so.
- Apply const where it is valid to do so.
- Use references where it is valid to do so.
- Manually optimize memory usage with std::move and std::copy.
- Opt for memory efficient containers where the size is known ahead of time.

Signed-off-by: lainon <GermanAizek@yandex.ru>
2023-04-05 18:58:32 +02:00
carsten.braun
0540a18f27 encoders/ffmpeg/dnxhr: Add Avid DNxHR Encoder based on FFmpeg 2023-04-05 18:58:18 +02:00
Chris Pence
f93d5c2202 encoder/ffmpeg: Remove legacy API usage (#783)
The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API.
2023-04-05 18:58:18 +02:00
Michael Fabian 'Xaymar' Dirks
03b16786e7 encoders/ffmpeg/nvenc: Improve compatibility with FFmpeg
Replaces some very specific code with generic support for FFmpeg, which should last us much longer than the old way. Also improves the migration of settings, which wasn't quite working with the previous way.
2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks
36aec3be54 encoders/ffmpeg/nvenc: Ensure compatibility with more than just FFmpeg 4.2
When FFmpeg Encoders was originally written, FFmpeg 4.2 was still new and OBS Studio did not seem to want to update to anything newer for a while. This led to code being fine-tuned for FFmpeg 4.2, which stops working the moment OBS Studio upgrades FFmpeg. This removes the dependency on FFmpeg 4.2 hopefully, and allows using newer FFmpeg versions - or perhaps even older versions.

Additionally the nonsensical behavior of the Target Quality slider was fixed. It is now from 0 to 51, instead of from 0 to 100, and as such matches FFmpeg exactly.
2023-04-05 18:58:17 +02:00
Michael Fabian 'Xaymar' Dirks
d15e8d58da encoders/ffmpeg/nvenc: Fix new Reference Frames setting 2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks
2505b193c8 encoders/ffmpeg/nvenc: Allow OBS to detect or override bitrate
We won't allow OBS to override everything, just the bare minimum necessary for Replay Buffer, Dynamic Bitrate and generic Streaming.
2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks
567620a6ad encoders/ffmpeg/nvenc: Support reconfiguration during encoding 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
19689d1a11 encoders/ffmpeg: Add support for re-configuration of encoders 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
977716d679 encoders/ffmpeg/nvenc: Always set rc_max_rate if needed 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
6cf663ffff encoders/aom-av1: Set proper packet priority and drop priority 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
ac466a65f8 encoders/ffmpeg: Set proper packet priority and drop priority
With increasing complexity in video encoders, we end up with complex priority and drop priority structures. While the fields are currently ignored by the default libOBSs output plugins, in the future this might no longer be the case. In any case, the increase in complexity requires us to adjust to it.
2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
b151a44790 encoders/ffmpeg: Support proper settings migration 2023-04-05 18:51:53 +02:00
Michael Fabian 'Xaymar' Dirks
bc5de8061f encoders/codecs/h264: Basic support for parsing NALs 2023-04-05 18:51:51 +02:00
Michael Fabian 'Xaymar' Dirks
afa47646f5 encoders/ffmpeg/nvenc: Don't migrate already correct settings 2023-04-05 18:51:51 +02:00
Michael Fabian 'Xaymar' Dirks
ab6ba5ee4c encoder/ffmpeg/nvenc: Swap parameter names in migration code 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks
e954e86308 encoder/ffmpeg: libOBS samples Chroma at Top, not Center
This bug predates the merge into StreamFX and was present in the original release as a separate plugin. libOBS has never sampled Chroma at Center as far as I can look back into its history.

Fixes #676
2023-04-05 18:51:38 +02:00
Michael Fabian 'Xaymar' Dirks
a7cf5bd941 encoder/ffmpeg: Adjust i18n identifiers to match other parts of code 2023-04-05 18:51:28 +02:00
Michael Fabian 'Xaymar' Dirks
3ebaf9ea30 encoder/ffmpeg: Remove color format and compliance choice
As people appear to be far too willing to mess with settings they have absolutely no reason to mess with, removing these seems like the best option. Both of these can still be set if you know where to look, and aren't actually required for operation at all.
2023-04-05 18:51:28 +02:00
Michael Fabian 'Xaymar' Dirks
b122785bd1 encoder/ffmpeg/nvenc: Fix migration code causing issues 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks
6473882c57 encoder/ffmpeg/nvenc: Add Reference Frames and remove useless settings 2023-04-05 18:51:25 +02:00
Michael Fabian 'Xaymar' Dirks
b1a35118ee encoder/ffmpeg/nvenc: Fix localization file order 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks
7e9e9e037d encoder/ffmpeg/nvenc: Fix missing settings and CQ being applied in CBR mode 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks
e2efc01917 encoder/aom-av1: Add CPU Usage 10 2023-04-05 18:51:24 +02:00
Michael Fabian 'Xaymar' Dirks
a628dfebae encoder/aom-av1: Respect "Default" setting for Metric tune setting 2023-04-05 18:51:23 +02:00
Michael Fabian 'Xaymar' Dirks
8250e63fd3 encoder/aom-av1: Fix automatic selection of AV1 profile 2023-04-05 18:51:23 +02:00
Michael Fabian 'Xaymar' Dirks
2abbbfe133 encoder/aom-av1: Bitrate Overshoot only goes to 100% 2023-04-05 18:51:23 +02:00
Michael Fabian 'Xaymar' Dirks
9a4ab558c0 encoders/aom-av1: AV1 encoder based on libaom 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks
04c7116f5a project: Fix various warnings 2023-04-05 18:51:14 +02:00
Michael Fabian 'Xaymar' Dirks
4943b697bc encoder/ffmpeg: Fix incorrect translations 2023-04-05 18:51:12 +02:00
Michael Fabian 'Xaymar' Dirks
c84c301d49 obs/gs: Apply coding guidelines 2023-04-05 18:50:59 +02:00
Michael Fabian 'Xaymar' Dirks
d62da72ce5 util: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks
1c067b3b5d project: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks
4ead07c23a ffmpeg: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks
67e122eb65 encoders/codecs: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks
0d13d43dd8 encoders/handlers/amf: Apply coding guidelines 2023-04-05 18:50:56 +02:00
Michael Fabian 'Xaymar' Dirks
13d80dbfbe encoders/handlers/nvenc: Apply coding guidelines 2023-04-05 18:50:56 +02:00
Michael Fabian 'Xaymar' Dirks
05c6b54838 encoders/ffmpeg: Apply coding guidelines 2023-04-05 18:50:56 +02:00
Michael Fabian 'Xaymar' Dirks
b535dec38b encoders/handlers/nvenc: Fix NVIDIA trademark 2023-04-05 18:50:56 +02:00
Michael Fabian 'Xaymar' Dirks
5a65cf3525 plugin: Replace long descriptions with "Open Manual" button
While the long descriptions were useful, keeping the updated and translated is pretty much impossible. Technology moves fast and not everyone that translates the project knows a lot about technology.

Therefore the long descriptions have now been replaced with a button that opens the wiki page for the feature instead. This should drastically reduce the number of help cases, and improve the translation coverage at the same time.
2023-03-28 13:11:20 +02:00
Michael Fabian 'Xaymar' Dirks
5ac894c59c cmake: Refactor component and dependency system
A complete redesign of the component and dependency system is necessary in order to support additional platforms, such as MacOS and other Linux platforms. Additionally it results in a much cleaner code base, which is less confusing overall.

Eventually it might be necessary to push components of StreamFX into their own CMake projects, as it is getting kind of complex now. Especially with the push for a proper plugin manager, things get dicey for big plugins like StreamFX.
2023-03-28 13:11:10 +02:00
Michael Fabian 'Xaymar' Dirks
ff3f8cff03 encoders/ffmpeg: Implement AMF H.264 and H.265 handlers
Adds support for the AMD Advanced Media Framework H.264 and H.265 encoders via FFmpeg. The majority of settings are supported, and the UI/UX experience mimics that of the NVENC implementation. Various settings are left out due to their complexity and should be controlled via the custom parameters field.
2023-03-28 13:11:06 +02:00
Daniel Molkentin
3d5e752139 encoders/handlers/debug: Always return something in to_string (#354) 2023-03-28 13:11:01 +02:00