title: Golang command working in terminal but not with exec package
body: <p>I am converting a video generation library from NodeJS to GO that primarily uses FFMPEG for all the video processing. I already have all the FFMPEG commands written out to do the generation I want. The issue is that when I try to run the command through the <a href="https://golang.org/pkg/os/exec/" rel="nofollow noreferrer">os/exec</a> package, it fails. However, if I copy the exact command and run it directly in the terminal it works and I cannot figure out why that is. My code that runs the command is below:</p>
  <pre><code>command := &quot;ffmpeg -y -loop 1 -i image.png -vf 'fade=in:0:15,fade=out:105:15' -c:v mpeg2video -t 5 -s 1280x720 -r 30 -q:v 1 -preset ultrafast image.mpg&quot;
  
  parts := strings.Fields(command)
  cmd := exec.Command(parts[0], parts[1:]...)
  cmd.Stderr = os.Stderr
  cmd.Stdout = os.Stdout
  err := cmd.Run()
  if err != nil {
      panic(err)
  }
  </code></pre>
  <p>The ffmpeg error I get when I try to run this code is:</p>
  <blockquote>
  <p>[AVFilterGraph @ 0x22a9bc0] No such filter: 'fade=in:0:15,fade=out:105:15'</p>
  <p>Error opening filters!</p>
  <p>2016/08/17 17:48:53 exit status 1</p>
  </blockquote>
  <p>Like I previously stated, if I copy the EXACT command:</p>
  <pre><code>ffmpeg -y -loop 1 -i image.png -vf 'fade=in:0:15,fade=out:105:15' -c:v mpeg2video -t 5 -s 1280x720 -r 30 -q:v 1 -preset ultrafast image.mpg
  </code></pre>
  <p>and run it directly in the terminal, it works no problem.</p>
  <p>PLEASE HELP.</p>