Commit Graph

14 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 1872f7c000 Fix time limit calculation being the wrong way around.
This caused the code to wait for up to x seconds, where x is the Num/Den FPS time. The correct way is Den/Num, so that it only waits a single frame.
2017-10-28 03:14:26 +02:00
Xaymar 658063ea41 enc-vfw: Fix several issues
- Encoding Loop no longer checks queue size, fixes an infinite loop issue.
- A lot of debug only code has been made to compile in debug only.
2017-10-27 07:06:18 +02:00
Xaymar 3ff6faeb23 Reduce unnecessary log spam 2017-10-22 15:30:58 +02:00
Xaymar aeaa8dd90e Improved Threading, better Frame Submission and more
The encoder is now capable of delayed or immediate threading (using fixed latency) which allows for a much better performance and works better with older VFW encoders that assume they are being used for transcoding instead of live-encoding.

In addition to the above, the MPEG-2 rewrite code for Matrox MPEG-2 encoders is completely done now and will fix up the bitstream Matroxs encoder sends out to be mostly correct, allowing for better seeking.

The last change this encompasses is the removal of the need to flip a RGBA frame to BGRA. This doesn't break any support and should work better with what we have.

This exposed several bugs in OBS Studio:
- Color Range, Space & Format are ignored by OBS Studio if set by the encoder.
- The ffmpeg-mux process freezes when writing the header for a correct MPEG-2 stream that doesn't match what OBS thinks it should be. ffmpeg itself has no issues writing this header, so this is an OBS Studio issue.

And exposed the following bugs in Matrox VFW:
- The MPEG-2 bitstream is written as interlaced Top-Field-First instead of Progressive - the content itself is Progressive.
- The encoder ignores FastCompress mode and just behaves identically in either mode.
- Some parameters that should be set are not being set by Matrox (extended Framerate for example).
2017-10-21 18:49:36 +02:00
Michael Fabian Dirks b10e3cbe9c Add get_extra_data (no-op) and update logging 2017-07-13 23:31:41 +02:00
Michael Fabian Dirks b843825d2e Add Interval Type and Force Keyframes, improve logs 2017-06-20 16:47:44 +02:00
Michael Fabian Dirks 0437f1bef3 encoder: See description
Features, Fixes, etc:
- Added encoding 'Mode' selection which allows users to choose between Normal (Single Frame), Temporal (Single + Last Frame) and Sequential (VFW Default).
- Fixed several compiler warnings with mismatched types and unused variables.
- 'Keyframe Interval' and 'Bitrate' now default to 0 (Encoder decides).
- 'Quality' now defaults to 100.0%.
- Added default Quality and Keyframe Interval to log.
- 'Bitrate', 'Quality', 'Configure' and 'About' are hidden when the encoder does not support them.
- Encoder States are stored in-memory during an OBS session.

ToDo:
- Save/Load encoder state from disk.
2017-06-08 09:39:07 +02:00
Michael Fabian Dirks 0311777e7a plugin: Add 'Mode' strings 2017-06-08 09:25:12 +02:00
Michael Fabian Dirks 04ff39ddfd Improve BITMAPINFO headers 2017-05-20 13:51:17 +02:00
Michael Fabian Dirks b213aa5607 Add codec correcting code handle dual-fourcc codecs (Intel...), properties and callbacks and stuff, starting of things, etc.
Works with most things except Matrox.
2017-05-03 13:37:15 +02:00
Michael Fabian Dirks b55a847420 Add basic compression stuff 2017-05-03 08:12:00 +02:00
Michael Fabian Dirks 9cd891b6b3 Update 2017-03-15 17:14:30 +01:00
Michael Fabian Dirks ae3cc11509 Initial Code 2017-03-15 15:28:17 +01:00
Michael Fabian Dirks 2f0e0cf218 Update gitignore and README 2017-03-15 15:27:35 +01:00