Comments (12)
I looked into this yesterday and we have two options:
-
In the Swift code in Aperture, handle writing the movie file ourselves. This would let us drop the frames until Kap signals it's ready and Kap would be able to record exactly when it wanted to. The problem is that it's both difficult and verbose to do anything manual with AVFoundation and we would not be able to use the simple method we're currently using. We would also need a different solution for Linux when we add support for that.
-
Save the time when
.startRecording()
is called. Have Aperture send the time back in the resolved promise when the recording actually started. Useffmpeg
to losslessly trim that time away from the start of the movie. This process is super fast (like you would have done it in QuickTime Player). This would also work for the Linux version without any extra code. This way we could actually have a nice countdown too as we would be fully in control of when the actual recording started.
I think 2
would be the best solution.
from kap.
Ok, just discussed with @skllcrn and we have an idea: we'll just hide the window when you click to record, and then the menubar icon will be more useful: we can show the time, a pause button etc. Something like CloudApp:
(Obviously with a better UI/UX, since we got @skllcrn 😎)from kap.
I just looked into this and here's what I concluded:
I put console.log(Date.now())
s in the following locations:
https://github.com/wulkano/aperture.js/blob/99110e848368af117ee573ffe693433d0eff7ec4/index.js#L55
Result:
Kap receives the recording started
signal from aperture
7 ms after it starts and then the mainWindow.hidden()
is called 1 ms later.
So: it's probably something on the aperture
or Swift side and it's going to need some time to debug. Any help is more than welcome 😄
from kap.
I came across this bug as well. Before I started using kap, I always used LiceCap. I like how they do it. To illustrate this, I made a capture of a LiceCap capture :p.
As you can see, LiceCap always uses a preroll of 3 seconds. Don't think it's configurable, but might be a nice feature. That timer could then be shown in the menubar on top. Currently, it's hard to tell how much time you have before the capture actually starts.
from kap.
This should no longer be a problem in the latest beta as we hide the window right away and then bounce the menubar icon while it prepares.
from kap.
is the waiting for recording started really needed? the window could be hidden and still wait for the signal. I might take a look into this tonight
from kap.
@matheuss I'm not surprised. The API is async, so it's not going to resolve the promise instantly. The native API reports exactly when the screen recording starts, so there's going to be some lag.
from kap.
@Khaledgarbaya It usually takes 1-2 seconds for the screen recording to start (Not us, but the system), so it's an indicator you're not being recorded yet. I can't really think of a better solution right now, so I guess we can at least do what you suggest for now.
from kap.
@Khaledgarbaya I'm not sure if I like your idea 😕 If you want the window to be hidden, you can just leave it docked to the menubar.
I will try and hack something during 2.0.0 🕵️
from kap.
My worry is that people will think the recording has started as soon as the app window is hidden. I'll see what I can do. As @sindresorhus and @matheuss have explained, we're limited by the API here. You want to know that Kap is "Getting ready..." and that your recording hasn't started yet, but of course you don't want the window showing in the actual recording. If we hide the window immediately, we still need to communicate that the app is working and give a clear hint as soon as we know the recording has started (which isn't accurate).
from kap.
How about when we click the red record button, the window is hidden immediately then a three-to-one counter would replace the tray icon (three new tray icons, five in total). I noticed that the recording starts the second the tray icon becomes stop instead of record, so in theory it should work. Is this feasible?
from kap.
Fixed on master
, thank you @vadimdemedes! Feel free to close this issue when you're ready.
from kap.
Related Issues (20)
- Smaller size setting -> Larger gif size??? HOT 2
- Issue with Window Alignment in Kap HOT 2
- Downloadable Plugins not showing in Discover HOT 1
- libwebp : Vulnerable Electron 13.6.9 found in Kap
- Unhandled Promise Rejection HOT 1
- Has Kap development been abandoned? HOT 5
- Does not show the UI, and doesn't show up in the menubar. HOT 1
- Unhandled Promise Rejection HOT 2
- Error on startup (M1 Mac)
- Directly Record Compressed
- Activation of Kap is slow with large displays HOT 4
- The background color of reduced size on white is pink-ish. HOT 1
- Add support for multiple loop types HOT 1
- Kap Behaves Unexpectedly when Magnification tool on MacOS is used.
- Dotted line shows at the bottom after convert. HOT 3
- Limiting In-app Navigation, Santizing Links, and Electron.js Version Upgrade
- Unhandled Promise Rejection Error: Cannot download "https://objects.githubusercontent.com/github-production-release-asset-2e65be/65411043/dc097279-94c4-4189-adf7-7eb46e2930a0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220303%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220303T202905Z&X-Amz-Expires=300&X-Amz-Signature=14ded9e5de067facf9d78c074c08405ca088590d94d4d27acf996a3251ce2927&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=65411043&response-content-disposition=attachment%3B%20filename%3DKap-3.5.4-mac.zip&response-content-type=application%2Foctet-stream", status 503: at ClientRequest.<anonymous> (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js:213:34) at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:105:6816) HOT 1
- Support local Google Drive copy
- Crash on start M3 Pro HOT 6
- Contributing – running app locally by yarn start, but I can't allow recording permissions in the development HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kap.