mirror of
https://github.com/go-ffstatic/ffstatic
synced 2025-10-06 08:07:00 +08:00
add examples
This commit is contained in:
19
examples/basic/main.go
Normal file
19
examples/basic/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/floostack/transcoder/ffmpeg"
|
||||
ffstatic_darwin_amd64 "github.com/go-ffstatic/darwin-amd64"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ff := ffmpeg.New(&ffmpeg.Config{
|
||||
FfmpegBinPath: ffstatic_darwin_amd64.FFmpegPath(),
|
||||
FfprobeBinPath: ffstatic_darwin_amd64.FFprobePath(),
|
||||
})
|
||||
ch, err := ff.Input("./input.avi").Output("./output.mp4").Start(ffmpeg.Options{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for range ch {
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user