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

Receiving floating point dimension values in some videos #24

Closed
lehni opened this issue Jun 4, 2023 · 1 comment
Closed

Receiving floating point dimension values in some videos #24

lehni opened this issue Jun 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lehni
Copy link
Contributor

lehni commented Jun 4, 2023

While in SVGs, the dimensions appear to be rounded, I am getting strange floating point values for some videos, e.g.:

tokyo.mp4
@lehni lehni changed the title Receiving floating point dimensions values in some videos Receiving floating point dimension values in some videos Jun 4, 2023
lehni added a commit to ditojs/dito that referenced this issue Jun 4, 2023
@SidOfc SidOfc self-assigned this Jun 5, 2023
@SidOfc SidOfc added the bug Something isn't working label Jun 5, 2023
SidOfc added a commit that referenced this issue Jun 5, 2023
Fix mp4 files sometimes returning floating point dimensions (#24)
@SidOfc
Copy link
Owner

SidOfc commented Jun 5, 2023

Seems like this is some edge case due to some division. Patched it with a Math.floor for both width and height so it should now return integer values for included video. Will mark this as resolved but feel free to reopen if there are other files experiencing the same issue.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants