Hugging Face Deployer
Deploy bot to Hugging Face Spaces
03b405b
Raw History Blame Contribute Delete
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 };