后浪云Python教程:python如何调用ffmpeg
去ffmpeg官网下载编译好的avcodec-57.dll、avutil-55.dll、swresample-2.dll,准备好了C语言写出的库。
相关推荐:《Python教程》
下面是用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的配置参数,说明已经调用成功。
版权声明:
作者:后浪云
链接:https://www.idc.net/help/169278/
文章版权归作者所有,未经允许请勿转载。
THE END