Spaces:
Configuration error
Configuration error
Download src/ffmpeg/presets.js from UUUZCX/video-optimizer-bot: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/ffmpeg/presets.js
- Command line
-
hf download hf://spaces/UUUZCX/video-optimizer-bot/src/ffmpeg/presets.js
-
curl -L -o presets.js https://huggingface.co/spaces/UUUZCX/video-optimizer-bot/resolve/main/src/ffmpeg/presets.js
1.09 kB
| const presets = { | |
| ultra: { crf: 31, cq: 31, maxWidth: 960, fps: 24, audio: "64k", x264Preset: "slow", tune: null }, | |
| balanced: { crf: 25, cq: 25, maxWidth: 1280, fps: 30, audio: "96k", x264Preset: "medium", tune: null }, | |
| maxquality: { crf: 20, cq: 20, maxWidth: 1920, fps: 60, audio: "128k", x264Preset: "slow", tune: null }, | |
| "max-quality": { crf: 20, cq: 20, maxWidth: 1920, fps: 60, audio: "128k", x264Preset: "slow", tune: null }, | |
| ocr: { crf: 18, cq: 19, maxWidth: 1920, fps: 30, audio: "96k", x264Preset: "slow", tune: "stillimage" }, | |
| screen: { crf: 19, cq: 20, maxWidth: 1920, fps: 30, audio: "96k", x264Preset: "slow", tune: "stillimage" }, | |
| anime: { crf: 22, cq: 22, maxWidth: 1440, fps: 30, audio: "96k", x264Preset: "slow", tune: "animation" }, | |
| camera: { crf: 24, cq: 24, maxWidth: 1280, fps: 30, audio: "96k", x264Preset: "medium", tune: "film" } | |
| }; | |
| function getPreset(mode) { | |
| const normMode = String(mode || "balanced").toLowerCase().replace("-", ""); | |
| return presets[normMode] || presets[mode] || presets.balanced; | |
| } | |
| module.exports = { presets, getPreset }; | |