Closed cedricve closed 6 years ago
Can you upload the file causing this?
import "encoding/base64"
import (
"fmt"
"os"
"github.com/bakape/thumbnailer"
)
func main() {
fmt.Println("yolo")
options := thumbnailer.Options{
ThumbDims: thumbnailer.Dims {
Width: 10,
Height: 10,
},
}
file, _ := os.Open("/Users/cedricverst/Desktop/no_sound.mp4")
src, thumb, err := thumbnailer.Process(file, options)
fmt.Println(err)
imgData := thumb.Image.Data
str := base64.StdEncoding.EncodeToString(imgData)
fmt.Println(str)
}
@bakape not sure how you installed FFMPEG and Imagemagick on Linux, but I'm getting pkg errors.
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
Yeah, you are missing libraries. No clue how to install those on OS X.
Thanks @bakape, well I also tried to install it on a Ubuntu VPS, using the default apt-repo libraries. Not sure what's the best way is to install ffmpeg/imagemagick, so it works with your library.
Are you sure you installed them all? Should be something like pkg-config libpth-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libgraphicsmagick1-dev
on Ubuntu.
hey, i tried it on a centos7 machine and all works as expected. Thanks.
Thank you for your hard work, I'm trying to use your thumbnail library on OSX but I keep getting an error "unknown thumbnailing error" while trying to generate from a mp4. Any ideas?