Commit Graph

27 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks c3d1793f14 encoders/generic: Only check MAX_AV_PLANES 2019-07-24 11:19:33 +02:00
Michael Fabian 'Xaymar' Dirks 57ebb9d866 encoders/generic: Handle frame queue in send_frame 2019-07-24 11:19:33 +02:00
Michael Fabian 'Xaymar' Dirks 9f8e4b67c6 encoders/generic: Don't use a pointer for AVPacket
Also allocate 8MB of storage initially, and free the buffers in the packet on stop.
2019-07-24 11:19:33 +02:00
Michael Fabian 'Xaymar' Dirks c61b2aead1 encoders/generic: Ensure that the packet is using default values 2019-07-24 11:19:33 +02:00
Michael Fabian 'Xaymar' Dirks f7db2d45af encoders/generic: Don't throw away AVFrames 2019-07-24 11:19:33 +02:00
Michael Fabian 'Xaymar' Dirks 9db2219582 encoders/generic: Prefer formats with no conversion
Fixes the issue where an encoder has RGB0 available as input, but avcodec_find_best_pix_fmt_of_list would choose YUV420P instead for RGBA.
2019-07-24 11:19:32 +02:00
Michael Fabian 'Xaymar' Dirks 68bacc07dc encoders/generic: Fix NV12 support and improve copy performance
FFmpeg's swscale does not properly copy all planes when the pixel format is NV12, so instead we will handle cases where nothing actually changes and we just have to copy memory.
2019-07-24 11:19:29 +02:00
Michael Fabian 'Xaymar' Dirks fa5c421d34 project: Drop GPL in favor of MIT license 2019-07-24 11:04:24 +02:00
Michael Fabian 'Xaymar' Dirks 855b3571b1 encoders/generic: Store actual decode timestamp instead of presentation timestamp 2019-07-22 08:59:32 +02:00
Michael Fabian 'Xaymar' Dirks c053933c25 encoders/generic: Fix threading and avoid property groups if broken 2019-07-22 05:02:44 +02:00
Michael Fabian 'Xaymar' Dirks 6851f2321a encoders/generic: Set the time base correctly
There is a small but important difference in the way OBS Studio and FFmpeg handle the FPS time base. This change fixes the problem and makes all encoders go back to sanity.
2019-07-22 00:55:01 +02:00
Michael Fabian 'Xaymar' Dirks 2472668f1d encoders/generic: Slight reformatting of the visible encoder name 2019-07-21 11:55:14 +02:00
Michael Fabian 'Xaymar' Dirks 7663a25bb3 encoders/generic: Hide encoders that don't have a UI handler
This prevents the uninformed from using an encoder that they really shouldn't be using, thus reducing the amount of issues that come from showing too many encoders.
2019-07-21 11:55:13 +02:00
Michael Fabian 'Xaymar' Dirks 83c9de95f9 encoders/generic: Fix key value separators and apply settings correctly 2019-07-20 23:38:45 +02:00
Michael Fabian 'Xaymar' Dirks 090dd9dbdc encoders/generic: Fix threading priority and thread count override 2019-07-13 00:16:42 +02:00
Michael Fabian 'Xaymar' Dirks cdb03a488e encoders/generic: Clean up code slightly 2019-07-13 00:16:42 +02:00
Michael Fabian 'Xaymar' Dirks 97a53d261f encoders/generic: Fix getting stuck in EAGAIN endless loop
Also removes some left over debug logs.
2019-07-07 15:07:09 +02:00
Michael Fabian 'Xaymar' Dirks e45a82350e encoders/generic: Fix crash and disable static properties 2019-07-07 14:44:08 +02:00
Michael Fabian 'Xaymar' Dirks b6ad026eb3 encoders/generic: Allow overriding of thread count 2019-07-07 14:33:58 +02:00
Michael Fabian 'Xaymar' Dirks df63677529 encoders/generic: Allow overriding color format
Some encoders don't have all options available with the automatically detected color format, so allowing the user to override the detected color format opens up more options.
2019-07-07 14:26:51 +02:00
Michael Fabian 'Xaymar' Dirks d1ff4a7adc encoders/generic: Don't instantly drop frames on EAGAIN
Instead of instantly dropping frames on EAGAIN, try first recieving a packet (if not already done so) and then resubmit the same frame. If it still doesn't work, drop the frame as we have no way to deal with that situation yet.
2019-07-07 13:50:47 +02:00
Michael Fabian 'Xaymar' Dirks b442914ebe encoders/generic: Replace generated UI with the new UI Handlers 2019-07-07 13:46:09 +02:00
Michael Fabian 'Xaymar' Dirks 2f0cd790ed encoders/generic: Update to match new std::shared_ptr<AVFrame> code 2019-07-07 12:14:46 +02:00
Michael Fabian 'Xaymar' Dirks e7c12a52f3 ffmpeg/generic: Strip generated options and always apply bitrate and profile in update 2019-07-07 01:12:06 +02:00
Michael Fabian 'Xaymar' Dirks 976e5dba4f encoders/generic: Reduce warnings, fix encoding, remove threading options, and profiling
* Improved encoding loop can now deal with early and late receive requests.
* Lots of warnings fixed.
* Removed all threading options (they were broken anyway).
* Added some profiler calls.
2019-07-07 00:34:56 +02:00
Michael Fabian 'Xaymar' Dirks 0a20b750b8 encoders/generic: Implement video encoding and always use frame queue
This implements video encoding for the generic encoder by using frame queue and a set lag amount (in frames). The lag amount determines for how many frames no repeated attempts at submitting or retrieving a frame should be made, and after that many frames have been submitted the generic encoder will try to retrieve packets if at all possible. If not possible, it will delay for as long as possible to show an Encoder overloaded message.
2019-07-06 14:22:15 +02:00
Michael Fabian 'Xaymar' Dirks 9a58a6a5ff encoders/generic: Implement generic encoder for all ffmpeg encoders 2019-07-06 13:10:00 +02:00