INNER CODE UNIT · TypeScript
aspectRatio
mifi/editly · src/index.ts:144
const aspectRatio = width / height;
width = roundDimension(numPixelsEachDirection * Math.sqrt(aspectRatio));
height = roundDimension(numPixelsEachDirection * Math.sqrt(1 / aspectRatio));
}
assert(width, "Width not specified or detected");
assert(height, "Height not specified or detected");
if (!isGif) {
// x264 requires multiple of 2, eg minimum 2
width = Math.max(2, width);
height = Math.max(2, height);
}
let fps: number;
let framerateStr: string;
if (fast) {