-
Notifications
You must be signed in to change notification settings - Fork 297
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 option to render recording locally using "maestro record --local" #2173
Conversation
80667af
to
e344e1b
Compare
outputFile = localOutputFile, | ||
outputFPS = 25, | ||
outputWidthPx = 1920, | ||
outputHeightPx = 1080, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these the same specs for the video we used to record with remote renderer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remote recorder was 30 fps but I think 25 if sufficient. Same resolution
import java.awt.image.BufferedImage | ||
import javax.imageio.ImageIO | ||
|
||
class SkiaFrameRenderer : FrameRenderer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking about what would be the best way to get this from beta to prod (stable):
- Recommending to use this to everyone who raised a Github issue for the remote renderer
- Announcing this in the contributor's lounge or just the announcement channel to see if it works for everyone.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think we can announce in slack and have folks try it out. Lots of users have asked for this
// !! Due to smart cast limitation: https://youtrack.jetbrains.com/issue/KT-7186 | ||
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION") | ||
while (nextFrame != null && nextFrame!!.timestamp <= currentTimestampSeconds) { | ||
curFrame = nextFrame!! | ||
nextFrame = grab.nativeFrameWithMetadata | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this bug is fixed in Kotlin 2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice good to know!
e344e1b
to
26b211a
Compare
Uses Jetbrain's Skiko to render video locally. Skiko is a Kotlin library that provides bindings to Skia which is the rendering engine for Google Chrome and ChromeOS, Android, Flutter, and others.
Why Skia?
The other alternatives I looked into fell short in one way or another (eg. AWT, JavaFX). Skia checked all the boxes.
Example of locally rendered video:
maestro-recording.mp4