Screen helpers · function
exportSizeFor
The frame size to record at, given what the renderer is currently managing.
Explained in Recording and clips.
function exportSizeFor(width: number, height: number, measuredFps: number, targetFps: number,import { exportSizeFor } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
width | number | |
height | number | |
measuredFps | number | |
targetFps | number | |
/** * Pixels the measurement was taken at — the window's own drawing buffer. * * Without it the comparison is between a rate measured on a 1200x700 window and * a demand made of a 1080x1920 frame | | |
which is three times the pixels: a * machine holding a comfortable 100 fps in the window is credited with being * able to hold it at the export size | | |
and it cannot. That optimism is why an * export dropped frames on hardware whose preview was flawless. Omit for the * old behaviour | | |
which is to trust the raw number. */ measuredAtPixels?: number | |
In depth
Both dimensions stay even: every H.264 encoder in the share path wants an even width and height, and an odd one is either rejected or silently padded.