fix: fixed audio filter chaining and add Vitest for unit testing#440
Conversation
|
@Shivansh181003 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. |
👋 Thanks for your PR, @Shivansh181003!Welcome to Reframe — a browser-based video editor built for everyone 🎬 What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
✅ PR Format Check Passed — @Shivansh181003Basic 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. |
|
Hey @Shivansh181003! This PR has a merge conflict that needs to be resolved before it can be reviewed. Please rebase onto the latest git fetch origin
git rebase origin/main
# resolve any conflicts
git push --force-with-leaseAlso note: this PR adds Vitest as a testing dependency. Please check that it's added to |
bfece26 to
2ee4ea9
Compare
|
Hi @Shivansh181003 👋 This PR has a merge conflict with git fetch upstream && git merge upstream/main
# resolve any conflicts, then:
git pushOnce conflicts are resolved and CI passes, this will be ready to merge. 🙂 |
|
I have resolved the conflicts. |
|
Hey @Shivansh181003, the audio filter chaining fix and Vitest tests look good! Quick note: the PR adds vitest to |
Fix: Handle extreme audio speeds via atempo filter chaining
Description
This pull request fixes the audio distortion and silent export failures that occur when the user sets an audio speed outside the
[0.5, 2.0]range natively supported by the FFmpegatempofilter.To achieve arbitrary speeds like
0.25xor4.0x, thebuildAudioFilterfunction was refactored to dynamically chain multipleatempofilters together mathematically. Additionally, since the project lacked a unit test runner,vitestwas added as a development dependency, and a dedicated test suite forffmpeg.tswas implemented to protect this logic from future regressions.Closes #6
Acceptance Criteria Details
0.25xspeed is properly constructed asatempo=0.5,atempo=0.5.src/lib/tests/ffmpeg.test.ts) has been written usingvitestto validate chaining logic across boundary values, standard use cases, and extreme speeds.0.25xand4.0xwill now generate valid FFmpeg commands, preventing premature crashes and outputting correctly stretched audio.PR Checklist
(Checked according to
CONTRIBUTING.mdguidelines)bunx tsc --noEmit)bun run lint)