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

obs-gstreamer build for arm64 (m1 mac) #112

Open
noname77 opened this issue Sep 5, 2024 · 7 comments
Open

obs-gstreamer build for arm64 (m1 mac) #112

noname77 opened this issue Sep 5, 2024 · 7 comments

Comments

@noname77
Copy link

noname77 commented Sep 5, 2024

hey,

thanks for the great project!

after an evening of struggle I have finally managed to build your plugin for an M1 mac with gstreamer installed through homebrew

thought I'd share for anyone without a free evening to mess with this

its currently a manual mess which ill try to clean up for future reference, but this might also never happen so 🤷

brew install --cask obs
brew install gstreamer

extract and put obs-gstreamer.plugin under ~/Library/Application\ Support/obs-studio/plugins or /Applications/OBS.app/Contents/PlugIns

obs-gstreamer.plugin.zip

- macOS 14.0
- obs 30.2.3
- obs-gstreamer 0.4.1
- gstreamer 1.24.7 
- glib 2.80.4

enjoy

@danielamar101
Copy link

God bless you and your beautiful soul

@danielamar101
Copy link

You should open a PR so I can take a look at it.

@noname77
Copy link
Author

You should open a PR so I can take a look at it.

I would if I managed to automate this an any sensible way in docker
unfortunately, the set up involved many manual steps which I failed to document at the time

will try to get back to this when I return from holiday, but im pretty busy with day job and other side projects recently so not sure when this will happen realistically

I'll try to at least do a write up on the manual steps to contribute anything back

thanks again for the great work!

@noname77
Copy link
Author

I went ahead and tried to get this off my head straight away.
probably won't be able to clean this up any time soon, so leaving it like this for anyone interested

disclaimer: its my first contact with gstreamer and meson, hacked together by trial and error to just get it working. im sure theres a cleaner way of achieving the same

the included libraries are hard copied from homebrew install

brew install gstreamer
brew list gstreamer
(...)
/opt/homebrew/Cellar/gstreamer/1.24.7
brew list glib
(...)
/opt/homebrew/Cellar/glib/2.80.4

I copied them to homebrew-libs (and included in my fork's feat/homebrew-gstreamer branch, ouch! 😓)

mkdir -p ./homebrew-libs
cp -r /opt/homebrew/Cellar/gstreamer/1.24.7 ./homebrew-libs/gstreamer-1.24.7
cp -r /opt/homebrew/Cellar/glib/2.80.4 ./homebrew-libs/glib-2.80.4

if you have different versions you currently need to update both the Dockerfile and meson.build

steps:
clone my fork

git clone https://github.com/noname77/obs-gstreamer.git
cd obs-gstreamer

checkout the feat/homebrew-gstreamer branch

git checkout feat/homebrew-gstreamer

build image

docker build . -t obs-gstreamer-homebrew

create a temporary container and copy .so

docker cp $(docker create --name tc obs-gstreamer-homebrew):/macos-aarch64/obs-gstreamer.so ./obs-gstreamer.so && docker rm tc

copy the .so to obs-gstreamer.plugin from regular build under Contents/MacOS/obs-gstreamer

copy obs-gstreamer.plugin to /Applications/OBS.app/Contents/PlugIns

@fzwoch
Copy link
Owner

fzwoch commented Sep 27, 2024

If you have a native macOS arm machine is should be fairly easy when it comes to GStreamer. If installed via brew it should be found by meson just fine. You may need to have to point it to libobs.. unless brew by now has a proper obs-studio formula..

@JesseFPV
Copy link

Thank you! I was struggling for an hour to get it working on my M1 macbook until I read this issue post. Got it working within a few minutes.

@danielamar101
Copy link

Could there be potential issues with this setup? I am noticing alot of jitter while using an rtmp source that has no jitter when using gstreamer throught the CLI or ffplay for that matter.

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

No branches or pull requests

4 participants