Python3.6.2调用ffmpeg的方法
2019-01-18 00:02
721 查看
本文是为了学习python调用C语言的库写的例子。
去ffmpeg官网下载编译好的avcodec-57.dll、avutil-55.dll、swresample-2.dll,准备好了C语言写出的库。
下面是用Python调用的例子。
import os import ctypes dllHandler = ctypes.cdll.LoadLibrary(os.getcwd() + '\\avcodec-57.dll') ret = dllHandler.avcodec_configuration() data = ctypes.string_at(ret, -1).decode("utf-8") print(data)
我们可以看到打印出来了ffmpeg的配置参数,说明已经调用成功。
以上这篇Python3.6.2调用ffmpeg的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
您可能感兴趣的文章:
相关文章推荐
- Python3.6.2调用ffmpeg
- python调用c语言函数的一种简单实现方法
- C++ 调用Python3 脚本中无法引入内建模块的问题 解决方法
- python下面通过ctypes模块调用c++库的方法
- python for line in sys.stdin解析文件调用方法
- Python简单调用MySQL存储过程并获得返回值的方法
- python调用dll的方法
- 在java中调用python方法
- python 简单照相机调用系统摄像头实现方法 pygame
- Python使用suds调用webservice报错解决方法:AttributeError: 'Document' object has no attribute 'set'
- Python对象方法两种调用方式
- Selenium_python 方法调用
- Linux系统下Python调用系统Shell的方法
- java调用python方法总结
- python3.2 调用NLPIR(ICTLAS)2014的方法
- Nodejs中调用系统命令、Shell脚本和Python脚本的方法和实例
- 根据字符串名称动态调用Python的函数和对象方法
- 关于Python的PIL工具的Image对象调用show()方法问题。
- python中的__new__方法与__init__方法区别与调用;通过使用__new__实现单例模式
- Python自动调用IE打开某个网站的方法