DefTruth / RVM-Inference

🔥Robust Video Matting C++ inference toolkit with ONNXRuntime、MNN、NCNN and TNN, via lite.ai.toolkit.
GNU General Public License v3.0
116 stars 27 forks source link

Macos下编译失败 #28

Closed Richardlyq closed 2 years ago

Richardlyq commented 2 years ago

作者大佬您好,我在windows下和Linux下调了好久但是还是不能运行。我又在Macos下按照您写的做了,但是还是有问题。请问问题出在哪里呢?(小白,望各位大佬们稍微照顾一下,呜呜~)

7ed15d866d36049102104888c2cc2fa
DefTruth commented 2 years ago

emmmm....为啥你的opencv_videoio链接到了一个系统路径的ffmpeg? 试一下用otool -L查看一下。Linux下应该也是正常的,我已经把ffmpeg一起打包了。lite.ai.toolkit 有Linux和MacOS的预编译库。

 lib git:(main) ✗ otool -L libopencv_videoio.4.5.dylib   
libopencv_videoio.4.5.dylib:
        @rpath/libopencv_videoio.4.5.dylib (compatibility version 4.5.0, current version 4.5.2)
        @rpath/libopencv_imgcodecs.4.5.dylib (compatibility version 4.5.0, current version 4.5.2)
        @rpath/libopencv_imgproc.4.5.dylib (compatibility version 4.5.0, current version 4.5.2)
        @rpath/libopencv_core.4.5.dylib (compatibility version 4.5.0, current version 4.5.2)
        ./libavformat.58.dylib (compatibility version 58.0.0, current version 58.29.100)
        ./libavdevice.58.dylib (compatibility version 58.0.0, current version 58.8.100)
        ./libavcodec.58.dylib (compatibility version 58.0.0, current version 58.54.100)
        ./libavutil.56.dylib (compatibility version 56.0.0, current version 56.31.100)
        ./libswscale.5.dylib (compatibility version 5.0.0, current version 5.5.100)
        ./libswresample.3.dylib (compatibility version 3.0.0, current version 3.5.100)
        ./libavfilter.7.dylib (compatibility version 7.0.0, current version 7.57.100)

我这边链接的都是相对路径,只要把opencv的库和ffmpeg的库放在一块就可以。

DefTruth commented 2 years ago

已经修复这个问题,打包了ffmpeg后,需要把所有的依赖库放在可执行文件相同的目录下。