← Files Pray Production StudioARCHIVED FILE

skills/pps-ads/packages/remotion-kit/src/motion/timing.ts

458 Bytes · Oct 8, 2026 · 06:29 UTC

↓ Download file

import type { AdAspectRatio } from '../grammar'

export const FPS = 30

export function frames(seconds: number): number {
  return Math.round(seconds * FPS)
}

export function sizeFor(aspectRatio: AdAspectRatio): { width: number; height: number } {
  // 9:16 and 16:9 only: a PPS project is never square, so neither is an ad (grammar ASPECT_RATIOS).
  if (aspectRatio === '16:9') return { width: 1920, height: 1080 }
  return { width: 1080, height: 1920 }
}

SHA-256: 77efd56b5dad8cd593ad43fd0488cf4c50a1af6ee07dd61be42e2e2247d4835b