当前位置:网站首页>解决python调用 ffmpeg时 ‘ffmpeg‘ 不是内部或外部命令,也不是可运行的程序
解决python调用 ffmpeg时 ‘ffmpeg‘ 不是内部或外部命令,也不是可运行的程序
2020-11-09 08:25:00 【osc_ucqb2u3q】
解决 python 调用 ffmpeg时 ‘ffmpeg’ 不是内部或外部命令,也不是可运行的程序
在windows系统下, 我们使用windows下,使用ffmpeg库调用FFmpeg工具来提取视频的图片/读取视频信息
import ffmpeg
我们可能会遇到以下问题
'ffmpeg' 不是内部或外部命令,也不是可运行的程序
这原因是什么呢?
python 的ffmpeg 是使用subprocess.Popen()函数来调用命令行,然后得到返回的数据。就相当于python 在你系统的cmd里面输入 ffmpeg xxx xxx xxx xxx
然后系统给你报错 ‘ffmpeg’ 不是内部或外部命令,也不是可运行的程序
那么有两种原因:
- 没安装 ffmpeg
那么请参考安装 ffmpeg - 没加入环境变量
请参考:https://blog.csdn.net/tang_chuanlin/article/details/103749351
但是最快的方法就是, 当你下载好 ffmpeg
然后解压, 记下bin的路径
E://anaconda//ffmpeg-4.3.1//bin//

然后修改ffmpeg的那块代码
- 《你的python包路径 》/site-packages/ffmpeg/_probe.py
直接加上ffmpeg的路径即可

- 《你的python包路径 》/site-packages/ffmpeg/_run.py
直接加上ffmpeg的路径即可

版权声明
本文为[osc_ucqb2u3q]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4327623/blog/4708535
边栏推荐
猜你喜欢

How does FC game console work?

1.操作系统是干什么的?

ubuntu 上使用微信的新方案——手机投屏

WordPress Import 上传的文件尺寸超过php.ini中定义的upload_max_filesize值-->解决方法。

Android emulator error: x86 emulation currently requires hardware acceleration的解决方案

Detailed analysis of OpenGL es framework (8) -- OpenGL es Design Guide

Investigation of solutions to rabbitmq cleft brain problem

Talk about my understanding of FAAS with Alibaba cloud FC

How to get started with rabbitmq

Platform in architecture
随机推荐
Several common playing methods of sub database and sub table and how to solve the problem of cross database query
Several rolling captions based on LabVIEW
常见特征金字塔网络FPN及变体
为什么我们不使用GraphQL? - Wundergraph
B. protocal has 7000eth assets in one week!
Have you ever thought about why the transaction and refund have to be split into different tables
上线1周,B.Protocal已有7000ETH资产!
A few lines of code can easily transfer traceid across systems, so you don't have to worry about losing the log!
Save code
2. Introduction to computer hardware
After Android solves the setrequested orientation, the rotation of the mobile phone screen does not trigger the onconfigurationchanged method
RabbitMQ脑裂问题解决方案调查
使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
Investigation of solutions to rabbitmq cleft brain problem
Dark网站的后端为什么选择F#? - darklang
How does semaphore, a thread synchronization tool that uses an up counter, look like?
Why choose f for the back end of dark website? - darklang
AQS 都看完了,Condition 原理可不能少!
梁老师小课堂|谈谈模板方法模式
Installation record of SAP s / 4hana 2020