【发布时间】:2017-06-03 08:27:58
【问题描述】:
我对 python 还很陌生,这是我的第一个真正的项目,我遇到了一个障碍。我这里有一个 .wmv 文件,我正在使用 FFprobe 从 .wmv 文件中提取持续时间(以秒为单位)。当我在 CMD 中运行以下命令时:
ffprobe -i Video2.wmv -show_entries format=duration -v quiet -of csv="p=0"
我得到了成功的输出。
但是,当我使用 os.system 时,像这样:
os.system('ffprobe -i Video2.wmv -show_entries format=duration -v quiet -of csv="p=0"')
我得到以下输出:
'ffprobe' is not recognized as an internal or external command, operable program or batch file.
这非常令人困惑,我无法在网上找到解决这个确切问题的方法,非常感谢任何输入。
【问题讨论】:
-
看看我的一些问题,我一直在做类似的事情。特别是this one.
-
ffprobe 存储在您计算机的什么位置?
-
@Gloin 位于C:\ffmpeg
-
你是怎么安装的?
-
@Gloin 我刚刚去了 ffmpeg 网站并使用了他们的安装程序。我把我的 ffmpeg 文件放到了 C 盘