Commit Graph

163 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks b6e881b90f ci: Remove AppVeyor scripts 2019-10-31 05:53:34 +01:00
Michael Fabian 'Xaymar' Dirks bd60958b2f ci: Also build InnoSetup installer on Github Actions 2019-10-31 05:53:34 +01:00
Michael Fabian 'Xaymar' Dirks f9ad87a56d ci: Add packaging and artifacts to Github Actions
Github Actions is going to replace AppVeyor in the long term for all release archives, simply because it integrates better with GitHub.
2019-10-31 05:53:34 +01:00
Michael Fabian 'Xaymar' Dirks b07365cdc4 project: Version 0.3.0
* Updated the libOBS dependency to 24.0.0. You will need to use OBS Studio 24.0.0 or newer in order to run the plugin.
* Implemented full hardware encoding for all GPU capable encoders (NVENC H264, NVENC H265). This should be perform identical to the OBS included full hardware encoders.
* Reduced the latency for some encoders to be as low as 1 frame, if settings allow. For NVENC, latency is tied to (B-Frames + 1) and Lookahead Frames, whichever is bigger.
* Further improved performance by throwing even less memory away every frame. Almost all memory is now re-used if possible and only released when the encoding is stopped by any means.
* Apple ProRes encoded files should now be remuxable when stored in Matroska (MKV) and survive at least one remuxing. This bug was already fixed in current master FFmpeg, and thanks for discovering this bug go to FRANKIEonPC.
* All color metadata is now set for encoders that support this, such as NVENC. Video players and editors that support this kind of metadata should see an improvement in color quality, especially with 10-bit or higher output.
* Framerate is now set to be fixed, further improving compatibility with players. It was previously left to be guessed by the video player through the timing information.
* Settings are now output to the log file for easier debugging. Please remember to send a log file with any issue you have with the plugin.
0.3.0
2019-10-19 02:52:23 +02:00
Michael Fabian 'Xaymar' Dirks f21cbe9aba ui/nvenc_shared: Fix lag calculation for rc-lookahead 2019-10-19 02:40:50 +02:00
Michael Fabian 'Xaymar' Dirks 403b43e77b cmake: Also include template files in project generation 2019-10-17 08:17:06 +02:00
Michael Fabian 'Xaymar' Dirks 58d8713369 enocder: Use ffmpeg for pixel format again
Reverts an earlier change as this apparently works now.
2019-10-17 08:16:42 +02:00
Michael Fabian 'Xaymar' Dirks 2f8acc58cf encoder: Separate get_defaults and get_properties for SW/HW encoders 0.3.0pre6 2019-10-04 19:27:45 +02:00
Michael Fabian 'Xaymar' Dirks e4e76dae8f ui/nvenc: Override lag in frames to use Max. B-Frames 2019-10-03 20:10:03 +02:00
Michael Fabian 'Xaymar' Dirks 4cac28a8a3 ui/handler, encoder: Allow overriding lag in frames
The lag in frames is not dictated by the number of threads being used by some encoders. At least for hardware encoders, the expected frame lag in real time encoding is 1 + the number of bframes
2019-10-03 20:09:34 +02:00
Michael Fabian 'Xaymar' Dirks d0dc4be985 encoder: Replace ffmpeg::avframe_queue with integrated implementation 2019-10-03 19:21:54 +02:00
Michael Fabian 'Xaymar' Dirks 4836f9dda6 hwapi/d3d11: Implement new HWAPI code 2019-10-03 19:19:20 +02:00
Michael Fabian 'Xaymar' Dirks 650b397ced hwapi/base: Improve frame allocation method
This allows us to cache existing frames, reducing the CPU and GPU memory load that appears due to constantly recreating frames.
2019-10-03 19:18:44 +02:00
Michael Fabian 'Xaymar' Dirks d3f7b15633 hwapi/base: Add missing #include <memory> 2019-09-29 19:33:51 +02:00
Michael Fabian 'Xaymar' Dirks 545dcd6d50 encoder: Add support for true hardware encoding
This is the last step towards truly efficient encoding on AMD, Nvidia and Intel GPUs. With this we have no software overhead and can directly encode the content that OBS gives us, without going through any intermediate CPU layer. This is effectively what @jp9000 did for the OBS-integrated nvenc, but thanks to FFmpeg it works on all encoders that support D3D11VA acceleration.

With the change, the encoding should now work flawlessly even in very constrained situations (unless OBS itself is being starved of resources). Especially people streaming and recording Ubisoft games will likely see a drastic increase in encoding capability, and thanks to the new options will also be able to get a much higher quality stream and recording with the same hardware.
0.3.0pre5
2019-09-29 19:29:00 +02:00
Michael Fabian 'Xaymar' Dirks 0461b20e1b ui/handler: Allow Codec handlers to select the proper device 2019-09-29 19:16:26 +02:00
Michael Fabian 'Xaymar' Dirks b3a6dbb1b4 hwapi: Add API handlers to deal with some heavy lifting code
Makes our life easier when actually dealing with hardware encoding.
2019-09-29 19:15:45 +02:00
Michael Fabian 'Xaymar' Dirks fe71944199 ui/prores_aw_handler: Workaround for FFmpeg bug with ProRes in Matroska
In current FFmpeg, whenever Matroska with ProRes is demuxed it creates an atom that is just 8 bytes short of the true size necessary.

We can work around this by padding the actual packet by 8 0x00 bytes, which should result in older FFmpeg versions working fine.

An FFmpeg patch is available: http://ffmpeg.org/pipermail/ffmpeg-devel/2019-September/250724.html
0.3.0pre4
2019-09-29 07:27:22 +02:00
Michael Fabian 'Xaymar' Dirks cbd39a8c2a encoder: Cache the UI handler and allow packet processing 2019-09-29 06:58:01 +02:00
Michael Fabian 'Xaymar' Dirks 62eae3827b ui/handler: Add function for packet processing 2019-09-29 06:55:42 +02:00
Michael Fabian 'Xaymar' Dirks 38e7639862 ffmpeg/tools: Actually use the score 0.3.0pre3 2019-09-28 02:10:37 +02:00
Michael Fabian 'Xaymar' Dirks 6bc1cb9c88 ui/nvenc*: Print all settings to the log file 2019-09-28 01:54:28 +02:00
Michael Fabian 'Xaymar' Dirks c63900d575 encoder: Also log custom overrides 2019-09-28 01:48:56 +02:00
Michael Fabian 'Xaymar' Dirks 9efda8af8d ui/prores_aw_handler: Print profile to log 2019-09-27 16:29:01 +02:00
Michael Fabian 'Xaymar' Dirks 0c9764a15c encoder: Use codec name instead of encoder info 2019-09-27 16:28:44 +02:00
Michael Fabian 'Xaymar' Dirks 5c5a235502 ui/handler: Always have a no-op function 2019-09-27 16:16:39 +02:00
Michael Fabian 'Xaymar' Dirks 2ebf90ffd7 encoder, ffmpeg/tools: Fix and improve initialization behavior
Correctly sets all color settings for the context and frames, which should result in better playback in players that support these. Unfortunately it does not fix the bug that VLC and MPC-HC incorrectly assume that the ProRes encoded content is in Partial range, however most editing software does correctly detect it.
2019-09-27 16:16:14 +02:00
Michael Fabian 'Xaymar' Dirks a32f8dd28b ui/prores_aw_handler: Override automatic color format when profile demands it
Certain ProRes profiles require a very specific color format, otherwise the avcodec_open2 will fail with EPERM, which is very confusing.
0.3.0pre2
2019-09-27 12:41:13 +02:00
Michael Fabian 'Xaymar' Dirks d8a692de93 codecs/prores: Add ProRes codec data
There isn't really anything here, just some defines.
2019-09-27 12:36:10 +02:00
Michael Fabian 'Xaymar' Dirks a9f39527f6 handler: Additional functionality for handlers
Allows overriding color format, encoder info, importing and exporting from/to ffmpeg command line and most importantly logging actual settings to the log file.
2019-09-27 12:35:34 +02:00
Michael Fabian 'Xaymar' Dirks 71440ed3c5 encoder: Revert change 5c8939b4a8
Breaks more than intended, and this way is better anyway as the error that used to show up gave no indication as to what went wrong. With this reverted it now shows that starting encoding failed.
2019-09-24 16:00:53 +02:00
Michael Fabian 'Xaymar' Dirks 3bd147e6e7 ffmpeg/tools: Improve format selection functionality 2019-09-24 15:58:12 +02:00
Michael Fabian 'Xaymar' Dirks 8b6af720bf encoder: Add support for full on-GPU encoding
Adds support for the full on-GPU encoding path for texture encoding, which just needs to be actually implemented.

In addition this commit also ensures better stability by catching all C/C++ exceptions that could leak to C code which can't handle this at all.
2019-09-23 21:04:18 +02:00
Michael Fabian 'Xaymar' Dirks 993a4f8110 ffmpeg/tools: Function to check for hardware encoding
Implements a function that can be used to check for hardware texture support, which allows full on-GPU encoding to work for supported encoders.
2019-09-23 20:30:03 +02:00
Michael Fabian 'Xaymar' Dirks 36222cc186 ci: Fix incorrect package name in builder script 0.3.0pre1 2019-09-04 00:43:29 +02:00
Michael Fabian 'Xaymar' Dirks 9fcec9b9a9 project: Update libobs to v24.0.0-rc2 2019-09-04 00:43:29 +02:00
Michael Fabian 'Xaymar' Dirks 11f72c9bc7 ci: Integrate Github Actions
Integrates Github Actions which is much much faster than AppVeyor in all areas, and even supports multiple workflows instead of forcing everything into just one workflow like AppVeyor does. Plus we get 20 parallel builds that nearly instantly finish, which results in much faster feedback without having to run our own Jenkins CI.

The builder and packager scripts have been adjusted to add support for both Windows and Linux, and both AppVeyor and Github Actions. Additionally to that, the builder script now correctly executes x32 and x64 steps in a chain, instead of waiting for the other architecture to finish first. This further reduces build times.
2019-09-04 00:30:06 +02:00
Michael Fabian 'Xaymar' Dirks 5c8939b4a8 encoder: Delay init until resolution, framerate and color are finalized
Fixes a crash due to reading/writing out of bounds when the resolution, color and framerate end up different than initially expected during the creation of the encoder. While this does change the error message that appears when the encoder can't be initialized, it is better than outright crashing OBS Studio.
2019-08-11 21:46:21 +02:00
Michael Fabian 'Xaymar' Dirks a4b3131c50 project: Version 0.2.0
* Completely rewrote most of the plugin from scratch to unify the encoder class into one file, resulting in much lower code and size overhead and all optimizations being in effect for all encoders.
* Removed old ProRes encoder interface as it has been replaced with the new interface.
* Added support for NVidias H.264/AVC NVENC Encoder with all options, including the capability for YUV 4:4:4 encoding. It is slightly faster and less CPU intensive than the version included with OBS Studio.
* Added support for NVidias H.265/HEVC NVENC Encoder with all options. This finally brings the HEVC market to NVidia people in addition to the AMD people that have already been able to use this with enc-amf.
0.2.0
2019-08-11 03:38:41 +02:00
Michael Fabian 'Xaymar' Dirks 617229ce84 codecs/hevc: Add HEVC NAL parsing capabilities
While this doesn't help with thumbnails, it helps some players get the playback started quicker. Also was a fun exercise too.
2019-08-11 03:22:55 +02:00
Michael Fabian 'Xaymar' Dirks e3263c2372 encoder: Fix streaming and recording for H.264/AVC encoders 2019-08-11 01:06:49 +02:00
Michael Fabian 'Xaymar' Dirks e84eedb8f9 encoder: Fix cast warning 2019-08-10 22:40:45 +02:00
Michael Fabian 'Xaymar' Dirks 7faea52d67 ui/nvenc_shared: Hide the QP group if mode is not CQP or VBR 2019-08-10 22:40:37 +02:00
Michael Fabian 'Xaymar' Dirks 6523b82c95 encoder: Apply coding guidelines 2019-08-10 22:39:06 +02:00
Michael Fabian 'Xaymar' Dirks 3253e97dec encoder: Implement initial support for AVC streaming
This is currently not fully working, but it makes OBS not crash so that's good enough for this commit.
2019-08-10 22:37:49 +02:00
Michael Fabian 'Xaymar' Dirks 0c9dd4b2f8 ui/nvenc_shared: Add Quality Target for VBR 2019-08-10 22:36:51 +02:00
Michael Fabian 'Xaymar' Dirks c6d842d52d ui/nvenc_shared: Reduce upper limit for lookahead to 32
This matches the actual limit in the SDK.
2019-08-10 19:39:00 +02:00
Michael Fabian 'Xaymar' Dirks 61c4c80c8f project: Add and apply new contributing guidelines 2019-08-10 19:31:57 +02:00
Michael Fabian 'Xaymar' Dirks 8af061ea02 ci: Don't run both package steps in the same build 2019-08-03 15:54:46 +02:00
Michael Fabian 'Xaymar' Dirks f5052f45c6 project: Fix support for avcodec version 58 and newer 2019-08-03 09:45:56 +02:00