Kagami / boram

:film_strip: Cross-platform graphical WebM converter
https://github.com/Kagami/boram/releases
433 stars 30 forks source link

macOS build #5

Closed romaincointepas closed 7 years ago

romaincointepas commented 7 years ago

Any plans regarding making boram work for macOS?

Cheers!

Bountysource

Kagami commented 7 years ago

Yea, I'm planning to work on Mac OS build after 0.3.0 release. I don't have experience with Mac though so it will take some time.

Btw, I'm not familiar with Mac's app conventions, could you advice me, should I ship youtube-dl, ffmpeg and libmpv all inside the package or rather ask users to install them manually with e.g. HomeBrew (like on Linux with apt-get)?

Also, I'm afraid I won't be able to sign builds because I don't have Apple Developer ID and it costs rather lot…

romaincointepas commented 7 years ago

For electron app, you should ship all third-party libs with the app (make sure they are outside of the app.asar file).

Not signing a Mac app is not a big deal for tech-savvy apps like boram (on macOS, the gatekeeper can be bypassed and unsigned app can be opened by simply doing right-click > Open the first time, then opening it normally the following times).

I'm happy to help if you have any other Electron/Mac related questions.

Kagami commented 7 years ago

Looks promising :) boram-mac

Kagami commented 7 years ago

What about archive format? Zip is available out of the box, but 7z gives ~1.5x better compression. For example for win32 build .7z is 47M and .zip is 76M (with maximum level of compression of course). Darwin build should be a bit smaller, I suppose around 35M for .7z and 60M for .zip.

I looked at Sabaki Electron app and it uses .7z for Mac releases.

romaincointepas commented 7 years ago

For macOS I usually see either zip (as it's supported out of the box) or dmg (appdmg is the best package for that).

The dmg has some compression (probably as good as zip), but as far as I know you need to build on a Mac.

Also, maybe related, make sure you include all dependencies on Mac (I don't see ffmpeg/libmpv in your current build process on master).

Kagami commented 7 years ago

I checked dmg format, it supports only zip and bzip2 which are both significantly worse than 7z. Here are results of simple test (1.tar contains win32 build):

188M 1.tar
 76M 1.zip
 73M 1.bz2
 52M 1.7z

I can upload both .zip and .7z versions though. What do you think?

I don't see ffmpeg/libmpv in your current build process on master

Yea, it's not ready yet.

romaincointepas commented 7 years ago

Yep, or start with .7z only if you really prefer and add .zip later depending on feedback.

Kagami commented 7 years ago

Please try 0.3.1 release.

romaincointepas commented 7 years ago

It works! Awesome work.

I see in your code that PPAPI is lacking some OpenGL methods and co. Have you tried pepper_56 with electron@1.6.1? Does that solve/improve anything?

Also, this Mac player is really amazing performance-wise (super low CPU usage for same video), and is using the same libmpv mode as boram does: https://github.com/lhc70000/iina. It's in Swift, but it embeds mpv/client.h and uses the same methods boram does. I'm wondering if it's worth taking a quick look.

Kagami commented 7 years ago

Have you tried pepper_56

Same as in pepper_49. I guess they're not part of WebGL.

Does that solve/improve anything?

No, they are not mandatory, everything works perfectly OK without them.

super low CPU usage for same video

I guess that's because it enables hwdec by default. I haven't yet tuned CPU performance in boram's plugin and enabling hwdec by default is not recommended by mpv devs in general (they're a lot of broken hardware), but it surely worth attention. Created #9 to address this.

Can we close this now? Are you ok with the build in general?

romaincointepas commented 7 years ago

Yep, closing the issue, great work! I will definitely follow your future performance tuning.

Last question though, how are you getting OS X 10.9+ compatible libmpv.dylib and other shared libs on Mac? (The Mac builds available at https://laboratory.stolendata.net/~djinn/mpv_osx/ don't contain libmpv.dylib, only a mpv binary).

Kagami commented 7 years ago

Added make-mac64-deps.sh