Giter Club home page Giter Club logo

Comments (18)

dougg3 avatar dougg3 commented on July 20, 2024 5

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.

dougg3 avatar dougg3 commented on July 20, 2024 3

I actually ported the code to work on Linux last year, but you'll have to build it yourself. See my comment here:

#26 (comment)

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.

harwoodr avatar harwoodr commented on July 20, 2024 1

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.

Shahzainali avatar Shahzainali commented on July 20, 2024 1

@dougg3 Thanks, man! It's working perfectly. I installed it in a couple of minutes on Ubuntu 22.

from obs-ios-camera-source.

harwoodr avatar harwoodr commented on July 20, 2024

Trying to get this working now - it keeps complaining about ffmpeg and cmake... we'll see.

from obs-ios-camera-source.

dougg3 avatar dougg3 commented on July 20, 2024

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.

 avatar commented on July 20, 2024

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.

hpetrus avatar hpetrus commented on July 20, 2024

@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.

hpetrus avatar hpetrus commented on July 20, 2024

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.

dougg3 avatar dougg3 commented on July 20, 2024

@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.

hpetrus avatar hpetrus commented on July 20, 2024

@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.

hpetrus avatar hpetrus commented on July 20, 2024

@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.

dougg3 avatar dougg3 commented on July 20, 2024

@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.

dithotxgh avatar dithotxgh commented on July 20, 2024

@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.

dithotxgh avatar dithotxgh commented on July 20, 2024

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.

hpetrus avatar hpetrus commented on July 20, 2024

@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.

dougg3 avatar dougg3 commented on July 20, 2024

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.

dginovker avatar dginovker commented on July 20, 2024

Is there any update on upstream Linux support?

from obs-ios-camera-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.