fix: Исправление выбора энкодер/декодер

This commit is contained in:
2026-01-20 14:24:51 +03:00
parent 88fc443cb6
commit 69b3a4804f
15 changed files with 457 additions and 250 deletions

View File

@@ -156,7 +156,14 @@ export async function encodeProfileToMP4(
);
// Build video filter chain
const filters: string[] = [`scale=${profile.width}:${profile.height}`];
const filters: string[] = [];
if (decoderAccel === 'nvenc') {
// CUDA path: keep frames on GPU
filters.push(`scale_cuda=${profile.width}:${profile.height}`);
} else {
filters.push(`scale=${profile.width}:${profile.height}`);
}
// Apply optimizations (for future use)
if (optimizations) {