Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
557 Bytes
const fs = require("node:fs");
const { probe } = require("../ffmpeg/ffprobe");
const { buildPlan } = require("../ffmpeg/planner");
async function summarizeVideo(filePath, mode = "auto") {
const info = await probe(filePath);
const plan = await buildPlan(info, mode);
return {
filePath,
size: fs.statSync(filePath).size,
duration: info.duration,
resolution: `${info.width}x${info.height}`,
fps: info.fps,
bitrate: info.bitrate,
selectedMode: plan.mode,
encoder: plan.encoder
};
}
module.exports = { summarizeVideo };