import * as z from "zod"; /** * Output formats for video cuts and exports. Width and height are the encoded frame; every * preset encodes H.264 + AAC in MP4 so the result plays everywhere it is posted. */ export const MEDIA_PRESETS = { vertical: { aspect: "9:16", width: 1080, height: 1920 }, landscape: { aspect: "16:9", width: 1920, height: 1080 }, square: { aspect: "1:1", width: 1080, height: 1080 }, portrait: { aspect: "4:5", width: 1080, height: 1350 }, classic: { aspect: "4:3", width: 1440, height: 1080 }, cinema: { aspect: "21:9", width: 2560, height: 1080 }, } as const; export const MediaPresetIdSchema = z.enum([ "vertical", "landscape", "square", "portrait", "classic", "cinema", ]); export type MediaPresetId = z.infer; export type MediaPreset = (typeof MEDIA_PRESETS)[MediaPresetId]; /** How a frame of another aspect ratio fills a preset. */ export const MediaFitSchema = z.enum(["crop", "pad", "blur"]); export type MediaFit = z.infer;