Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upscale and division by zero issue #257

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

murat-mehmet
Copy link
Contributor

Summary

We use maxSize to downscale larger videos but smaller videos will also be upscaled to the maxSize in auto compression.
Also there is a division by zero issue when calculating min bitrate. It happens when getVideoBitrateWithFactor is divided by a number < 1. We need to first cast the result to float, make the division and then cast it back to int.

Changelog

fixed upscale and division by zero issue

Test Plan

  • Try to auto compress a video with maxSize higher than the actual size of the video.
  • Try to auto compress a 1080 x 1920 video with maxSize: 8000

Copy link
Owner

@numandev1 numandev1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks❤

@numandev1 numandev1 merged commit d4963b5 into numandev1:main Dec 15, 2023
2 of 5 checks passed
@numandev1
Copy link
Owner

released in 1.8.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants