mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 06:38:38 +01:00
An H.264 encoder refuses frames bigger than 4096 x 2304 (either way round). On a 5120 x 2160 display the sink writer failed at SetInputMediaType with 0xC00D36B4 (MF_E_INVALIDMEDIATYPE), reported as "the encoder cannot take frames of this format", and no display could be recorded. segment::h264_size gives the size to encode at: the display's own, made even, when H.264 can take it, and otherwise the largest even size of the same shape that it can (5120 x 2160 is recorded at 4096 x 1728). When that is not the display's size, a Direct3D 11 video processor scales each frame on the GPU before it is handed to the encoder. Displays that fit are untouched. Recorded and decoded on a 5120 x 2160 display: all three screens, undistorted.