为什么我的退出状态为 1?

Why am I getting an exit status of 1?

所以,我正在编写这段代码来分析这段视频,但是当我尝试在 Spyder、Anaconda 中 运行 它时,我遇到了这个问题:

import subprocess
from subprocess import call
import math

##Converts the given file into a series of images
def Video_to_Image_Converter(fileName):
    res1 = call("ffmpeg -i " + fileName + " -vf fps=1 frame-%d.jpg", shell=True)
    print(res1)
    result = subprocess.Popen('ffprobe -i '+ fileName +' -show_entries format=duration -v quiet -of csv="p=0"', stdout=subprocess.PIPE,stderr=subprocess.STDOUT, shell=True)
    output = result.communicate()
    print(output)
    #return math.ceil(float(output[0])) + 1


if __name__ == '__main__':
    videoLength = Video_to_Image_Converter('sampleVideo.wmv')
    print(videoLength)

因此,此代码在 iPython 中运行良好,但我在尝试使用 Spyder 时开始遇到问题。如果一切顺利,res1 的退出状态应该为 0,但它是 1。但是,我不知道出了什么问题。当 运行ning subprocess.check_output 待命时,它只说:

Command 'ffmpeg -i sampleVideo.wmv -vf fps=1 frame-%d.jpg' returned non-zero exit status 1

请帮忙。

所以,我想通了这个问题。我在我的电脑上安装了 ffmpeg,但出于某种原因,Anaconda 似乎没有使用环境变量来查找它应该 运行 的程序。似乎 Anaconda 有自己的一组已安装程序,我必须使用
通过 conda 安装它 "conda install -c menpo ffmpeg"(来自 https://anaconda.org/menpo/ffmpeg)。