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

Duration for .webm videos returns as string #118

Open
aletor123 opened this issue Mar 5, 2022 · 1 comment
Open

Duration for .webm videos returns as string #118

aletor123 opened this issue Mar 5, 2022 · 1 comment

Comments

@aletor123
Copy link

aletor123 commented Mar 5, 2022

By default duration of media Tracks returns as float, but for .webm videos it returns string representation of float

@sbraz
Copy link
Owner

sbraz commented Mar 5, 2022

Hi, I believe other types return int because of:

setattr(self, primary_key, int(getattr(self, primary_key)))

This code applies to all attributes so I'm not sure changing them is a good idea.

I don't really understand why some webm files don't have an integer duration. @JeromeMartinez do you have any idea why (test file)?

$ mediainfo --Inform="Video;%Duration%" test.webm
7040.000000

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

No branches or pull requests

2 participants