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

Issues with Xing/Lame/Info MPEG frame #338

Open
eharris opened this issue Sep 13, 2020 · 0 comments
Open

Issues with Xing/Lame/Info MPEG frame #338

eharris opened this issue Sep 13, 2020 · 0 comments

Comments

@eharris
Copy link
Owner

eharris commented Sep 13, 2020

Imported from SourceForge on 2020-09-13 05:40:34
Created by citrin3 on 2016-10-31 20:24:10
Original: https://sourceforge.net/p/mp3splt/bugs/206


mp3 file contains metadata in first MPEG frame, this metadata known as mp3 info tag (extension of Xing VBR header).

  1. mp3splt writes in Xing header total number of MPEG frames including this info frame.

LAME writes to this field number of audio frames (number of frames excluding info frame). Other encoders probably do the same.

mpg123-id3dump for file written by mp3splt show warnings like:
Warning: Real sample count 9487872 differs from given gapless sample count 9489024. Frankenstein stream?
[src/libmpg123/frame.c:850] error: End sample count smaller than gapless end! (9487872 < 9488761). Disabling gapless mode from now on.

because mpg123 expects number of audio frames in Xing header.

There is no specification for Xing header, but I found this discussion:
https://www.mail-archive.com/mp3encoder@minnie.tuhs.org/msg02864.html
which confirms my observations.

  1. info frame contains total size of all frames (including info frame) in two places:
  • Xing VBR header
  • LAME header

In this document:
http://gabriel.mp3-tech.org/mp3infotag.html
this fields are named as STREAM_SIZE and MusicLength.

In files produced by LAME this two fields contain same value.

mp3splt updates first field but second field contain wrong value (size from unsplitted file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant