如何在 iOS 的 OpenCV 中添加 FFmpeg?

在 Win10 的環境中用 OpenCV 設計了一個小應用讀取樹莓派上的 Mjpeg-Streamer 的畫面並能正常顯示,移植到 iOS 出現

OpenCV: Couldn't read video stream from file "http://10.3.141.1:8080/?action=stream%22
[ERROR:0] global /Volumes/build-storage/build/master_iOS-mac/opencv/modules/videoio/src/cap.cpp (166) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.4) /Volumes/build-storage/build/master_iOS-mac/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): http://10.3.141.1:8080/?action=stream in function 'icvExtractPattern'

同樣的訊息在 Win10 上缺乏 FFmpeg DLL 時也出現過,我重新編譯出 OpenCV 與 FFmpeg 的函數庫但不知道怎麼在 iOS 上把他們加在一起,各自編譯成 Framework 加入專案並不會互相引用,OpenCV 在 iOS 上用 Python 負責編譯的,並不是 cmake 不知道怎麼下手,有哪位有經驗務必分享一下

看看这个:https://github.com/tanersener/react-native-ffmpeg/issues/35

https://www.jianshu.com/p/c236287e71ec

https://blog.csdn.net/nil_lu/article/details/50284099