HydrogenAudio

CD-R and Audio Hardware => CUETools => Topic started by: NOYB on 2019-09-19 01:33:17

Title: NULL Samples Injected Between Tracks of MP3 Output
Post by: NOYB on 2019-09-19 01:33:17
Audio output type MP3 CBR (libmp3lame) (quality high) is adding 3186 null samples between tracks.

2257 null samples   (51.18 ms)  added to track beginning
  911 null samples   (20.66 ms)  added to track end
3168 null samples   (71.84 ms)  total added between consecutive "gapless" tracks

This creates enough of a gap to be heard in the transitions between consecutive "gapless" tracks.  Annoying.

This does not happen with WAVE or FLAC output.

Is there a setting or some way to eliminate these null samples from being injected between tracks of MP3 output?

CUETools 2.1.6, Windows 8.1 Pro

Thanks
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: Gregory S. Chudov on 2019-09-19 01:56:35
I'll have to check. It isn't supposed to happen. How were you measuring this? Some mp3 tags might look like silence to decoders that don't understand them.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: NOYB on 2019-09-19 02:05:51
I'll have to check. It isn't supposed to happen. How were you measuring this? Some mp3 tags might look like silence to decoders that don't understand them.
Noticed a gap when playing in Windows Media Center.  So loaded the MP3 in Audacity.  Sure enough there is silence added to the beginning and end that is not present in the source wave file.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: kode54 on 2019-09-19 08:21:08
There should be a LAME gapless information header. It is identical to the Xing header, except for CBR files, it has a "LAME" header instead.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: Case on 2019-09-19 09:06:47
Audacity can't take the padding and delay info into account and decodes the files incorrectly. Decode the MP3 files to WAV with lame or foobar2000 and you'll see there is no added silence.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: john33 on 2019-09-19 09:53:30
The encoder delay and padding is handled by the frontend, not the library unless memory fails me. ;)
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: 40th.com on 2019-09-19 19:48:55
Noticed a gap when playing in Windows Media Center.
 
Windows' included media foundation (MF) system mp3 decoder in W10 does not handle INFO (CBR) gapless info from LAME. The system MF mp3 decoder does handle XING (VBR) gapless info.  Switching to a LAME VBR mode is your only way to get Windows in-box player to play without gaps.  In Windows 10. I notice you mention MC. I'd be surprised if that (Windows 7 is it?) handles even Xing VBR gapless info.  Find another player.  FB2k should do it.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: kode54 on 2019-09-20 02:46:18
They could also do something even worse to further entrench themselves in the legacy Windows ecosystem: Try the WMA format. Good luck using it anywhere else.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: NOYB on 2019-09-21 03:13:29
They could also do something even worse to further entrench themselves in the legacy Windows ecosystem: Try the WMA format. Good luck using it anywhere else.
Well WMA lossless may actually be a pretty good suggestion for my use case.  I have the CD image (wav) + cue sheet and can easily make any of the CUETools supported formats with just a few clicks if needed for other devices.  Plus being lossless can serve as another backup.  FLAC on Android phone, WMA lossless on WMC and Windows 8.1 notebook.  Plus better quality than MP3 (not that I'd be able to tell).
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: kode54 on 2019-09-21 08:30:52
WMA Lossless is only advisable for 16 bit, and is not future proof, because support may be dropped in a future version of Windows. Of course, you're using WMC, which is already a discontinued product, so I guess there's not much point worrying about that.
Title: Re: NULL Samples Injected Between Tracks of MP3 Output
Post by: NOYB on 2019-09-21 16:28:03
Well CDs are 16 bit so don't see much point in deepening them.  Which is probably better then the best MP3 and WMC doesn't support FLAC.

Not concerned about future support.  If I were to change to a different media center system I'd probably be changing file formats anyway.  Probably FLAC.  Just a few clicks to put out a different format and already have FLAC on Android phone.

Thanks for the info though.  It's good to know.