PDA

View Full Version : Feature request: gapless crossfade type



mcw
2006-01-05, 04:40
[Hi - I realise that the mp3 format is not frame-perfect - that there is silent padding on the front and end of most mp3 files.]

When playing mp3s from an album of continuous music (for example, electronica/dance music) there's a glitch between tracks.

I know you can't just, by default, strip silence off the start/end of mp3s whilst playing as that would strip intentional silence as well.

So, how about a new crossfade type of "gapless"? The new crossfade wouldn't fade as such, just strip silence off the start and end of tracks.

I for one would have this as my default crossfade - allowing for gapless playback of mp3s. Some intentional silence will be stripped as well, but hey - I subscibed to that happening when I selected a crossfade of "gapless" so I'm not going to complain.

What do people think? Useful?

Cheers,

Mark

autopilot
2006-01-05, 08:15
It would be extremely useful for me, as i have soooo much music that requires gapless playback. It's my main criticism of MP3 and the reason I rip to FLAC or OGG (even if OGG is not natively supported by the SB3 - please Slim Devices, make it native!).

BTW, have you tried ripping MP3's using the latest version of LAME that can rip without the padding frames? Not tried it myself, just wondering how well it works?

(for future, you could rip to one file with a CUE, but CUE support has been bit flaky in Slimserver tbh)

But yeah, i already have many (thousands) MP3's that are poorly ripped with padding frames and it would be great if the SB3 could do gapless with these MP3's like Foobar can, Foobar is amazing at doing it so its more than possible.

Also, have you added an official feature request in bugzilla for this?

mcw
2006-01-05, 08:24
Also, have you added an official feature request in bugzilla for this?

No I haven't - if there's a good response to this thread then I will.

I can't use CUE files or ogg as I want my music collection to work on my phone's mpeg player, and in my car's, etc., and anyway I don't think I could stand re-ripping all my music (shudder).

Stripping off the silence at playback time certainly works in practice - I've had Winamp set up to do this for years now to good effect.

Cheers,

Mark

Mark Lanctot
2006-01-05, 08:42
No offence to anyone here, but I don't have any use or requirement for any form of crossfade.

Perhaps I don't listen to the type of music that requires this.

autopilot
2006-01-05, 08:52
No offence to anyone here, but I don't have any use or requirement for any form of crossfade.

Perhaps I don't listen to the type of music that requires this.

Fair enough no offence taken mate :) but you would be surprised at how many people in the UK, Europe and the rest of the world do. Dance/electronic music is the mainstream over here, and much of it is mixed (probably not dance as in you think, different definitions over here). But don't forget about live gigs, audio books, Opera, classical etc, and many older albums to, such as some Beatles and Pink Floyd albums. You might not need it right now, but at some point you might well wish the option was there ;)

People are really starting to switch on to gapless playback now, and i have seen several articles in the press about it. Now that the dust has settled on MP3 technology and its become totally mainstream (my friends grandmother has an MP3 player FFS!), people are starting to look at thier Ipods and ask questions now; hold on here, this thing cant play my albums properly? But yeah, for many people its not an issue i know. But for those it is for, its quite a big issue. I can totally ruin the experience of listening to music.

Mark Lanctot
2006-01-05, 09:09
Fair enough no offence taken mate :) but you would be surprised at how many people in the UK, Europe and the rest of the world do. Dance/electronic music is the mainstream over here, and much of it is mixed (probably not dance as in you think, different definitions over here). But don't forget about live gigs, audio books, Opera etc, and many older albums to, such as some Beatles and Pink Floyd albums. You might not need it right now, but at some point you might well wish the option was there ;)

Actually I do listen to techno and some dance music, and yes, most artists seem to come from Europe. I have a few such albums - quite a few from 808 State, one from Orbital, remix singles and albums from Electronic and New Order.

Yes, old school, I know. ;-)

None of what I have requires gapless playback.

As you state, there are certain genres of music where this is essential. I can understand that, but you did ask whether people would find gapless useful and I answered. Maybe others are in the same position I'm in, I don't know. I just thought "should Slim be devoting development resources to this right now?" and I couldn't answer yes.

The good thing about open source is that we have the option - if there is enough interest Slim might work on it, but even if they don't, some smart programmer somewhere can write a plugin. If past history is any indication, a very well-written plugin eventually gets included in the public release.

Just try that with Sonos or Olive Musica. ;-)

radish
2006-01-05, 09:10
Gapless is an important issue, of course, but anyone who cares about gapless threw out their ipod and switched from mp3 to a non-broken format a long time ago. The squeezebox plays all my stuff perfectly gapless already, as does my portable player. Whilst I would have no objection to this feature being added, there are (IMHO) other much more important things to fix first. As others have suggested I recommend you file an enhancement request, people can vote on that in bugzilla. You're much more likely to get actual progress from that than a forum post.

mcw
2006-01-05, 09:22
None of what I have requires gapless playback.

It's not the fact that the music is electronic/dance, it's that much of it is in mixes and so needs gapless playback. As someone has already pointed out, there are also many albums (especially stuff from the 70s and 80s) where often the whole side of the (what was originally) LP is continuous - each musical piece melding into the next (Pink Floyd, Genesis, Mike Oldfield, ...).

Mark

Mark Lanctot
2006-01-05, 09:32
Whilst I would have no objection to this feature being added, there are (IMHO) other much more important things to fix first.

I guess this is what I meant to say. I have no objection to it as I'm sure there are some that would find this useful.

Yes, it's possible that one day I might buy an album requiring gapless playback - for example if I ever want to try the Pink Floyd synchronicity experiment:

http://www.ingsoc.com/waters/info/oz.html

radish
2006-01-05, 09:48
Just to be clear, I'm not downplaying the importance of gapless playback, it's one of the most important features to me as probably 80% of what I listen to needs it. I'm just suggesting that a better solution is to use a different file format rather than hacking the playback code to try and guess what to do - which in my experience rarely works perfectly. The combination of flac, vorbis, squeezebox and rio karma have ensured that I haven't heard a gap in a loooong time :)

mcw
2006-01-05, 09:48
Also, have you added an official feature request in bugzilla for this?

I've added my vote to an outstanding feature request for exactly this behaviour. It's bug 1026.

You can vote for this feature request by visiting

http://bugs.slimdevices.com/show_bug.cgi?id=1026

Cheers,

Mark

autopilot
2006-01-05, 11:53
Just to be clear, I'm not downplaying the importance of gapless playback, it's one of the most important features to me as probably 80% of what I listen to needs it. I'm just suggesting that a better solution is to use a different file format rather than hacking the playback code to try and guess what to do - which in my experience rarely works perfectly. The combination of flac, vorbis, squeezebox and rio karma have ensured that I haven't heard a gap in a loooong time :)

Totally agree, implementing gapless playback with MP3 is like putting a band aid on someone who has had their legs cut off, if you know what i mean, as MP3 is inherently poor at to start with. What would be a better solution is making OGG native, which is designed for gapless playback and i think that's far more important even for people with no interest in gapless playback.

Mark, i think you would be best off re-ripping your files (yeah, i know) to a better format or using CUE's. It is possible to stitch your existing files together and creating a CUE using Foobar, which might be an option, but i have never don't it TBH. Or at least re-encoding with LAME using the no padding frame option. I always rip to FLAC (hard drives are cheap these days) and re-encoded what i need for my portable etc as i need them - or remember it is possible to rip to more than one format at the same time using a plug-in for EAC i think.

I have voted for this and the bug/feature request as i would like to see it, but cant see it being a priority for some time and understand why.

However, one thing that springs to mind is this; Once Slim Devices implement the ability to play DRM files (i believe that's in the pipeline, yes?) bought from the likes of i-tunes, this feature would probably become more important as WMA and AAC are also very poor at gapless playback. I'm i right?


EDIT: I cant believe this thread has had 110 views but only 9 votes! (even if some of the people voting have view this thread more than once).

shlomomofo
2006-01-08, 13:13
i registered just to post this message...

squeezebox looks awesome, but the lack of gapless mp3 playback is a dealbreaker for me, and probably for a lot of other people too. i think more people use lame mp3 than either ogg or flac, even though those formats are superior in terms of quality.

all lame mp3s have tags to make gapless playback posssible, for example:
enc_delay = 576
enc_padding = 1812
mp3_accurate_length = yes

foobar2000 is able to do perfect gapless playback using this info. i have about 120 gigs of music, mostly in lame mp3. i was all set to get a squeezebox, until i discovered it couldn't do gapless mp3. hopefully this gets fixed soon. everything else about the slimserver/squeezebox setup is really sweet.

btw, there's probably way more views than votes because prospective buyers look here to find that squeezebox can't play their "dark side of the moon" mp3s gaplessly, and then they move on.

autopilot
2006-01-08, 17:06
i registered just to post this message...

squeezebox looks awesome, but the lack of gapless mp3 playback is a dealbreaker for me, and probably for a lot of other people too. i think more people use lame mp3 than either ogg or flac, even though those formats are superior in terms of quality.

all lame mp3s have tags to make gapless playback posssible, for example:
enc_delay = 576
enc_padding = 1812
mp3_accurate_length = yes

foobar2000 is able to do perfect gapless playback using this info. i have about 120 gigs of music, mostly in lame mp3. i was all set to get a squeezebox, until i discovered it couldn't do gapless mp3. hopefully this gets fixed soon. everything else about the slimserver/squeezebox setup is really sweet.

btw, there's probably way more views than votes because prospective buyers look here to find that squeezebox can't play their "dark side of the moon" mp3s gaplessly, and then they move on.

I can see where you are coming from, it's one of my biggest pet hates. But can you name a device in the same league as the SB3 that can? Not even the latest almighty Ipod cant do it at all. The problem is the MP3 format (and WMA/AAC for that matter), not the Squeezebox. Foobar does it well with a clever bit of cross fading 'workaround', which the SB3 could do with an update to Slimserver.

But if you have ripped your MP3's using a later version of LAME, without the padding frames that historically have always been added to MP3's, you should find you get pretty good gapless playback. It's not 100% perfect, but nothing will be if people insist on sticking with MP3.

However, i will say that i firmly believe companies like Slim Devices do need to take this more seriously. People around here already have one and not many people around here wont be buying one, because like you say, they find out MP3 gapless playback it not very good and move on. The number of people who really want a good gapless playback solution for MP3's are vastly underestimated It's al very well for people like me to say use a better format, but many people have massive librarys of existing MP3's they need gapless playback for.

Really though, you are missing out. Unless you have stupid amounts of cash to play with and buy a Sono's, don't be put off buying a SB3.

Michaelwagner
2006-01-08, 20:04
I'm not convinced that slimserver is the way to solve this problem.

To understand why, understand that there are (at least) 4 sources of gaps in mp3 playback.

1. Silence in the original material (which should be left there).

2. Silence that the encoder put there (either out of a misguided sense of "needing it" or because of an idea that "padding" was harmless). In some subcases there, there are also tags attached to the file to show how much was "incorrect" silence.

3. Silence that the SB hardware imposes in a song transition. It's my understanding that this is quite small.

4. Silence that occurs because of a network problem just as the buffer for the old song runs down and the buffer hasn't started to fill yet for the new song.

5. Silence that occurs because, in a synched playback environment, all the players stop and wait for them all to partly fill their buffers before starting the next track.

There may be other sources I don't know about, but let's start with these 5.

Which one are you asking us to vote on?

Because my answer isn't the same for all.

I believe slim should work on 3-5, in order to make the hardware output as faithful to the original as possible.

I don't think anyone should automatically be removing silence from (1). The problem is, it is indistinguishable from (2) without intensive scrutiny.

I would agree to Slim interpreting the silence tags if the encoder put them in.

But I don't think Slim should act automatically, at run time, as if it knows better. This sounds like the right place for an off-line program, that lets you listen to the tips and tails of a song and decide where the song should begin and end playback and tag the files appropriately.

In fact, I'd go further and say that support should be added to SB2/3s to send them a file and a set of start and end timestamps. That could be used for trimming silence (in this case) but also for playing a file fragment. For instance, if you don't like the applause at the beginning or the end of a live track, you could say by tagging that you don't want in general to hear it. That would not remove the sound from the track, it's still there in case you want to hear it, but in general, when it's played, it's left out.

My $0.02

billd
2007-01-15, 17:31
I just encoded Dark Side of the Moon yesterday via iTunes, using whatever mp3 encoder it uses by default. iTunes claims to be doing it "gapless". But there are brief annoying "glitches" between the tracks, which don't really sound like padding, but quite ruin the mood of the album. A "gapless", or track matching kludge in slimserver would be very welcome, by me at least.

oreillymj
2007-01-15, 23:47
iTunes has it's own way of writing gapless information into the MP3 tags. Now it may be using Lame to do the MP3 encoding based on the custom options, but from a Slim POV, gapless playback is only supported if you have used Lame to enocde your MP3's.

Try CD-ex or EAC. I've also got DSOTM in my collection and have not noticed any gaps or glitches.

However I run my server with minimal plugins enabled and x-fade on.