Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "os/exec"
- )
- func newCmd(imageFile, audioFile, outFile string) *exec.Cmd {
- return exec.Command("ffmpeg",
- "-r", "1",
- "-loop", "1",
- "-i", imageFile,
- "-i", audioFile,
- "-acodec", "copy",
- "-r", "1",
- "-shortest", "-vf",
- "scale=1280:720",
- outFile,
- )
- }
- func main() {
- cmd := newCmd("ep1.jpg", "ep1.wav", "ep1.flv")
- cmd.Run()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement