1
Fork 0

reordered cli arguments for ffmpeg to improve speed to generate thumbnails from videos (#917)

This commit is contained in:
Andreas 2024-03-29 20:35:50 +01:00 committed by GitHub
parent b8504c47be
commit 68cc2a0eee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -143,12 +143,12 @@ func (worker *FfmpegWorker) EncodeVideoThumbnail(inputPath string, outputPath st
thumbnailOffsetSeconds := fmt.Sprintf("%d", int(probeData.Format.DurationSeconds*0.25))
args := []string{
"-ss", thumbnailOffsetSeconds, // grab frame at time offset
"-i",
inputPath,
"-vframes", "1", // output one frame
"-an", // disable audio
"-vf", "scale='min(1024,iw)':'min(1024,ih)':force_original_aspect_ratio=decrease:force_divisible_by=2",
"-ss", thumbnailOffsetSeconds, // grab frame at time offset
outputPath,
}