UNPKG

short-video-maker

Version:

Creates short videos for TikTok, Instagram Reels, and YouTube Shorts using the Model Context Protocol (MCP) and a REST API.

121 lines (120 loc) 3.66 kB
import { z } from "zod"; import { type Caption, type CaptionPage, type OrientationEnum, MusicVolumeEnum } from "../types/shorts"; import { type OrientationConfig } from "./types"; export declare const shortVideoSchema: z.ZodObject<{ scenes: z.ZodArray<z.ZodObject<{ captions: z.ZodType<Caption[], z.ZodTypeDef, Caption[]>; audio: z.ZodObject<{ url: z.ZodString; duration: z.ZodNumber; }, "strip", z.ZodTypeAny, { url: string; duration: number; }, { url: string; duration: number; }>; video: z.ZodString; }, "strip", z.ZodTypeAny, { audio: { url: string; duration: number; }; captions: Caption[]; video: string; }, { audio: { url: string; duration: number; }; captions: Caption[]; video: string; }>, "many">; config: z.ZodObject<{ paddingBack: z.ZodOptional<z.ZodNumber>; captionPosition: z.ZodOptional<z.ZodEnum<["top", "center", "bottom"]>>; captionBackgroundColor: z.ZodOptional<z.ZodString>; durationMs: z.ZodNumber; musicVolume: z.ZodOptional<z.ZodNativeEnum<typeof MusicVolumeEnum>>; }, "strip", z.ZodTypeAny, { durationMs: number; paddingBack?: number | undefined; captionPosition?: "top" | "center" | "bottom" | undefined; captionBackgroundColor?: string | undefined; musicVolume?: MusicVolumeEnum | undefined; }, { durationMs: number; paddingBack?: number | undefined; captionPosition?: "top" | "center" | "bottom" | undefined; captionBackgroundColor?: string | undefined; musicVolume?: MusicVolumeEnum | undefined; }>; music: z.ZodObject<{ file: z.ZodString; url: z.ZodString; start: z.ZodNumber; end: z.ZodNumber; }, "strip", z.ZodTypeAny, { url: string; file: string; start: number; end: number; }, { url: string; file: string; start: number; end: number; }>; }, "strip", z.ZodTypeAny, { music: { url: string; file: string; start: number; end: number; }; scenes: { audio: { url: string; duration: number; }; captions: Caption[]; video: string; }[]; config: { durationMs: number; paddingBack?: number | undefined; captionPosition?: "top" | "center" | "bottom" | undefined; captionBackgroundColor?: string | undefined; musicVolume?: MusicVolumeEnum | undefined; }; }, { music: { url: string; file: string; start: number; end: number; }; scenes: { audio: { url: string; duration: number; }; captions: Caption[]; video: string; }[]; config: { durationMs: number; paddingBack?: number | undefined; captionPosition?: "top" | "center" | "bottom" | undefined; captionBackgroundColor?: string | undefined; musicVolume?: MusicVolumeEnum | undefined; }; }>; export declare function createCaptionPages({ captions, lineMaxLength, lineCount, maxDistanceMs, }: { captions: Caption[]; lineMaxLength: number; lineCount: number; maxDistanceMs: number; }): CaptionPage[]; export declare function getOrientationConfig(orientation: OrientationEnum): OrientationConfig; export declare function calculateVolume(level?: MusicVolumeEnum): [number, boolean];