Skip to content
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

RecordMotion: native platform recorder #4

Open
5 tasks
polarby opened this issue Jan 16, 2023 · 1 comment
Open
5 tasks

RecordMotion: native platform recorder #4

polarby opened this issue Jan 16, 2023 · 1 comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed wontfix This will not be worked on

Comments

@polarby
Copy link
Owner

polarby commented Jan 16, 2023

With .recordMotion() users could take advantage of capturing widgets natively (including native views) and it could dramatically reduce capturing time from RepaintBoundary.
This issue has been created to discuss the feasibility to record flutter programs natively in each platform. Adaption of this approach for capture motion for widgets that are present in the widget tree is also considerable.

The process of capturing could be archived by the following process:

  1. Capture full screen natively and write to a temporary file directory
  2. Capture the context of the render widget (size, position, transparency mask by capturing RepaintBoundary )
  3. Using flutters FFmpeg to crop the to-be-captured widget out of the screen recording (and apply a transparency mask).
  4. Convert cropped video to the expected file format

The following platform support needs to be checked.

  • Swift: ReplayKit
  • Web: java activity (browser-specific)
  • Android: Media Projection API
  • macOS
  • windows

Identify and Capture native widgets

If native rendering does not seem to make too much sense, in case no significant render time is reduced. It is considerable to take this method to directly identify native views and capture those individually, rather than through flutter render boundaries.

Definitive limitations:

  • dynamic transparency positions
@polarby polarby added enhancement New feature or request help wanted Extra attention is needed wontfix This will not be worked on discussion labels Jan 16, 2023
@Kaizodo
Copy link

Kaizodo commented Jul 17, 2024

if we capture and crop entire screen that means we are limited with resolution of video with repaint boundry we can output a higher resolution output with crisp details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants