Skip to content

fix: gif size export estimation fixed#807

Open
Vagventure wants to merge 7 commits into
magic-peach:mainfrom
Vagventure:bug/gif-export-estimate-fix
Open

fix: gif size export estimation fixed#807
Vagventure wants to merge 7 commits into
magic-peach:mainfrom
Vagventure:bug/gif-export-estimate-fix

Conversation

@Vagventure
Copy link
Copy Markdown
Contributor

Description

This PR resolves the file size calculation bug where selecting the newly implemented GIF export option would display a highly inaccurate prediction. Because GIFs lack the advanced temporal and inter-frame compression algorithms used by video containers like MP4 and WebM, their actual data footprint scales rapidly.

Changes Made:

  • src/lib/exportEstimate.ts: Updated the size calculation logic inside estimateExportSize() by implementing a dedicated check branch for the gif format. When evaluating a GIF recipe, the estimator now uses an uncompressed frame-by-frame data coefficient scale rather than the traditional CRF/bitrate formula used for standard compressed video streams, ensuring the front-end file preview matches real-world export metrics.

Related Issue

Closes #795

Type of Contribution

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

Participant Info

  • GitHub username: Vagventure
  • Contribution level (Beginner/Intermediate/Advanced): Intermediate

Screen Recording

Screen.Recording.2026-05-20.155838.mp4

Recording / Loom link:

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)

Signed-off-by: Vagventure <ankitverma0366@gmail.com>
Signed-off-by: Vagventure <ankitverma0366@gmail.com>
…der metrics

Signed-off-by: Vagventure <ankitverma0366@gmail.com>
…ne compilation failures

Signed-off-by: Vagventure <ankitverma0366@gmail.com>
Signed-off-by: Vagventure <ankitverma0366@gmail.com>
Signed-off-by: Vagventure <ankitverma0366@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@Vagventure 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 github-actions Bot added level:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature labels May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Vagventure!

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 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

✅ PR Format Check Passed — @Vagventure

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 the level:beginner Beginner level - 20 pts label May 20, 2026
@magic-peach
Copy link
Copy Markdown
Owner

@Vagventure the tests are failing please fix

@Vagventure Vagventure changed the title Bug/gif export estimate fix fix: gif size export estimation fixed May 20, 2026
@Vagventure Vagventure force-pushed the bug/gif-export-estimate-fix branch from 7c92ebe to 4ebae45 Compare May 20, 2026 16:47
@github-actions github-actions Bot added the level:advanced Advanced level - 55 pts label May 20, 2026
@Vagventure
Copy link
Copy Markdown
Contributor Author

@magic-peach , i've fixed the issue

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 level:beginner Beginner level - 20 pts level:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inaccurate export size prediction for the GIF format

2 participants