Giter Site home page Giter Site logo

Comments (8)

leetreveil avatar leetreveil commented on July 2, 2024

A few people have asked for this now.

duration and length aren't commonly defined in the metadata and when they are they can be inaccurate.

You need to do something like this: http://stackoverflow.com/questions/6220660/calculating-the-length-of-mp3-frames-in-milliseconds

This could be a fun side project though!

from musicmetadata.

andrewrk avatar andrewrk commented on July 2, 2024

It's feasible that we could go beyond metadata enough to get the duration from the streaming audio. It would be slower because it would mean that we would have to parse the entire stream instead of destroying it after the headers. But arguably it could be seen as part of the scope of this project. Perhaps I'll start a branch to propose an API that allows you to opt in to duration calculation. Sound reasonable?

from musicmetadata.

leetreveil avatar leetreveil commented on July 2, 2024

Yeah sounds good!

from musicmetadata.

nickdesaulniers avatar nickdesaulniers commented on July 2, 2024

Looks like this can be used for duration.

from musicmetadata.

nickdesaulniers avatar nickdesaulniers commented on July 2, 2024

Also, this.

from musicmetadata.

leetreveil avatar leetreveil commented on July 2, 2024

Version 0.3.0 now reads duration for mp3, ogg and mp4 files. Other containers coming soon.

from musicmetadata.

nickdesaulniers avatar nickdesaulniers commented on July 2, 2024

Thank god, reading a file in node is much faster than forking a process to read a file to get the metadata! Thanks again @leetreveil !

from musicmetadata.

nickdesaulniers avatar nickdesaulniers commented on July 2, 2024

Also, was running into a Error: spawn EMFILE which looks like I was spawning too many child processes and running out of file descriptors!

from musicmetadata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.