-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
successful build on M1 Mac with homebrew deps #16
Conversation
Hi, excellent thank you. Will keep this open for now and link from the FAQs. |
Could you tell me what command you ran? I want to build this for M1 too (to go with M1 OBS) |
Literally just |
I'm getting this error: Full LogLast login: Wed Dec 1 12:57:37 on ttys001 benmitchell@Scylla ~ % cd /Users/benmitchell/Files/obs/droidcam-obs-plugin benmitchell@Scylla droidcam-obs-plugin % make g++ -std=c++11 -x c++ -Wall -fPIC -dead_strip -Isrc/ -I/opt/homebrew/opt/qt5/include -I/opt/homebrew/opt/qt5/include/QtCore -I/opt/homebrew/opt/qt5/include/QtWidgets -I/opt/homebrew/opt/libjpeg-turbo/include -I../ffmpeg -I../obs-studio/UI -I../obs-studio/libobs -L/Applications/OBSM1.app/Contents/Resources/bin -L/opt/homebrew/opt/libjpeg-turbo/lib -lobs-frontend-api -lobs.0 -lavcodec.58 -lavformat.58 -lavutil.56 -lturbojpeg -bundle src/command.c src/ffmpeg_decode.c src/mjpeg_decode.c src/net.c src/plugin.c src/sys/unix/cmd.c -o build/droidcam-obs.so In file included from src/ffmpeg_decode.c:20: src/ffmpeg_decode.h:34:10: fatal error: 'libavcodec/avcodec.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. In file included from src/plugin.c:23: src/ffmpeg_decode.h:34:10: fatal error: 'libavcodec/avcodec.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [build/droidcam-obs.so] Error 1 benmitchell@Scylla droidcam-obs-plugin % brew install gnutls Warning: gnutls 3.6.16_1 is already installed and up-to-date. To reinstall 3.6.16_1, run: brew reinstall gnutls benmitchell@Scylla droidcam-obs-plugin % clear benmitchell@Scylla droidcam-obs-plugin % make |
I downloaded the FFmpeg project and put it in the parent directory. The error has changed a bit but I still get Full Logbenmitchell@Scylla droidcam-obs-plugin % make g++ -std=c++11 -x c++ -Wall -fPIC -dead_strip -Isrc/ -I/opt/homebrew/opt/qt5/include -I/opt/homebrew/opt/qt5/include/QtCore -I/opt/homebrew/opt/qt5/include/QtWidgets -I/opt/homebrew/opt/libjpeg-turbo/include -I../ffmpeg -I../obs-studio/UI -I../obs-studio/libobs -L/Applications/OBSM1.app/Contents/Resources/bin -L/opt/homebrew/opt/libjpeg-turbo/lib -lobs-frontend-api -lobs.0 -lavcodec.58 -lavformat.58 -lavutil.56 -lturbojpeg -bundle src/command.c src/ffmpeg_decode.c src/mjpeg_decode.c src/net.c src/plugin.c src/sys/unix/cmd.c -o build/droidcam-obs.so In file included from src/ffmpeg_decode.c:20: In file included from src/ffmpeg_decode.h:34: In file included from ../ffmpeg/libavcodec/avcodec.h:30: In file included from ../ffmpeg/libavutil/samplefmt.h:24: In file included from ../ffmpeg/libavutil/avutil.h:296: In file included from ../ffmpeg/libavutil/common.h:43: ../ffmpeg/libavutil/macros.h:28:10: fatal error: 'libavutil/avconfig.h' file not found #include "libavutil/avconfig.h" ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. In file included from src/plugin.c:23: In file included from src/ffmpeg_decode.h:34: In file included from ../ffmpeg/libavcodec/avcodec.h:30: In file included from ../ffmpeg/libavutil/samplefmt.h:24: In file included from ../ffmpeg/libavutil/avutil.h:296: In file included from ../ffmpeg/libavutil/common.h:43: ../ffmpeg/libavutil/macros.h:28:10: fatal error: 'libavutil/avconfig.h' file not found #include "libavutil/avconfig.h" ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [build/droidcam-obs.so] Error 1 benmitchell@Scylla droidcam-obs-plugin % |
@gdhgdhgdh could you share your already compiled version with me please? I'm not sure what I am missing to compile it myself. Thanks : ) |
nvm I am stupid. For some reason when I cloned the project, I forgot to checkout this branch. Anyways, you need to make a build folder and then running make will work. Also make sure that the OBS.app you reference is compiled for ARM, personally I have two. A normal x86 OBS.app and a ARM OBSM1.app. |
Can confirm that replacing the Hardware acceleration also works now too, before it would black screen. The only issue I have encountered is that the iOS app says "Update OBS plugin" leading me to believe that this repo is not up to date? |
You're right, seems there was missing a |
Thanks :) I have compiled this updated version for M1 and have attached it to this reply for anyone who wants it. build.zip |
Is there an ETA for when an official version will be released? My hardware acceleration has stopped working. Not sure why.
|
Mostly waiting for OBS Studio to be released officially with M1 support. |
Hi folks, I got this problem when I tried to g++ -std=c++11 -x c++ -Wall -fPIC -dead_strip -Isrc/ -I/usr/local/opt/qt5/include -I/usr/local/opt/qt5/include/QtCore -I/usr/local/opt/qt5/include/QtWidgets -I/usr/local/opt/libjpeg-turbo/include -I../ffmpeg -I../obs-studio-24.0.2/UI -I../obs-studio-24.0.2/libobs -L/Applications/OBS.app/Contents/Resources/bin -L/usr/local/opt/libjpeg-turbo/lib -lobs-frontend-api -lobs.0 -lavcodec.58 -lavformat.58 -lavutil.56 -lturbojpeg -bundle src/command.c src/ffmpeg_decode.c src/mjpeg_decode.c src/net.c src/plugin.c src/sys/unix/cmd.c -o build/droidcam-obs.so
In file included from src/command.c:26:
In file included from src/command.h:5:
src/plugin.h:5:10: fatal error: 'obs-module.h' file not found
#include <obs-module.h>
^~~~~~~~~~~~~~
1 error generated.
In file included from src/ffmpeg_decode.c:19:
src/plugin.h:5:10: fatal error: 'obs-module.h' file not found
#include <obs-module.h>
^~~~~~~~~~~~~~
1 error generated.
In file included from src/mjpeg_decode.c:17:
src/plugin.h:5:10: fatal error: 'obs-module.h' file not found
#include <obs-module.h>
^~~~~~~~~~~~~~
1 error generated.
In file included from src/net.c:20:
src/plugin.h:5:10: fatal error: 'obs-module.h' file not found
#include <obs-module.h>
^~~~~~~~~~~~~~
1 error generated.
src/plugin.c:18:10: fatal error: 'util/threading.h' file not found
#include <util/threading.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
In file included from src/sys/unix/cmd.c:21:
In file included from src/command.h:5:
src/plugin.h:5:10: fatal error: 'obs-module.h' file not found
#include <obs-module.h>
^~~~~~~~~~~~~~
1 error generated.
make: *** [build/droidcam-obs.so] Error 1```
Thanks in advance! |
All, the following package contains a universal build of the droidcam plugin, with both Intel and M1 support. Requires OBS Studio 27.1.3 or lower. OBS v27.2 introduced a breaking change that should be resolved with their next update, making this universal package work again. If I could get extra confirmation everything works on M1 Macs (including hardware acceleration), we can make this available to all users. https://files.dev47apps.net/obs/DroidCamOBS_Universal_1.2.3.pkg After installation,
|
tried it on M1 27.1.3 , no luck Replaced the .so with the build from dec 2nd and no luck either |
I gave this a try on my M1 Mac Mini and it worked beautifully. The file command reports both x86 and ARM architectures, and the plugin works with OBS 27.1.3. I'm able to use both WIFI and USB, both with and without hardware acceleration. Thanks so much for making this available. I've been looking for a solution to connect my Android camera to the M1 Mac (via USB) for weeks and this finally did the trick! |
The universal download has been live on the website for some time now with no reported issues. |
Hello - thanks for the recent pointers by email. The compile + run worked fine and I'm offering the changes I made to enable a successful compile
deps were installed with
brew install jpeg-turbo
andbrew install ffmpeg