Spaces:
Configuration error
Configuration error
Download src/monitoring/benchmark.js from UUUZCX/video-optimizer-bot: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/monitoring/benchmark.js
- Command line
-
hf download hf://spaces/UUUZCX/video-optimizer-bot/src/monitoring/benchmark.js
-
curl -L -o benchmark.js https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/monitoring/benchmark.js
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 }; | |