fix avatar max 1 frame
This commit is contained in:
@@ -41,7 +41,7 @@ func (api *API) HandelGetFileAvatar(w http.ResponseWriter, r *http.Request) {
|
||||
log.Println("[api] Get avatar of file", path)
|
||||
buff := make([]byte, 0)
|
||||
cache := bytes.NewBuffer(buff)
|
||||
cmd := exec.Command("ffmpeg", "-i", path, "-c:v", "libwebp_anim", "-update", "1", "-f", "image2pipe", "-")
|
||||
cmd := exec.Command("ffmpeg", "-i", path, "-c:v", "libwebp_anim", "-update", "1", "-frames:v", "1", "-f", "image2pipe", "-")
|
||||
cmd.Stdout = cache
|
||||
|
||||
err = cmd.Run()
|
||||
|
||||
Reference in New Issue
Block a user