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
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
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.
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
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
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
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
Michael Fabian 'Xaymar' Dirks
8c80f6c79e
project: Remove old Prores implementation
2019-07-24 19:14:21 +02:00
Michael Fabian 'Xaymar' Dirks
ee0c7706a0
ffmpeg/swscale: Apply clang-tidy fix for l <-> L
2019-07-24 14:38:30 +02:00
Michael Fabian 'Xaymar' Dirks
8fdc944be8
codecs/hevc: Remove global option maps
...
These were moved into the actual UI handler now
2019-07-24 14:37:19 +02:00
Michael Fabian 'Xaymar' Dirks
9dcce1c655
project: Apply even more patches from const correctness checks
2019-07-24 14:20:11 +02:00
Michael Fabian 'Xaymar' Dirks
034100e44b
ffmpeg/tools: Fix BT.601 color format
2019-07-24 14:19:14 +02:00
Michael Fabian 'Xaymar' Dirks
0399989238
project: Apply patches from const correctness checks
2019-07-24 14:19:00 +02:00
Michael Fabian 'Xaymar' Dirks
d4ffd20085
ui/nvenc_shared: Fix support for Quantization Parameters
2019-07-24 12:58:15 +02:00