Skip to content

fix(preview): Fix for Video Cropping Preview Issue #1191

Open
mrdeyroy wants to merge 1 commit into
magic-peach:mainfrom
mrdeyroy:fix/video-cropping-1184
Open

fix(preview): Fix for Video Cropping Preview Issue #1191
mrdeyroy wants to merge 1 commit into
magic-peach:mainfrom
mrdeyroy:fix/video-cropping-1184

Conversation

@mrdeyroy
Copy link
Copy Markdown

Description

Resolved an issue where VideoPreview and ComparisonPreview were incorrectly calculating framing overlay percentages resulting in misleading video previews. Replaced the manual math overlay logic with a dynamic CSS output frame utilizing object-fit: cover (Fill) and object-fit: contain (Fit) to accurately mirror the underlying FFmpeg scaling behavior natively.

  • Re-implemented preview boundaries using true target aspect ratios.
  • Removed faulty and redundant overlay coordinate states.
  • Ensured DraggableTextOverlays calculates positional coordinates based on the new output frame boundaries.

Related Issue

Closes #1184

Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

  • GitHub username: [YOUR_USERNAME_HERE]
  • Contribution level (Beginner/Intermediate/Advanced): [YOUR_LEVEL_HERE]

Screen Shot

image

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome, Firefox, and Safari
  • bun run lint passes (no ESLint errors)
  • bunx tsc --noEmit passes (no TypeScript errors)
  • New interactive elements have aria-label / accessible names
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above (required for UI/feature/design changes)

…each#1184)

Fixes the bug where VideoPreview and ComparisonPreview incorrectly cropped videos due to misaligned overlay calculations. Replaced the manual math overlay with a dynamic CSS output frame using object-fit to accurately mirror the FFmpeg export behavior.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@mrdeyroy is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @mrdeyroy

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor labels May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @mrdeyroy!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added the gssoc'26 GirlScript Summer of Code 2026 label May 25, 2026
@mrdeyroy
Copy link
Copy Markdown
Author

@magic-peach Whenever you get time review this PR ! thanks...

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

Labels

gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Video Gets Cropped Incorrectly After Changing Frame Size

1 participant