Giter Site home page Giter Site logo

Comments (5)

DullReferenceException avatar DullReferenceException commented on July 20, 2024

I'm not sure what the best way is to fix this, but maybe merging the ID3v1 and ID3v2 parsers would work; really, the ID3v2 parser is a parser for an entire MP3 file itself. If the ID3v1 parsing was merged into that, then we'd have the same duration detection for both.

from musicmetadata.

leetreveil avatar leetreveil commented on July 20, 2024

Are ID3v1 audio files that common anymore? I would really like to remove support for it as it requires parsing the entire file to get to the metadata.

Fix for this probably would be to merge the logic, not sure if the container spec is the same for id3v1 and 2 though.

from musicmetadata.

Pheo-Player avatar Pheo-Player commented on July 20, 2024

I'd say ID3v1 files are common enough (i.e. they sadly still exist) that support for them should be kept, especially for a widely used library like this.

For duration detection, id3v1 files should make virtually no difference:
No TLEN tag exists, but that's about it. There's no duration related data to read from the metadata; you'd need always to infer the duration from somewhere else. Easy for CBR, harder for VBR, but Xing headers (#42 (comment)) can still exist in id3v1 files, they're not dependent on id3v2.

On the (somewhat unrelated) issue of parsing the entire file for metadata: Would it be possible to get the file size, e.g. via stat, substracting the 128 bytes of an id3v1 tag, and using that information to start reading at that exact point? There'd be no need to parse the rest of the file for the metadata, then.

from musicmetadata.

heapwolf avatar heapwolf commented on July 20, 2024

👍 for a fix

from musicmetadata.

Borewit avatar Borewit commented on July 20, 2024

MPEG parsing is not done in case a ID3v1 header is assumed to be parsed. I fixed this in music-metadata by moving the MPEG (MP3) parsing functionality from ID3v2 to a separate file and including it the ID3v1 tag parser.

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.