Commit Graph

69 Commits

Author SHA1 Message Date
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
Michael Fabian 'Xaymar' Dirks 161f10a921 encoders/ffmpeg: Rename files to match naming scheme 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks ce93f96a69 encoders/ffmpeg: Rebase onto obs::encoder_factory 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks d85ced4107 encoders/ffmpeg: Assume source pixel format for empty support lists 2023-03-28 12:40:46 +02:00
Michael Fabian 'Xaymar' Dirks 071760b867 ffmpeg-encoder/nvenc: Invert "no-scenecut" option for "Adaptive I-Frames"
Our "Adaptive I-Frames" is the inverse of the expected parameter to "no-scenecut" in FFmpegs NVENC.

Related #191
2023-03-28 12:40:41 +02:00
Michael Fabian 'Xaymar' Dirks 0966b61f76 ffmpeg-encoder/nvenc: Test for "h264_nvenc" in for "Adaptive B-Frames"
Fixes the bug where "Adaptive B-Frames" would not be applied in the way it was expected to be applied.

Related: #191
2023-03-28 12:40:41 +02:00
Michael Fabian 'Xaymar' Dirks d0941895ad project: Refactor into namespace streamfx 2020-04-23 00:50:39 +02:00
Michael Fabian 'Xaymar' Dirks 984a1132bf ffmpeg-encoder: Implement additional support checks 2020-04-17 11:13:10 +02:00
Michael Fabian 'Xaymar' Dirks a9c881130e ffmpeg-encoder/nvenc: Fix Look Ahead setting
Also now disables Adaptive I & B as they do nothing without Look-Ahead set to non-zero.

Fixes #159
2020-04-17 11:13:10 +02:00
Michael Fabian 'Xaymar' Dirks 908d1f0a20 project: Modernize code to proper C++ 2020-04-09 00:17:25 +02:00
Michael Fabian 'Xaymar' Dirks 6a9921c9ce project: Fix include ordering and reapply formatting 2020-04-06 15:39:12 +02:00
Michael Fabian 'Xaymar' Dirks a138f95126 cmake: Fix clang support in native OBS Studio build 2020-04-05 06:50:21 +02:00
Michael Fabian 'Xaymar' Dirks 9e9e9cbcd5 ffmpeg-encoder/prores: Improve pixel format override logic 2020-04-04 19:34:58 +02:00
Michael Fabian 'Xaymar' Dirks 87163f5f70 ffmpeg-encoder: Use correct key when getting pixel formats 2020-04-04 19:34:58 +02:00
Michael Fabian 'Xaymar' Dirks cc9d3486b2 project: Fix Linux support by fixing errors and warnings
With this, GCC 8 and above should now be able to compile the project both in obs-studio and as a standalone install. Some features are currently still not fully supported and require extra work, but the majority of things are supported and work out of the box. Exact feature parity can be looked up here on the wiki: https://github.com/Xaymar/obs-StreamFX/wiki/Platform-Feature-Parity

Related: #119 #98 #30
2020-04-02 20:37:45 +02:00
Michael Fabian 'Xaymar' Dirks 3ad2424b22 ffmpeg-encoder: Throw std::runtime_error instead of std::exception 2020-04-02 17:05:02 +02:00