Please? ;)
What's the level of effort- is there Mac only extensions/libs being used with Electron?
Our main lib that we created is Mac only right now. We want it to be full-on web tech and we'd love to support other systems, but we can't do that at the moment.
Pull requests are welcome at Aperture to make it cross-compatible!
was about to open the same issue for Linux: yep, cross-platform would be awesome :)
I think it's better to open separate issue for linux.
Doesn't electron's desktopCapturer api supply the methods needed?
I think it's almost like what is used for webrtc or something like that.
@madcampos It does, but the performance is does not meet the standards we want to deliver. We experimented with it early on but we couldn't glean a decent FPS from the capturer API, hence why we opted to write a native library with AVFoundation and use that instead.
What are the performance problems?
Maybe we can workout something, if it's more performant on windows there can be a option to use the native library on one platform and the electron builtin on another, or offer it as a fallback even with performance hits while a native addon is in the works.
@madcampos I'm busy right now but I don't want to leave you without an answer, so I'm giving a quick one:
We tried the UserMedia API for several days and it turned out to be very shitty: we had an average of ~15 fps when recording the whole screen and it used a lot of CPU for that. Then we moved to ffmpeg, which can record just fine, but also uses a lot (less than UserMedia) of CPU.
So we decided to go native. It's the hardest path, but the best in terms of performance – based on our experience 😄
See aperture.js' Why section for more info: aperture.js#why
To expand a little;
We've actually discussed this internally for a little while. We have explored using ffmpeg as a cross-platform fallback but the CPU usage has shown to be extremely costly (see here for comparison). Additionally, in order to meet our ideal performance margins we would need to tweak performance for ffmpeg on a per-system basis, which would probably be pretty complex. 🤔
OBS is doing some screen capturing on Windows. I think the code is located here: https://github.com/jp9000/obs-studio/tree/master/plugins/win-capture
But I don't know how the CPU usage or performance is and if this is helpful.
After I'm finished with #37 I'll look into getting this working on Window. Most of the work separating OS code is done in #37 so this shouldn't be too hard.
+1
I noticed desktopCapturer is indeed a pitfall and too slow, it (calling .getSources()) also freezes electron UI/process for a brief moment (even when using proper callbacks etc) - on all platforms. Since I feel the API that comes with electron really underdelivers, I posted this as an issue on electron/electron https://github.com/electron/electron/issues/8246.
From what I've been prospecting, it's an issue within chromium.
For windows, the native methods relay on basically 3 apis:
The problem i got with ffmpeg was frame drop on the recording, some combinations of apis + codecs barely got 30fps. And that is a problem also, encoding to something other than AVI will be a question of post-processing the video.
@madcampos Did you make sure to enable GPU encoding with ffmpeg?
@PaulBGD I think no, it wasn't enabled... I don't think there is an option with the pre-compiled binaries (the one I'm using)
Maybe we could use this library for recording the screen?
https://github.com/wulkano/aperture.js
wow nevermind... I just saw it's written by you too. :D I'll try to get it working on Windows somehow.
_Multi-platform_ https://github.com/wulkano/kap/issues/123 was closed in favour of this issue 20 so I'll express an interest in use on FreeBSD-based TrueOS Desktop. Related: https://github.com/electron/electron/issues/3797
+1 for Windows support
Commenting "+1" doesn't achieve anything. This is why github introduced emoji reactions to comments. Please refrain from commenting "+1".
I'd like it on Windows because it looks like a really cool piece of software, Macs are prohibitively expensive, and Windows has been crying out for this kind of thing for a long time.
Actually commenting +1 just adds one useless notification to the ~100 that appeared on my github.com/notifications just today 😐
If someone has any useful info/idea/etc about how to port Kap to Windows, please feel free to contribute!
Could FFMPEG support be added for Windows in Aperture?
Cos using Graphics Acceleration to record it provides far better framerate than using CPUs. E.g. using Intel QuickSync H.264 on Intel iGPUs.
OBS Studio implements QuickSync H.264 support (Intel iGPUs) as well as NVENC support (on Nvidia dGPUs)and AMD's GPU accelerated codec support so it's clearly possible.
Open source software for Mac only always makes me laugh. Just WTF
See https://github.com/wulkano/aperture#why and https://github.com/wulkano/aperture/issues/30#issuecomment-280979505. Closing in favour of #456.
Most helpful comment
was about to open the same issue for Linux: yep, cross-platform would be awesome :)