Skip to content

fix: enforce -t flag on export to prevent infinite loop with backgrou… - #1289

Merged
magic-peach merged 2 commits into
reframe-oss:mainfrom
shahabhilash:fix/infinite-export-loop
Sep 15, 2026
Merged

magic-peach merged 2 commits into
reframe-oss:mainfrom
shahabhilash:fix/infinite-export-loop

Conversation

@shahabhilash

@shahabhilash shahabhilash commented May 27, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes an issue where adding a looped background music track to a silent video at 1x speed causes FFmpeg to export indefinitely.

By enforcing the -t duration flag on all exports (rather than just those where speed != 1), FFmpeg is strictly told exactly when to stop encoding, preventing infinite loops caused by -stream_loop -1 combined with no native audio track.

Related Issue

Fixes #1577

Type of Contribution

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

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)
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above

@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

@shahabhilash 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

👋 Thanks for your PR, @shahabhilash!

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

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @shahabhilash

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 gssoc'26 GirlScript Summer of Code 2026 level:beginner Beginner level - 20 pts type:bug Bug fix type:docs Documentation type:feature New feature type:performance Performance type:refactor Code refactor labels May 27, 2026
@magic-peach magic-peach added the status:awaiting-review Clean PR waiting on a maintainer, not the author label Aug 14, 2026
@magic-peach

Copy link
Copy Markdown
Collaborator

Retargeted this from #1284 to #1577#1284 was just closed as a duplicate of #1577, which tracks the same infinite-export-loop bug and is now the open survivor issue. Your fix itself looks solid and unaffected by that change.

@netlify

netlify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Deploy Preview for reframe-os ready!

Name Link
🔨 Latest commit 17bd969
🔍 Latest deploy log https://app.netlify.com/projects/reframe-os/deploys/6aa987f38aa6b40008776e45
😎 Deploy Preview https://deploy-preview-1289--reframe-os.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@magic-peach
magic-peach merged commit e35fe33 into reframe-oss:main Sep 15, 2026
18 checks passed
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:beginner Beginner level - 20 pts status:awaiting-review Clean PR waiting on a maintainer, not the author type:bug Bug fix type:docs Documentation type:feature New feature type:performance Performance type:refactor Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Infinite export loop / OOM crash when adding looping background music to audio-less videos

2 participants