Commit Graph

148 Commits

Author SHA1 Message Date
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
Michael Fabian 'Xaymar' Dirks f9e56d33f3 encoder: Remove BGR3 support 2019-07-26 23:38:31 +02:00
Michael Fabian 'Xaymar' Dirks 6db094d778 ui/nvenc_hevc_handler: Add name override 2019-07-25 03:06:51 +02:00
Michael Fabian 'Xaymar' Dirks 8d0b12dfe3 ui/nvenc_h264_handler: Add name override 2019-07-25 03:06:42 +02:00
Michael Fabian 'Xaymar' Dirks fbf5ffb921 encoder: Set unique Id to actual encoder name and add unsupported tag 2019-07-25 02:41:15 +02:00
Michael Fabian 'Xaymar' Dirks 8b2fafbbd1 encoder: Cleanup 2019-07-25 02:10:42 +02:00
Michael Fabian 'Xaymar' Dirks 10110cb62e encoder: Select best video format in get_video_info
Skips a later conversion step if we can find a potential identical or better quality video format, without ignoring the color format override in the settings itself.
2019-07-25 01:37:01 +02:00
Michael Fabian 'Xaymar' Dirks e17fa119a1 ffmpeg/tools: Function to go from AVPixelFormat to video_format 2019-07-25 01:36:16 +02:00
Michael Fabian 'Xaymar' Dirks 3e7fd3ea55 encoder: Properly flush delayed encoders 2019-07-24 21:47:39 +02:00
Michael Fabian 'Xaymar' Dirks 97a68404c0 ffmpeg/avframe-queue: Unreference frames that may have a ref-counted obj 2019-07-24 21:22:35 +02:00
Michael Fabian 'Xaymar' Dirks 24bc913f53 encoder: Ensure that delayed encoders are flushed properly 2019-07-24 21:22:14 +02:00
Michael Fabian 'Xaymar' Dirks 11cc88deb6 encoder: Fix incorrect or missing Intra-Only check 2019-07-24 21:21:54 +02:00
Michael Fabian 'Xaymar' Dirks 2c2d42ebaf encoder: Support Key-Frame options in all encoders 2019-07-24 20:53:18 +02:00
Michael Fabian 'Xaymar' Dirks c8f3f9201c ui/handler: Add ability to override UI name 2019-07-24 20:19:05 +02:00
Michael Fabian 'Xaymar' Dirks 7c3e313bcd encoder: Rename class from generic to encoder 2019-07-24 19:51:05 +02:00
Michael Fabian 'Xaymar' Dirks adeea2fb43 encoders/generic: Move file 2019-07-24 19:17:08 +02:00