Currently working with this ffmpeg command to edit video
ffmpeg -i "video1.ts" -c:v libx264 -crf 20 -c:a aac -strict -2 "video1-fix.ts"
When I enter it in the terminal, it works. However when I try to use the Golang exec.Command() func, I get err response of
&{/usr/local/bin/ffmpeg [ffmpeg -i "video1.ts" -c:v libx264 -crf 20 -c:a aac -strict -2 "video1-fix.ts"] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>}
Here below is my code
cmdArguments := []string{"-i", "\"video-1.ts\"", "-c:v", "libx264",
"-crf", "20", "-c:a", "aac", "-strict", "-2", "\"video1-fix.ts\""}
err := exec.Command("ffmpeg", cmdArguments...)
fmt.Println(err)
Am i missing something from my command syntax? Not sure why it is not loading the videos
exec.Command
returns a*Cmd
, not an error. – JimB