Skip to content

[Bug]: a dip clip transition only covers a source-sized rectangle of the output frame #188

Description

@choim4389

Package Version

2.11.0

Flutter Version

3.44.8

Platforms

Android

How to reproduce?

Render two segments whose source resolutions differ from the requested output resolution, with a fadeToBlack (or fadeToWhite) transition between them:

await ProVideoEditor.instance.renderVideoToFile(outputPath, VideoRenderData(
  videoSegments: [
    VideoSegment(                                        // 1080x1920 source
      video: EditorVideo.file(File(portrait1080x1920)),
      transition: const ClipTransition(
        type: ClipTransitionType.fadeToBlack,
        duration: Duration(milliseconds: 500),
      ),
    ),
    VideoSegment(video: EditorVideo.file(File(square720x720))),  // 720x720 source
  ],
  qualityConfig: VideoQualityConfig.custom(resolution: const Size(1080, 1920)),
  outputFormat: VideoOutputFormat.mp4,
));

Expected: the whole output frame dips to black at the seam

Actual: the first half of the dip (on the 1080x1920 clip) is correct, but over the second clip the dip is a 720x720 black square centered in the 1080x1920 frame. The square clip is presented at 1080x1080,
so a ring of un-dipped video is left around the square, and it visibly pops as the dip fades out.

Logs (optional)

Example code (optional)

Device Model (optional)

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions