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

Does demo work on recent macOS? #580

Closed
mironiasty opened this issue May 29, 2024 · 4 comments · Fixed by #585
Closed

Does demo work on recent macOS? #580

mironiasty opened this issue May 29, 2024 · 4 comments · Fixed by #585
Assignees

Comments

@mironiasty
Copy link
Member

mironiasty commented May 29, 2024

I've been trying to run demo app on my local macbook, but I've spotted few issues. I can try to work on them, but I would like to confirm first, that demos can work correctly on recent MacOS.

Installing Gstreamer

README says I need to have Gstreamer. But I can't find any instruction on how to install it on recent MacOS. Official instruction only says how to do it on MacOS 10 (current version is 14). I suspect instruction might still work, but it would be nice to add some link in demo's README for recent MacOS (or at least clarify that official instruction still works)

Error when running demo

I've tried to run demos without gstreamer anyway (with ffmpeg installed). And got this error:

Spawning: /Users/mironiasty/membrane/live_compositor/demos/.video_compositor/video_compositor/video_compositor 
dyld[32689]: Library not loaded: /opt/homebrew/opt/ffmpeg/lib/libavutil.59.dylib
  Referenced from: <AE26A68C-34EE-3B40-8F87-5E774198C1BB> /Users/mironiasty/membrane/live_compositor/demos/.video_compositor/video_compositor/video_compositor
  Reason: tried: '/opt/homebrew/opt/ffmpeg/lib/libavutil.59.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/ffmpeg/lib/libavutil.59.dylib' (no such file), '/opt/homebrew/opt/ffmpeg/lib/libavutil.59.dylib' (no such file)
Command "/Users/mironiasty/membrane/live_compositor/demos/.video_compositor/video_compositor/video_compositor " failed with exit code null.
/Users/mironiasty/membrane/live_compositor/demos/utils/utils.ts:46
        reject(new Error(errorMessage));

I looks like there is some issue with ffstream.

(side note) Veryfing dependecies

Would it be possible to have some simple script that verify that user has all dependencies, before running demo?

@wkozyra95
Copy link
Member

wkozyra95 commented May 29, 2024

Hi, thanks for the feedback

  • Gstremer can be installed with homebrew
brew install gstreamer gst-plugins-good gst-plugins-base gst-plugins-ugly gst-plugins-bad
  • FFmpeg is most likely in the wrong version. The compositor binary is built against a specific version, and it can't find libavutil in the specific version.

I agree the script would be useful, but it's not trivial to do, but we definitely can improve the demos README.
cc @WojciechBarczynski can update that info?

As for the regular compositor requirements, it's better described here https://compositor.live/docs/deployment/requirements and it's a bit nuanced.

@WojciechBarczynski WojciechBarczynski self-assigned this Jun 3, 2024
@WojciechBarczynski
Copy link
Member

WojciechBarczynski commented Jun 3, 2024

Hi @mironiasty
Thanks for the feedback.

You have FFmpeg 6 and the compositor binary was built with FFmpeg 7 for macos, which caused the above linking errors.

In the case of GStreamer, you need to download and install both packages from the GStreamer website - https://gstreamer.freedesktop.org/download/#macos (brew won't work) and add GStreamer commands to PATH.
MacOS might display some warnings since installers are downloaded from the internet, but the GStreamer website seems legit.
Probably this will work (check if this path is not empty after installation):

export PATH="$PATH:/Library/Frameworks/GStreamer.framework/Commands"

In the next PR, I'll update demos readme with more detailed, step-by-step instructions.

Update:
You don't need to download GStreamer development installer. Runtime installer should work.

@WojciechBarczynski WojciechBarczynski linked a pull request Jun 3, 2024 that will close this issue
@WojciechBarczynski WojciechBarczynski linked a pull request Jun 3, 2024 that will close this issue
@mironiasty
Copy link
Member Author

@WojciechBarczynski Thanks for your help!
Updating ffmpeg from 4.0 (I guess it was default on my Mac?) to 7.0 and installing gstream package fixed issues :)

One small note: when you will make you PR, you can also update this line in README: 3-live_stream is correct name

@WojciechBarczynski
Copy link
Member

Thanks @mironiasty , I'll fix that :)

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

Successfully merging a pull request may close this issue.

3 participants