Handle even px requirement

This commit is contained in:
Manav Rathi
2025-04-29 13:27:48 +05:30
parent b1efd289d3
commit 94de25cb26
2 changed files with 58 additions and 46 deletions

View File

@@ -92,8 +92,9 @@ const makeGenThumbnailCommand = (seekTime: number) => [
// Apply a filter to this frame
"-vf",
[
// - Scale it to a maximum height of 720 keeping aspect ratio
"scale=-1:720",
// - Scale it to a maximum height of 720 keeping aspect ratio, ensuring
// that the dimensions are even (subsequent filters require this).
"scale=-2:720",
// - Apply a tonemap to ensure that thumbnails of HDR videos do not look
// washed out. See: [Note: Tonemapping HDR to HD].
"zscale=transfer=linear",