Giter Club home page Giter Club logo

Comments (6)

vandys avatar vandys commented on June 4, 2024

I'm seeing what looks like 2X with an mp3 on this code path:

if frames == 0 and ID3._USE_XING_HEADER:

mp3 generated by lame, for a 48k ABR mp3. When I encode at 96k ABR, it's not off by
a factor of 2. So it appears to be bit rate, not channels, which throws off the interpretation
of the xing header. My wife's a musician, I can encode one of her tracks (no license issues)
if you need some example mp3's.

from tinytag.

vandys avatar vandys commented on June 4, 2024

In any case, in _parse_xing_header() the TOC values are bytes, not 4-byte big endian values.
But that doesn't change the duration calculation...

from tinytag.

devsnd avatar devsnd commented on June 4, 2024

Wowzeee, It now takes me a year to answer github issues 😢

Anyway, if you still have any of the files at hand, please post them, so this issue can be reproduced!

from tinytag.

vandys avatar vandys commented on June 4, 2024

Sure... compare soxi on https://vsta.org/andy/pickup/qz9k29290006-48.mp3 versus what tinytag says for duration. (It's my wife's track, so copyright/music licensing is no problem, enjoy!)

BTW, welcome back.

from tinytag.

devsnd avatar devsnd commented on June 4, 2024

Hey @vandys , thanks for the sample file. That and your comment about an off by a factor of 2 lead me to some investigation about the mp3 format. It turns out that the mp3 frames have 1152 samples per channel. My test for the xing header was using a mono-channel file, so your stereo file was off by a factor of 2 🤦

Anyway I have fixed the issue an your file is now correctly read. I am using a truncated version of your file for the test-suite now.

Thanks for your hints and your patience! You can use the version here in git until the next version is released containing this fix.

Have a great day in these weird times, maybe you'd fancy some cake? here you go: 🥮

from tinytag.

vandys avatar vandys commented on June 4, 2024

Thanks much!

from tinytag.

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.