Menu

#206 Issues with Xing/Lame/Info MPEG frame

v1.0_(example)
open
nobody
None
1
2016-10-31
2016-10-31
Anton
No

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:
  2. Xing VBR header
  3. 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).

Discussion