BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
807 stars 71 forks source link

windows平台编译后,python使用提示缺失c_ffmpeg_decoder模块 #131

Closed x850044053wwt closed 1 month ago

x850044053wwt commented 1 month ago

大佬们好

按照文档指引,我在windows平台上完成了编译。然后按照colab上的example 尝试执行https://colab.research.google.com/github/BabitMF/bmf/blob/master/bmf/demo/edit/bmf_edit_python.ipynb#scrollTo=vM3JZjmXHO-k

# encode ( bmf.encode(concat_streams[0], concat_streams[1], { "output_path": output_path, "video_params": { "width": 1280, "height": 720, 'codec': 'h264' } }).run() )

时我的python提示我

RuntimeError: ModuleNotFoundError: No module named 'c_ffmpeg_decoder'

请问下是哪里出了问题

JackLau1222 commented 1 month ago

Have you downloaded the bmf package in Python?plz make sure the package you compiled is in the Python environment

x850044053wwt commented 1 month ago

由于网络原因,我无法在我的windows电脑上的python安装bmf。因此我是基于源码编译,然后在python中使用的。bmf包已经在我的python环境中,但是缺少了c_ffmpeg模块

JackLau1222 commented 1 month ago

you can copy these complied files into your python environment. If you use conda, the path is ~/.conda/envs//lib, and make sure the FFMPEG is enabled so that the c_ffmpeg_decoder can be built

JackLau1222 commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

x850044053wwt commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

JackLau1222 commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

yes, the c_ffmpeg_decoder module is built into bmf_builtin_module.dll, plz check log when you execute build.sh and make sure the BMF Summary contains FFMPEG_ENABLED : ON

x850044053wwt commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

yes, the c_ffmpeg_decoder module is built into bmf_builtin_module.dll, plz check log when you execute build.sh and make sure the BMF Summary contains FFMPEG_ENABLED : ON

是的,编译时summary是ON Snipaste_2024-10-08_10-19-44

JackLau1222 commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

yes, the c_ffmpeg_decoder module is built into bmf_builtin_module.dll, plz check log when you execute build.sh and make sure the BMF Summary contains FFMPEG_ENABLED : ON

是的,编译时summary是ON Snipaste_2024-10-08_10-19-44

OK, it seems that this is not the problem here. Please check whether libbuiltin_modules.so is built in the log.

image
x850044053wwt commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

yes, the c_ffmpeg_decoder module is built into bmf_builtin_module.dll, plz check log when you execute build.sh and make sure the BMF Summary contains FFMPEG_ENABLED : ON

是的,编译时summary是ON Snipaste_2024-10-08_10-19-44

OK, it seems that this is not the problem here. Please check whether libbuiltin_modules.so is built in the log. image

我刚检查了编译过程,这个模块编译失败了,原因是用到了AVStream的codec成员,但是在我的ffmpeg5.1.2版本中,这个成员已经废弃了。这是否是一个bug

JackLau1222 commented 1 month ago

bmf_builtin_module.so(c_ffmpeg_decoder and other modules) is compiled and output in /output/bmf/lib, please check it

我是windows平台编译,应该是bmf_builtin_module.dll这个lib吗,我没有找到 Snipaste_2024-10-08_10-13-07

yes, the c_ffmpeg_decoder module is built into bmf_builtin_module.dll, plz check log when you execute build.sh and make sure the BMF Summary contains FFMPEG_ENABLED : ON

是的,编译时summary是ON Snipaste_2024-10-08_10-19-44

OK, it seems that this is not the problem here. Please check whether libbuiltin_modules.so is built in the log. image

我刚检查了编译过程,这个模块编译失败了,原因是用到了AVStream的codec成员,但是在我的ffmpeg5.1.2版本中,这个成员已经废弃了。这是否是一个bug

Good job! This seems to be a compatibility issue. We will fix this issue later. If you are interested, you are also welcome to submit a PR after the fix.