Commit Graph

84 Commits

Author SHA1 Message Date
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
Daniel Molkentin 2c8687f4b7 encoders/ffmpeg: Use correct parameter for log (#355) 2023-03-28 13:11:01 +02:00
Michael Fabian 'Xaymar' Dirks daa4a385d7 encoder/ffmpeg: Don't use hardware encoding for unsupported formats 2023-03-28 13:11:00 +02:00
Michael Fabian 'Xaymar' Dirks 6bc1a6b870 encoders/ffmpeg: Don't overwrite already correct settings 2023-03-28 13:11:00 +02:00
Michael Fabian 'Xaymar' Dirks 9938422d5c ffmpeg/tools: Set correct information when encoding
Improves the previous logic and makes it compatible with the new additions in 26.x, such as sRGB. This was previously broken as the focus was on existing features which could be tested without requiring a compiler to be installed.

Incorrect understanding of how sRGB works with RGB and YCC/YUV formats also caused sRGB to be treated as RGB when I444 was selected. This should also now be fixed, hopefully permanently.

Fixes #331
2023-03-28 13:11:00 +02:00
Michael Fabian 'Xaymar' Dirks 0e1377f359 encoders/handlers/nvenc: Don't list encoders on unsupported systems
Removes the NVENC entry on systems without an NVIDIA GPU by checking if the library for it can be loaded. If it can't be loaded, it's likely that the user does not have a system with NVENC capabilities - and guaranteed that they can't use the encoder as FFmpeg relies on these libraries.
2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks 8306dc5b92 encoders/ffmpeg: Add function to get info object 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks ab9d9e8443 encoders/handlers/nvenc: Make code C++ standard compliant again 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks c445865111 encoders/ffmpeg: Support for FFmpeg versions older than 58.x 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks 012027578a encoders/ffmpeg: Disable hardware path on Linux 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 2f6070d7a2 encoders/handlers/prores_aw: Fix override warning 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 6b57cdf019 encoders/codecs: Add missing includes 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks dbb9db596e project: Apply formatting 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 334ed4790c encoders/handlers/nvenc: Remove 5.2 from H.264
The levels 5.2 and above were added in a newer FFmpeg version than OBS Studio is shipping with. Ideally we'd take these options directly from FFmpeg, but that is for a future commit.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks 6185de2170 encoders/handlers/nvenc: Fix incorrect values being logged
Fixes the issue where "high444p" shows as "high", and "high" shows as "main", caused by the internal option mapping never being correct across version changes. Instead of keeping our own copy of things that has to be adjusted for each FFmpeg version, it's easier to just use the FFmpeg values and names.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks a0d0760f6d encoders/ffmpeg: Fix fallbacks, hide handler-less encoders and clean up
* Changes the encoder name to 'streamfx-{name}' from 'streamfx--{name}' as the latter is a typo, but adds a proxy to still support the latter in bad configurations.
* Some of the warning messages have been improved in order to better support end-users, and support for the new encoder error messages has been added.
* Adds support for the is_hw argument instead of blindly relying on obs_encoder_get_caps() which actually returns the wrong values due to rerouting.
* Fixed handler-less encoders showing up in the UI outside of debug builds.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks 68a49498e6 common: Rename LOG_ to DLOG_ to avoid macro confusion 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks 75663f73a4 encoders/handlers/nvenc: Don't list 'each' mode for H.264 2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks c9e8b889b0 encoders/handlers/nvenc: Improve UI/UX for NVENC
* "Quality" Minimum/Maximum is actually QP Minimum/Maximum
* Bitrate Limits is now just Limits
* Buffer Size and Quality Target have been moved into "Limits".
2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks 9a969a0b61 encoders/handlers/nvenc: Update names 2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks c21f2c32a4 encoders/ffmpeg: Add support for settings migration 2023-03-28 12:52:13 +02:00