Bugzilla – Bug 7644
Gapless playback of LAME mp3 files with gapless info result in gaps
Last modified: 2008-12-18 11:42:22 UTC
My entire library of mp3 files is comprised of files made with LAME. These files contain gapless information. Since upgrading to SC7 (the current production version), I have noticed gaps that are introduced where none should be. This is most noticable with live recordings. These same files, when played on my iPod or played with foobar2000 do not introduce any gaps. Others in the forums have noted similar behavior. (http://forums.slimdevices.com/showthread.php?t=45395) To replicate: 1) Rip some tracks that have no silence inbetween them. Any live recording or an album like Dark Side of the Moon by Pink Floyd could be used. 2) Encode using LAME using the default settings (-V2, which is 192 kbps VBR). Files are encoded with 44kHz sampling with 16 bit samples. 3) Play them back on the SB. During the track transition, you will hear a very short gap of silence. Sometimes it will sound like a click or a pop. It is most noticable when using headphones. It should be noted that I noticed this behavior on 6.5.4, but it was not all mp3 files - only some. Now the problem appears to be with any mp3 files that should be played seamlessly. If sample files are required, let me know and I will try to supply them. I would have to find a place to upload them. To me, this is a major issue. This feature is one of the reasons that I purchased SB3 products. I listen to a lot of progressive rock, live music, and electronic music where seamless transitions between tracks is quite common. Because I use an iPod, I am not ready to move to another format like FLAC. I have never encountered a gapless issue with my iPod, so I am certain that my mp3 files are OK. My Setup: SB3 wireless using analog outputs P4 Intel machine with 1 GB RAM Open SuSE 10.2 No player synchronization is turned on. Using Weather/Time custom plugin Using iTunes update plugin (done offline since I'm running Linux)
Sorry, this is a duplicate of https://bugs-archive.lyrion.org/show_bug.cgi?id=7644. I've included more detailed info here, so perhaps the other can be closed as a duplicate.
OK, let's try again... This is the duplicate: https://bugs-archive.lyrion.org/show_bug.cgi?id=7641
*** Bug 7641 has been marked as a duplicate of this bug. ***
Still sounds gapless to me, can you attach 2 files that show the problem?
Created attachment 3155 [details] 3 mp3 files that should play gapless which don't on SC7 These files are from Abbey Road by The Beatles. This is part of the medly which should play gapless. Using foobar2000 and my iPod, they play entirely seamlessly. Using the Squeezebox running under SC7.0 (and 6.5.4 for that matter), there is a very pronounced glitch during the track transition when playing these files. It sounds like a glitch between the tracks. In the example, it is most pronounced between tracks 11 and 12 (Mean Mr. Mustard and Polythene Pam). You may need to use headphones to really hear it. These files are clean and there are not glitches in them. The transition should be completely smooth.
Seems that I raised a duplicate bug number 7670 for this and also attached two LAME 3.97 encoded files for tests, these also play seamlessly in Foobar2000, iTunes and iPods and do not play seamlessly on my Squeezeboxes firmware 86 with Squeezecentre 7, very dissapointing (I use Windows 2003 as the dedicated server), Geoff.
Created attachment 3159 [details] Two contiguous LAME mp3 tracks Here are two contiguous LAME encoded mp3 tracks that should play back gapless but using Squeezecenter 7.0 I hear a click on the transition.
*** Bug 7670 has been marked as a duplicate of this bug. ***
Created attachment 3162 [details] Split-second of silence Yep, there is a split-second of silence, see attached image.
(In reply to comment #9) > Created an attachment (id=3162) [edit] > Split-second of silence > Yep, there is a split-second of silence, see attached image. Out of curiosity, did you find this split-second of silence with files that were uploaded or using your own files.
The files I loaded up under bug 7670 (duplicate by mistake) were ripped by myself and encoded by myself using DBPowerAmp and LAME 3.97, Geoff.
That was recorded from the 2 Green Day tracks attached here in comment 7.
I have been testing mp3 gapless with SqueezePlay (desktop player under development). The three Beatles tracks appear to play gapless just fine. Rich Maggio, do you have Audio Startup Time set for your player (see Bug 1536)? As Andy noted the green day tracks do not play gapless. It would appear to be a problem detecting the end of the mp3 track, so that the encoder padding can be removed from the bitstream. A few extra bytes appear in the file after the last frame, so that the mad guard bytes are never reached. This is a problem in Squeezebox firmware and SqueezePlay. The solution is not immediately obvious.
Rich > Maggio, do you have Audio Startup Time set for your player (see Bug 1536)? Hi Richard - No, I do not have Audio Startup Time set - it is set to 0. It is not a parameter that I have set. I have both a 6.5.4 and a 7.0 server setup where I experience the problem. This is puzzling - I don't understand whey I see this problem. I have gone back and checked time and time again and I know I'm not imagining it.
(In reply to comment #14) > Rich > > Maggio, do you have Audio Startup Time set for your player (see Bug 1536)? > Hi Richard - > No, I do not have Audio Startup Time set - it is set to 0. It is not a > parameter that I have set. I have both a 6.5.4 and a 7.0 server setup where I > experience the problem. > This is puzzling - I don't understand whey I see this problem. I have gone > back and checked time and time again and I know I'm not imagining it. Richard - When you test the gapless playback, are you using headphones? For the samples that I have provided, it is pretty to hear the issue using headphones, but may be easy to miss through speakers.
I have not tried your tracks on a Squeezebox, just with SqueezePlay so the results may be different on the hardware. I listen through headphones, and also record the stream and look at the wav captured using Audacity.
Richard, we have a room full of engineers here who can't figure out the solution to this. What do you know about these mad guard bytes?
"What do you know about these mad guard bytes?" Sounds painful :-). I know nothing of mad guard bytes - not my area of expertise. As I read this again, I think you may be directing your comment to Richard T. Since he has this working in SqueezePlay, he's the guy to talk to I'm sure. Does this mean that you see the problem I reported using the files I provided (The Beatles' tracks from Abbey Road)? If so, that's a relief for me because I am always paranoid that I've missed something. I will be so happy once this is fixed.
I think this is fixed now in firmware 100. We weren't properly accounting for the 529 samples of delay introduced by MAD. I'll mark this bug fixed after the firmware gets released in a 7.1 nightly.
New firmware checked in, please reopen if you still notice a problem.
The problem appears to be 99% resolved. Abbey Road by the Beatles plays through OK. I listened to a few other gapless albums last night and all had completely seamless transitions!! Nicely done!! However, I ran into one track that is causing a problem. As before, the transition is fine on my iPod. The only thing I can see that is unique about the track is its duration (38 seconds). It seems as though the tail end of the track is truncated. I've attached the files. If you play them in something like foobar2000, you will hear a completely smooth transition. Using version 100 of the firmware on the squeezebox, you will hear a disrupted transition. Using 7.01 SC (release version), the transition is disrupted as well, but it sounds different. BTW, I did my testing on Windows XP since I didn't want to install over my main server's Linux Squeezecenter installation. Should I open another bug or reopen this one? I'll upload the files shortly. Thanks for your hard work on this issue. I'll be so happy to have gapless mp3 playback on the SB working flawlessly! Rich Maggio
Created attachment 3580 [details] Shows track transition issue with new FW (ver 100)
Hmm, I'm a bit at a loss as to why those 2 tracks don't play gapless. Do all the tracks on that album have the problem? Do you have the original wav/flac versions of those tracks? It would be useful I think to find a pair of uncompressed files that when encoded a certain way using a certain version of lame result in gaps.
The rest of the files on the album play perfectly fine. I should have the FLACs that I generated from the CD archived. I can upload them here tonight if you think it will be useful.
I'm glad the rest of the tracks play fine. I think having the FLACs would be very helpful, thanks.
Created attachment 3586 [details] Transition issue with new FW - mp3 and source FLAC A new file has been uploaded that includes the mp3 files which cause a track transition issue even with FW version 100 and the source FLAC files. To ensure it wasn't an issue with archived files or errors introduced in copying files around, I re-ripped the tracks using EAC to FLAC. I then used foobar2000 to generate the mp3s. All of these files are included in the new attachment. The mp3 files show the same issue as those I posted earlier today. Thanks Andy for looking at this! Let me know if you need anything else to help you figure this out. Rich
According to some threads on Hydrogen Audio there are some cases where LAME doesn't produce a perfect gapless transition. Not sure if this is one of those cases or not. http://www.hydrogenaudio.org/forums/lofiversion/index.php/t53085.html
That might be true, but I don't think this is one of those cases. To my ears it sounds like more than an artifact. Also, if it were one of the cases where LAME isn't able to make a seamless transition, I would expect that I would hear the same artifact when playing the file back using foobar2k and on my iPod. Both of those play the transition without incident.
Using all the the sample files attached, I was to achieve "gapless" playback Please retest with 7.1-21761.
I downloaded 7.1-21761 (the latest at the moment) and installed it on my Windows XP system. Both sets of Pete Namlook files that I uploaded the past few days still have a glitch/gap issue during the track transition. The FLACs do not show the issue. After updating the system, my player was updated to FW version 101.
This bug has now been fixed in the 7.1 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.