fix(thumb): cannot generate thumb using ffmpeg for specific format (#1756)
This commit is contained in:
parent
a26893aabc
commit
247e31079c
1 changed files with 1 additions and 2 deletions
|
@ -67,9 +67,8 @@ func (f *FfmpegGenerator) Generate(ctx context.Context, file io.Reader, src, nam
|
|||
|
||||
// Invoke ffmpeg
|
||||
scaleOpt := fmt.Sprintf("scale=%s:%s:force_original_aspect_ratio=decrease", options["thumb_width"], options["thumb_height"])
|
||||
inputFormat := filepath.Ext(name)[1:]
|
||||
cmd := exec.CommandContext(ctx,
|
||||
ffmpegOpts["thumb_ffmpeg_path"], "-ss", ffmpegOpts["thumb_ffmpeg_seek"], "-f", inputFormat, "-i", tempInputPath,
|
||||
ffmpegOpts["thumb_ffmpeg_path"], "-ss", ffmpegOpts["thumb_ffmpeg_seek"], "-i", tempInputPath,
|
||||
"-vf", scaleOpt, "-vframes", "1", tempOutputPath)
|
||||
|
||||
// Redirect IO
|
||||
|
|
Loading…
Add table
Reference in a new issue