#!/usr/bin/zx --quiet import { formatDuration } from "./util.mjs"; import Producer from "./producer.mjs"; export default async function kdenliveProject( source_files, project_settings, // const project_settings = { fps: 30 }; clips ) { const producers = await Promise.all(source_files.map(Producer.fromFile)); return ` ${( await Promise.all( producers.map((producer) => producer.toXML(project_settings)) ) ).join("\n")} 2 2 1 0 1633881496938 [ ] 21.08.1 1.02 1 ${producers .map( (producer, index) => `` ) .join("\n")} 2147483647 continue black 1 color rgb24a 0 1 1 1 1 1 1 1 `; } const project_content = await kdenliveProject( ["/home/kuba/Videos/5min.mp4", "/home/kuba/Videos/5min.wav"], { fps: 30, } ); await $`echo ${project_content} > project-generated.kdenlive`;