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

"Error: bit reservoir failed - input files with Xing frame without LAME not yet supported" when attempting to create gapless MP3s by running in frame mode with bit reservoir flag #361

Open
porg opened this issue Jun 28, 2021 · 1 comment

Comments

@porg
Copy link

porg commented Jun 28, 2021

Environment

  • macOS 11.4
  • mp3splt 2.6.2
  • lame 3.100
  • Both mp3splt and lame were installed via https://brew.sh

Music Source

With youtube-dl I downloaded a Youtube video as an audio file and transcoded it to MP3:

$ youtube-dl -o dj-mix.mp3 -x --audio-format mp3 --prefer-ffmpeg URL

Used youtube-cue which parses the Youtube video description for a tracklist and generated a CUE sheet from it:

$ youtube-cue URL dj-mix.cue

Split the mixfile into individual tracks according to the CUE sheet

$ mp3splt -o "@N @A - @t" -c dj-mix.cue dj-mix.mp3

Produces files which are tagged, named and cut according to the CUE sheet.

But playback is not gapless:

  • VLC.app 3.0.12 --> You hear a gap of silence.
  • Apple Music 1.1.5 --> Audible glitch, short digital "blurp" sound.

Trying to produce MP3 files optimized for gapless playback

Note: The following feature was published with version 2.6.2 (#146) as an experimental feature according to a post by @optimix from 2015-03-04. So it definitely exists in the version that I use, also 2.6.2.

In -f "frame mode" with the -b "bit reservoir" flag:

$ mp3splt -f -b -o "@N @A - @t" -c dj-mix.cue dj-mix.mp3

Fails with this:

mp3splt 2.6.2 (09/11/14) - using libmp3splt 0.9.2
	Matteo Trotta
	Alexandru Munteanu
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
 Processing file 'dj-mix.mp3' ...
 reading informations from CUE file dj-mix.cue ...

  Artist: DJ Somebody
  Album: Something Mix
  Tracks: 20

 cue file processed
 warning: bit reservoir handling for gapless playback is still experimental
 info: file matches the plugin 'mp3 (libmad)'
 info: found Xing or Info header. Switching to frame mode... 
 info: MPEG 1 Layer 3 - 48000 Hz - Joint Stereo - FRAME MODE - Total time: 61m.00s
 info: starting normal split
 error: bit reservoir failed - input files with Xing frame without LAME not yet supported

The error message is not the clearest

input files with Xing frame without LAME not yet supported

What does it possibly mean?

  1. Is it necessary that the files were encoded by LAME?
  2. Regardless of whether encoded by LAME or a compatible encoder, may there be a LAME-proprietary marker which needs to be present in the file?
  1. Or is LAME needed on the transcoding/splitting side?
  • If so, the complaint would be strange, as I have LAME 3.100 installed
  1. Or is mp3split supposed to come with LAME contained in the main binary?

Also ran in debug mode

This is what I get: mp3splt-bit-reservoir-debug.txt

  • From here I get a bit more detail on when/where the error happens, but not more on why/how.
  • In the prerun it succeeds with reading in the CUE file and running the output scheme.
  • But as soon as it tries to run in frame mode with bit reservoir on the first file it encounters an error and exists.
  • With the same error message. Do not get any wiser. Help appreciated!
@porg
Copy link
Author

porg commented Jun 28, 2021

Did some further research regarding the audio source.

It was downloaded like this:

$ youtube-dl -v -x --audio-format mp3 --prefer-ffmpeg URL

  • I used -v to get the verbose output.
  • According to the manpage -x --audio-format is postprocessing. So it is lossy transcoding.
  • I gave no --audio-quality argument.

From observing the verbose output I realized that ffmpeg is called with this arguments:

$ ffmpeg -y -loglevel repeat+info -i 'file:dj-mix.webm' -vn -acodec libmp3lame -q:a 5 'file:dj-mix.mp3'

  • Is a file which was transcoded/encoded that way supposed to work in frame mode with bit reservoir flag?

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

No branches or pull requests

1 participant