modified args for screenshot

This commit is contained in:
ExceptionalError
2019-10-09 06:15:00 +02:00
committed by GitHub
parent d4f383a005
commit d082580ee0

View File

@@ -18,14 +18,14 @@ func (e *Encoder) Screenshot(probeResult VideoFile, options ScreenshotOptions) {
options.Quality = 1 options.Quality = 1
} }
args := []string{ args := []string{
"-v", options.Verbosity, "-v " + options.Verbosity,
"-ss", fmt.Sprintf("%v", options.Time), fmt.Sprintf("-ss %v", options.Time),
"-y", "-y",
"-i", `"` + probeResult.Path + `"`, "-i \"" + probeResult.Path + "\"",
"-vframes", "1", "-vframes 1",
"-q:v", fmt.Sprintf("%v", options.Quality), fmt.Sprintf("-q:v %v", options.Quality),
"-vf", fmt.Sprintf("scale=%v:-1", options.Width), fmt.Sprintf("-vf scale=%v:-1", options.Width),
"-f", "image2", "-f image2",
options.OutputPath, options.OutputPath,
} }
_, _ = e.run(probeResult, args) _, _ = e.run(probeResult, args)