-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add Apple Silicon Support #356
Comments
yes it's really laggy on my m2 laptop |
It's laggy and also consumes too much battery. HDR content plays but the HDR effect is not present. I'm not complaining though, it's open source and free, this is just a humble request to the project developers. |
What do you mean by laggy? I had M1 macbook pro for almost 3 years now and there is nothing 'laggy' it plays 4k content without issues. Be sure to enable hw accelerated decoding in the settings. |
I have the M1 Pro and it does lag sometimes. Hardware acceleration is on but it's not really supported on macOS including HDR. That toggle doesn't change anything, try for yourself. And this application is a battery hog, no doubt. |
I can drop a recording some other time, but pressing every button has significant delay and animations are choppy |
Seems like the main issue preventing a build for arm64 is libmpv, which wouldn't be an issue if Stremio wasn't using 6 year old binaries of it. As said in #326, switching to meson would make it significantly easier to manage cross-platform builds. |
I thought this had to be a joke. 4 years Apple Silicon has been available. Even MS is going full-steam ahead with ARM on Windows now. |
+1 for Apple silicon please. Normal version takes up a lot of CPU/Memory usage and is not battery efficient + it lags sometimes. It is usable but not a very good exp. |
Instructions to build from source for Apple Silicon (requires git, homebrew and Xcode CLI Tools):
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 047d5c0..5849ac2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,10 +44,10 @@ endif()
if(APPLE)
list(APPEND SOURCES images/stremio.icns)
set_source_files_properties(images/stremio.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
- set(MPV_LIBRARY_mpv ${CMAKE_CURRENT_SOURCE_DIR}/deps/lib/libmpv.dylib)
+ set(MPV_LIBRARY_mpv /opt/homebrew/opt/mpv/lib/libmpv.dylib)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@executable_path/../Frameworks")
add_definitions("-pipe")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -arch x86_64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -arch arm64")
set(ENV{OPENSSL_ROOT_DIR} $ENV{OPENSSL_BIN_PATH})
endif() diff --git a/mac/finalize.sh b/mac/finalize.sh
old mode 100755
new mode 100644
index bd2e312..b23ca43
--- a/mac/finalize.sh
+++ b/mac/finalize.sh
@@ -6,20 +6,14 @@ TAG=${1:-master}
DEST_DIR=./stremio.app/Contents/MacOS
-cp ./mac/ffmpeg $DEST_DIR/
-cp ./mac/ffprobe $DEST_DIR/
-cp $(which node) $DEST_DIR/
+cp -f $(which ffmpeg) $DEST_DIR/
+cp -f $(which ffprobe) $DEST_DIR/
+cp -f $(which node) $DEST_DIR/
chmod +w $DEST_DIR/ffmpeg
chmod +w $DEST_DIR/ffprobe
chmod +w $DEST_DIR/node
mkdir -p ./stremio.app/Contents/Frameworks
-cp ./deps/libmpv/mac/lib/*.dylib ./stremio.app/Contents/Frameworks/
-
-# https://bugreports.qt.io/browse/QTBUG-57265
-# you don't want to be using always-overwrite in any version until Qt 5.11.3
-macdeployqt ./stremio.app -executable=./stremio.app/Contents/MacOS/ffmpeg -executable=./stremio.app/Contents/MacOS/ffprobe -executable=./stremio.app/Contents/MacOS/node
SHELL_VERSION=$(git grep -hoP '^\s*VERSION\s*=\s*\K.*$' HEAD -- stremio.pro)
curl $(cat ./server-url.txt) > $DEST_DIR/server.js
-# ./mac/fix_osx_deps.sh "./stremio.app/Contents/Frameworks" "@executable_path/../Frameworks"
This worked on my M4 Pro with macOS Sequoia, hopefully it works for someone else too. Many thanks to everyone in this thread: https://www.reddit.com/r/Stremio/comments/15gijoq/stremio_for_apple_silicon_m1_m2_etc/ |
@zavan what node version are you using? |
node -v I already had it installed via asdf. |
thanks @zavan now latest one is 23 and it breaks dmg building, perhaps due some outdated function used |
Ah. In any case, I think the project should stick to the latest LTS version, which is v22. This helps minimize breaking changes. |
Not sure if this will help anyone but I've used this successfully to get it working natively: |
https://www.reddit.com/r/Stremio/comments/15gijoq/stremio_for_apple_silicon_m1_m2_etc/
@_pajarito was able to compile Stremio for Apple Silicon, and I think we can do the same. One thing to note here is that it will save a lot of battery life, but we should also make sure that hardware video decoding is enabled. That will be the biggest battery life saver.
The text was updated successfully, but these errors were encountered: