Generate cover image (#376)

* Make mutating metadata ops mutation
* Implement scene generate screenshot
* Remove fetch policy on metadata mutations
* Port UI changes to v2.5
* Set generated image in database
This commit is contained in:
WithoutPants
2020-03-12 08:34:04 +11:00
committed by GitHub
parent 34d829338d
commit 3de6955a9e
28 changed files with 442 additions and 168 deletions

16
pkg/manager/screenshot.go Normal file
View File

@@ -0,0 +1,16 @@
package manager
import (
"github.com/stashapp/stash/pkg/ffmpeg"
)
func makeScreenshot(probeResult ffmpeg.VideoFile, outputPath string, quality int, width int, time float64) {
encoder := ffmpeg.NewEncoder(instance.FFMPEGPath)
options := ffmpeg.ScreenshotOptions{
OutputPath: outputPath,
Quality: quality,
Time: time,
Width: width,
}
encoder.Screenshot(probeResult, options)
}