Skip to content

[camera_android_camerax] Ensure startVideoCapturing and stopVideoRecording return video with expected duration #148138

@camsim99

Description

@camsim99

flutter/packages#6697 makes an attempt to listen to CameraX VideoRecordEvents to ensure that startVideoCapturing and stopVideoRecording only return when the video recording process has actually started/stopped the video recording process, respectively. However, when testing this by recording a video for 2s, we found consistently that the duration of the video is shorter by a couple hundred of ms (1500/1400ms vs 2000ms), indicating that the process of starting/stopping video recording eats into the expected recording time.

We should identify whether the cause is within the CameraX library, the delay between Java/Dart communication, etc. and find a fix for this issue.

Note: Via testing, we found that camera_android has a similar delay, but it is slightly less (1800ms-ish vs 2000ms).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions