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

Feature Request: expose Duration() for each audio type #47

Open
delucks opened this issue Dec 23, 2018 · 3 comments
Open

Feature Request: expose Duration() for each audio type #47

delucks opened this issue Dec 23, 2018 · 3 comments

Comments

@delucks
Copy link

delucks commented Dec 23, 2018

Hello!
I'm using your library to parse out information from a variety of different audio files for storage in a database. I'd like to store the duration of each track as well, but it looks like this library doesn't have support for getting each track's duration from the metadata headers yet. To confirm this is possible, I looked through the specs of all the formats currently supported- there are fields in all for retrieving the duration (or length as it's sometimes called). As an example, here's a python library which appears to parse all of them. I would appreciate support for this field! If you are short on time, I will start work on implementing this.

@dhowden
Copy link
Owner

dhowden commented Dec 23, 2018

Yes, we don't currently have duration because that's digging into the audio format itself, rather than the ID3/equiv layer of metadata. I think that there was an attempt to expose bitrates in a previous pull request (see #7), which might be of some help.

@delucks
Copy link
Author

delucks commented Dec 23, 2018

I see, the approach in #7 looks similar for the specific codec they're working with. Would you mind elaborating more on your comment on issue 7 about moving the code into a sub-package? If I start working on code that works with formats rather than the metadata layer, would you like me to create a codecs/formats package and keep the implementation there separate from the main package?

@jsilland
Copy link

Bumping up this thread — I need this feature as well and would love to help landing it, happy to take cues from you @dhowden on how to organize the code since that seemed to be a concern with the previous PR.

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

3 participants