Comments (18)
Just a heads up for future people who are trying to build the Linux version, I rearranged things a bit to help streamline the Linux build process and put all the relevant documentation in a single place. My fork's master branch now has the Linux fixes, along with an updated README.md with build/install instructions:
https://github.com/dougg3/obs-ios-camera-source
from obs-ios-camera-source.
I actually ported the code to work on Linux last year, but you'll have to build it yourself. See my comment here:
EDIT 7/12/2020: I tried to put all the relevant information into a single location and help with branch confusion. My fork's master branch now contains the linux support changes, along with compilation/installation instructions in the README: https://github.com/dougg3/obs-ios-camera-source
from obs-ios-camera-source.
Nope... got them... there's no cmake file for ffmpeg... I changed a couple of things:
#find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil)
find_ffmpeg_library(avcodec)
find_ffmpeg_library(avutil)
find_library( AVCODEC_LIBRARY avcodec )
find_library( AVUTIL_LIBRARY avutil )
include_directories(
"${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api"
${AVCODEC_INCLUDE_DIRS}
${AVUTIL_INCLUDE_DIRS}
)
...and it seems to compile (just finished...)
from obs-ios-camera-source.
@dougg3 Thanks, man! It's working perfectly. I installed it in a couple of minutes on Ubuntu 22.
from obs-ios-camera-source.
Trying to get this working now - it keeps complaining about ffmpeg and cmake... we'll see.
from obs-ios-camera-source.
You may be missing various *-dev packages if you're using Ubuntu -- for example a commenter on the issue I linked said he needed to install libobs-dev and libavcodec-dev.
from obs-ios-camera-source.
I'm currently on Windows and will be switching soon. I hope we could get official support, that would be awesome.
from obs-ios-camera-source.
@harwoodr (or anybody else who knows) I'm trying to compile for Arch Linux. I've got the built libs and includes for ffmpeg in a local folder, but I don't know how to incorporate the changes to CMakeLists.txt that you made (I'm assuming that's where you made the changes), so I still get the cmake errors, as your originally reported.
If I may ask, where in the CMakeLists.txt did you make the change and how [else] do I point to the ffmpeg includes?
UPDATE:
Never mind. I made the changes through trial and error. For others who wish to get over this hurdle:
#find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil)
#find_ffmpeg_library(avcodec)
#find_ffmpeg_library(avutil)
find_library(AVCODEC_LIBRARY avcodec)
find_library(AVUTIL_LIBRARY avutil)
and then, further down the CMakeLists.txt:
#find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil)
find_library(AVCODEC_LIBRARY avcodec)
find_library(AVUTIL_LIBRARY avutil)
# include_directories(
# "${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api"
# ${FFMPEG_INCLUDE_DIRS}
# )
include_directories(
"${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api"
"/absolute/path/of/ffmpeg-git/pkg/ffmpeg-git/usr/include/avcodec"
"/absolute/path/of/ffmpeg-git/pkg/ffmpeg-git/usr/include/avutil"
)
from obs-ios-camera-source.
Now, I get a build error, as follows:
[ 73%] Building CXX object CMakeFiles/portal.dir/deps/portal/src/Channel.cpp.o
In file included from /path/to/obs-ios-camera-source-master/deps/portal/src/Channel.hpp:22,
from /path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:19:
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp: In destructor ‘virtual portal::Channel::~Channel()’:
/path/to/obs-ios-camera-source-master/deps/portal/src/logging.h:28:48: error: ‘stderr’ was not declared in this scope
28 | do { if (PORTAL_DEBUG_LOG_ENABLED) fprintf(stderr, "%s:%d:%s(): " format, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
| ^~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:38:9: note: in expansion of macro ‘portal_log’
38 | portal_log("%s: Deallocating\n", __func__);
| ^~~~~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:20:1: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
19 | #include "Channel.hpp"
+++ |+#include <cstdio>
20 |
In file included from /path/to/obs-ios-camera-source-master/deps/portal/src/Channel.hpp:22,
from /path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:19:
/path/to/obs-ios-camera-source-master/deps/portal/src/logging.h:28:40: error: ‘fprintf’ was not declared in this scope; did you mean ‘wprintf’?
28 | do { if (PORTAL_DEBUG_LOG_ENABLED) fprintf(stderr, "%s:%d:%s(): " format, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
| ^~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:38:9: note: in expansion of macro ‘portal_log’
38 | portal_log("%s: Deallocating\n", __func__);
| ^~~~~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp: In member function ‘void portal::Channel::InternalThreadEntry()’:
/path/to/obs-ios-camera-source-master/deps/portal/src/logging.h:28:48: error: ‘stderr’ was not declared in this scope
28 | do { if (PORTAL_DEBUG_LOG_ENABLED) fprintf(stderr, "%s:%d:%s(): " format, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
| ^~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:92:17: note: in expansion of macro ‘portal_log’
92 | portal_log("There was an error receiving data");
| ^~~~~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/logging.h:28:48: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
28 | do { if (PORTAL_DEBUG_LOG_ENABLED) fprintf(stderr, "%s:%d:%s(): " format, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
| ^~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:92:17: note: in expansion of macro ‘portal_log’
92 | portal_log("There was an error receiving data");
| ^~~~~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/logging.h:28:40: error: ‘fprintf’ was not declared in this scope; did you mean ‘wprintf’?
28 | do { if (PORTAL_DEBUG_LOG_ENABLED) fprintf(stderr, "%s:%d:%s(): " format, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
| ^~~~~~~
/path/to/obs-ios-camera-source-master/deps/portal/src/Channel.cpp:92:17: note: in expansion of macro ‘portal_log’
92 | portal_log("There was an error receiving data");
| ^~~~~~~~~~
make[2]: *** [CMakeFiles/portal.dir/build.make:83: CMakeFiles/portal.dir/deps/portal/src/Channel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/portal.dir/all] Error 2
make: *** [Makefile:104: all] Error 2
I'm using the latest obs-ios-camera-source-master
. Again, I'm building on Arch Linux version current in all departments. Any help would be appreciated.
from obs-ios-camera-source.
@hpetrus you have to use my linux-support branch from last year -- it fixes several compile issues on Linux. I haven't checked out this project for a while...looks like there are some new commits I need to bring in soon. Anyway, this branch should build:
https://github.com/dougg3/obs-ios-camera-source/tree/linux-support
from obs-ios-camera-source.
@dougg3 thanks for getting back to me on this issue. I'm super grateful that you've got this branch going in the first place. I'll compile your latest commit, but also look forward to whatever rebase you might bring from the original master. I'll be following closely!
Question: Will this version compile against the latest OBS Studio source, do you know? If not, what version of OBS source should I acquire and will the resulting build work on the latest OBS Studio build?
from obs-ios-camera-source.
@dougg3 unfortunately, I'm still getting the same make error with your last commit (see my previous post above with the error messages). What might this be because of?
When I regenerate my CMakeCache.txt, I get the following warning:
Configuring done
CMake Warning (dev) in CMakeLists.txt:
AUTOGEN: No valid Qt version found for target obs-ios-camera-source.
AUTOMOC and AUTOUIC disabled. Consider adding:
find_package(Qt<QTVERSION> COMPONENTS Widgets)
to your CMakeLists.txt file.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
AUTOGEN: No valid Qt version found for target portal. AUTOMOC and AUTOUIC
disabled. Consider adding:
find_package(Qt<QTVERSION> COMPONENTS Widgets)
to your CMakeLists.txt file.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
AUTOGEN: No valid Qt version found for target libusbmuxd. AUTOMOC and
AUTOUIC disabled. Consider adding:
find_package(Qt<QTVERSION> COMPONENTS Widgets)
to your CMakeLists.txt file.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
AUTOGEN: No valid Qt version found for target libplist. AUTOMOC and
AUTOUIC disabled. Consider adding:
find_package(Qt<QTVERSION> COMPONENTS Widgets)
to your CMakeLists.txt file.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
AUTOGEN: No valid Qt version found for target libcnary. AUTOMOC and
AUTOUIC disabled. Consider adding:
find_package(Qt<QTVERSION> COMPONENTS Widgets)
to your CMakeLists.txt file.
This warning is for project developers. Use -Wno-dev to suppress it.
Generating done
from obs-ios-camera-source.
@hpetrus As of the last time I tried it, the current OBS Studio source worked fine.
On the compile error: I'm not sure, I've never seen those issues before. I wonder if Arch has some newer GCC or libstdc++ that adds additional checks. I know it works in Ubuntu 18.04. You could try adding #include <cstdio>
in deps/portal/src/logging.h since that seems to be what the error is about.
I'm also not sure about the CMakeLists.txt warnings. Maybe make sure you're starting again from a clean build directory after you switched to my branch? It's weird because I don't see any Qt dependencies.
from obs-ios-camera-source.
@dougg3 Building with your patches and instructions works for me.
Thank you so much for enabling an ubuntu 20.04 linux build of what looks like a truly awesome plugin/app by @wtsnz.
As the whole apple ecosystem, as well as ubuntu are new to me, will give this and the iphone a setup and test in the morning, so I can have a whole day to enjoy what needs to be done to get it up and running.
from obs-ios-camera-source.
replying to self: #31 (comment), which was a reply to
#31 (comment)
Wow. As the ozzies would say, a thing of beauty, a joy forever.
from obs-ios-camera-source.
@dougg3 thanks for updating!
I got it to compile on Arch with some modifications to your CMakeLists.txt and some Arch-specific deps handling. I think it would be best to share my solution, which you helped me find. Should I post it under a new thread, or post it all here?
from obs-ios-camera-source.
I'm glad it's working for you guys! @hpetrus I would recommend posting an issue about it over at my repository. Maybe we can figure out a way to make it compatible with both Ubuntu and Arch.
from obs-ios-camera-source.
Is there any update on upstream Linux support?
from obs-ios-camera-source.
Related Issues (20)
- Remote control server not restarting when switching app state HOT 1
- Lost connection HOT 2
- Artifacts Issue
- 2.9.1 doesnt work on Windows HOT 22
- v2.9.1 says Apple Silicon compatible but doesn't work HOT 2
- OBS 28 Compatibility HOT 7
- Constant sutter HOT 4
- IOS Camera is gone OBS 28 HOT 5
- Location of the plugin on MAC HOT 5
- iPhone Pro 14 Pro (max) camera problems on iOS 16.0.1 HOT 1
- Obs - Camera Source NOT WORKING with OBS 29.0.0 HOT 1
- iOS Camera Plugin gone with OBS 29 on Mac HOT 6
- Can't install OBS iOS camera plugin for Mac for OBS v29 HOT 2
- No "iOS Camera" source appears after installation on Mac (OBS 29.0.0) and Camera Source plugin 2.9.4 HOT 16
- OBS 29.1 RC-1 Support? HOT 2
- Windows security deem this plugin not safe to install HOT 1
- No IOS Camera Source for Studio 29.1.3 and plugin 2.9.6 on Mac HOT 1
- OBS Studio 30.0 HOT 2
- I was about to purchase, and I noticed it's not configured for OBS 30? HOT 1
- obs camera image unusable when transmitted via NDI in 4k on iphone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obs-ios-camera-source.