Update thumbnails.ts

Thumbnail from center of images instead of stretching it
pull/222/head
Nischay Sharma 1 year ago committed by GitHub
parent 80c61910ed
commit 46b043f3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,8 +26,8 @@ function getCommand(src: String, dest: String) {
'-v', (isProd ? 'error' : 'debug'), // Log level '-v', (isProd ? 'error' : 'debug'), // Log level
'-i', src, // Input file '-i', src, // Input file
'-ss', '00:00:01.000', // Timestamp of frame to grab '-ss', '00:00:01.000', // Timestamp of frame to grab
'-vf', `scale=${THUMBNAIL.WIDTH}:${THUMBNAIL.HEIGHT}:force_original_aspect_ratio=increase,crop=${targetWidth}:${targetHeight}`, // Dimensions of output file
'-frames:v', '1', // Number of frames to grab '-frames:v', '1', // Number of frames to grab
'-s', `${THUMBNAIL.WIDTH}x${THUMBNAIL.HEIGHT}`, // Dimensions of output file
dest // Output file dest // Output file
]); ]);
} }

Loading…
Cancel
Save