summaryrefslogtreecommitdiff
path: root/internal/media/ffmpeg.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/ffmpeg.go')
-rw-r--r--internal/media/ffmpeg.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/internal/media/ffmpeg.go b/internal/media/ffmpeg.go
index f1c277934..ba251bd26 100644
--- a/internal/media/ffmpeg.go
+++ b/internal/media/ffmpeg.go
@@ -78,23 +78,17 @@ func ffmpegGenerateWebpThumb(ctx context.Context, inpath, outpath string, width,
// (NOT as libwebp_anim).
"-codec:v", "libwebp",
- // Select thumb from first 7 frames.
- // (in particular <= 7 reduced memory usage, marginally)
- // (thumb filter: https://ffmpeg.org/ffmpeg-filters.html#thumbnail)
- "-filter:v", "thumbnail=n=7,"+
+ // Only one frame
+ "-frames:v", "1",
- // Scale to dimensions
- // (scale filter: https://ffmpeg.org/ffmpeg-filters.html#scale)
- "scale="+strconv.Itoa(width)+
- ":"+strconv.Itoa(height)+","+
+ // Scale to dimensions
+ // (scale filter: https://ffmpeg.org/ffmpeg-filters.html#scale)
+ "-filter:v", "scale="+strconv.Itoa(width)+":"+strconv.Itoa(height)+","+
// Attempt to use original pixel format
// (format filter: https://ffmpeg.org/ffmpeg-filters.html#format)
"format=pix_fmts="+pixfmt,
- // Only one frame
- "-frames:v", "1",
-
// Quality not specified,
// i.e. use default which
// should be 75% webp quality.