INNER CODE UNIT · TypeScript
getVideoDuration
vargHQ/sdk · src/ai-sdk/providers/editly/index.ts:47
async function getVideoDuration(
path: string,
backend: FFmpegBackend,
): Promise<number> {
const info = await backend.ffprobe(path);
return info.duration;
}
async function getFirstVideoInfo(
clips: Clip[],
backend: FFmpegBackend,
): Promise<{
width?: number;
height?: number;
fps?: number;
}> {
for (const clip of clips) {
for (const layer of clip.layers) {