Skip to content
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

Is it possible to use on Linux? #26

Closed
philss opened this issue Mar 21, 2019 · 10 comments
Closed

Is it possible to use on Linux? #26

philss opened this issue Mar 21, 2019 · 10 comments

Comments

@philss
Copy link

@philss philss commented Mar 21, 2019

Hi! Thank you for this project!

I want to stream programming sessions from my Ubuntu Linux 18.10, and I couldn't find instructions for how to build and install this plugin.
Is it possible to run on Linux?

PS: I already using on MacOS, but I wanna try on Linux.

@philss
Copy link
Author

@philss philss commented Apr 1, 2019

I tried and I couldn't make it work. Perhaps it's possible with some different compilation flags, but I gave up with OBS IOS Camera, and I could make work with other tools explained in this blog post: https://steemit.com/technology/@tech.ninja/tech-quickie-convert-your-ipad-iphone-into-a-good-wireless-webcam-in-linux

@philss philss closed this Apr 1, 2019
@dougg3
Copy link

@dougg3 dougg3 commented Aug 16, 2019

Hey @philss, I saw you made this issue a while ago. I was able to get this plugin to compile on Ubuntu 18.04 by adding a few #includes in various places where I was seeing errors. I also had a problem at final link time because all of the libraries needed to be compiled with -fPIC. It seems to work! I ran into a quirk where sometimes I have to change between the front-facing and rear-facing camera in order to get the streaming to start working, but for the most part it seems to work okay with OBS 23.2.1.

Here is the commit to my branch that makes it work. The commit message has some compilation instructions. dougg3@2b6ed18

After doing this, I manually created the directory structure for the plugin and put it in ~/.config/obs-studio/plugins:

obs-ios-camera-source/
obs-ios-camera-source/data
obs-ios-camera-source/data/locale
obs-ios-camera-source/data/locale/en-US.ini
obs-ios-camera-source/bin
obs-ios-camera-source/bin/64bit
obs-ios-camera-source/bin/64bit/obs-ios-camera-source.so

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

@wtsnz I'm not sure if these changes break the Mac OS X or Windows builds, or else I might be a little more confident about cleaning up the build process and trying to get it merged with your main project, if you're interested in supporting Linux at all. I also realize it could be a pain if you try to officially support Linux and a bunch of people run into problems...

@bkylerussell
Copy link

@bkylerussell bkylerussell commented Mar 28, 2020

Here is the commit to my branch that makes it work. The commit message has some compilation instructions. dougg3@2b6ed18

This worked great for me on Ubuntu 18.04. I had to also install libobs-dev so FindLibObs.cmake had the right pkg-config setup in place. I was also missing libavcodec-dev, but once those were installed the commit referenced above worked great. I'm not that familiar with OBS yet, but my plugin directory was /usr/lib/x86_64-linux-gnu/obs-plugins.

@jbberinger
Copy link

@jbberinger jbberinger commented Mar 30, 2020

@dougg3 @bkylerussell
Just tried to build on Ubuntu 19.10 from the commit instructions and got a bunch of CMake errors. Any ideas?

CMake Error at CMakeLists.txt:321 (target_compile_options):
  Cannot specify compile options for target "mbedcrypto" which is not built
  by this project.


CMake Error at CMakeLists.txt:322 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  obs-ios-camera-source-win


CMake Error at CMakeLists.txt:323 (target_link_libraries):
  Cannot specify link libraries for target "obs-ios-camera-source-win" which
  is not built by this project.


-- Configuring incomplete, errors occurred!
@dougg3
Copy link

@dougg3 dougg3 commented Mar 30, 2020

Hey @jbberinger, I don't think you checked out my branch -- make sure you do "git checkout linux-support" after cloning

@jbberinger
Copy link

@jbberinger jbberinger commented Mar 30, 2020

@dougg3 Thanks, that was the problem! I'm a little confused about the final step where you created the directories, and where you got the .ini and .so files?

@dougg3
Copy link

@dougg3 dougg3 commented Mar 30, 2020

You should be able to find those two files somewhere inside the build directory you created while following the build directions -- then all you need to do is arrange them in the directory structure indicated in my instructions and run OBS :-)

@philss
Copy link
Author

@philss philss commented Apr 3, 2020

Awesome, @dougg3! Thank you! ❤️
I will give a try someday.

@TSchattschneider
Copy link

@TSchattschneider TSchattschneider commented Apr 30, 2020

Here is the commit to my branch that makes it work. The commit message has some compilation instructions. dougg3@2b6ed18

This worked great for me on Ubuntu 18.04. I had to also install libobs-dev so FindLibObs.cmake had the right pkg-config setup in place. I was also missing libavcodec-dev, but once those were installed the commit referenced above worked great. I'm not that familiar with OBS yet, but my plugin directory was /usr/lib/x86_64-linux-gnu/obs-plugins.

While OBS, as packaged for ubuntu, will have its plugins in /usr/lib/x86_64-linux-gnu/obs-plugins, it will still read your custom plugins from ~/.config/obs-studio/plugins, so you can put the plugin there (in ~/.config/...) along with its locale en-US.ini-file, as @dougg3 stated. That way, it will be loaded by OBS and it will be properly labeled as "iOS Camera" instead of OBSIOSCamera.Title

@dougg3
Copy link

@dougg3 dougg3 commented Jul 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants