Help - Search - Members - Calendar
Full Version: HELP! Gapless playback of ape files in foobar. HOW?
Hydrogenaudio Forums > Lossless Audio Compression > Lossless / Other Codecs
xerkon
Hi, everyone. I am brand new to all of this so bear with me.

I've searched all over the internet for an hour or so trying to find an answer to what I think is a pretty simple question.

Tonight I ripped a CD which has tracks (of course) but there is no silence between the tracks, the songs run together. When I use foobar to play the wav files it plays them gapless. However, after I convert the files to .ape foobar (or something) puts a gap in between all of the tracks.

I've seen a few places in different forums where people talk about foobar being able to play ape files gaplessly, but no one says how. Is there a setting somewhere in EAC, Monkey's Audio or Foobar that I'm missing?

I also keep reading about cue sheets, of which I know nothing. Do I have to use them to get gapless playback of ape files? Is that the only way?

Any help would be appreciated. At this point I don't even care what the answer is, I JUST NEED ONE! I can't believe I haven't come across an answer after an hour of searching. My internet skills must be turning to mush. crying.gif

Thanks.

---------------------------------------------

I had a great suggestion from samhain86 to add the solution below to this original post so no one has to hunt for it. Good idea, I think! smile.gif

GOOD NEWS! I FIGURED OUT THE PROBLEM! (at least in my situation) smile.gif If anyone else out there is having a tough time with gapless playback of ape files ( .ape) in foobar2000 ver. 0.9.4.5 go to file and then preferences in FB2K and under playback click on output. There's a "buffer length" slider (recommended 500 - 2000ms) and it directly influences the gaps between tracks.

I took the same set of wav files and encoded them once with insane and once with fast in monkey's audio. Then I loaded both sets into foobar and set the buffer slider all the way to the left at 100ms. With the fast encoded songs there was the tiniest gap between tracks (prob about 50ms if I had to guess). With the insane tracks there was over 2 seconds of gap. A move of the slider up to 200ms took the gap out of the fast encoded tracks. There was still a 2 second gap between the insane tracks. Since it was about 2 seconds i moved the buffer slider up to 2000ms and it helped but there was still a little bit of silence between tracks. At 2700ms the gap was gone.

So, there it is. If this has all been documented somewhere else I'm sorry, but I googled "gapless" "foobar" and "ape" last night (and about 50 other words and combination of words) and in about an hour of searching never found anything telling me to move the buffer slider. If someone else finds it, let me know where. I'd love to see where I should have been looking.

I'm not too sure why "500-2000ms" is "recommended". Why wouldn't I put the slider all the way to the right and be done with it? Maybe it takes up more memory or something. Anything under 2600 or 2700 didn't work for me with apes that had been encoded with the insane setting. I'm not sure what the default setting is but I'm guessing (and someone could probably confirm) that it's high enough so that normal and high encoded apes don't notice any gaps, which is probably why the majority of foobar users don't have problems.

Hope this helps people in the future! Thanks for the feedback, folks!

(Oh, I just tried the same thing with flac levels 0 and 8. at 100ms buffer there was the slightest of gaps between tracks, we're talking in the very low milisecond range, but it didn't seem to matter whether it was level 0 or level 8 encoded tracks, the gap was the same (maybe slightly larger gap with the 8s) Moving the slider to 200 eliminated any gaps.)
kjoonlee
Hi, welcome to Hydrogenaudio. smile.gif

You do seem to have a problem on your hands, because gapless playback of lossless audio should be automagically ready with foobar2000. Can you tell us how you made those .ape files?
SamHain86
What compression settings did you use to make the APEs? A lower compression setting may be beneficial or a different lossless codec. Currently, I use FLAC and WavPack, and do not have gapless-playback issues.

I used APE exclusively for the longest time (C5000 Insane, last year) and found FB2K did not buffer the next track quick enough. Even using APE-images with embedded CUE-sheets, I would have gapless problems (which makes no sense to me!).
xerkon
QUOTE(kjoonlee @ Dec 21 2007, 02:55) *

Hi, welcome to Hydrogenaudio. smile.gif

You do seem to have a problem on your hands, because gapless playback of lossless audio should be automagically ready with foobar2000. Can you tell us how you made those .ape files?


Hey! Thanks! I used EAC and configured the external compressor using the online EAC guide. eac guide There were gaps that way so then I tried again using the .wav files directly with Monkey's Audio to make apes. Same results both ways, gaps in the tracks.

QUOTE
What compression settings did you use to make the APEs? A lower compression setting may be beneficial or a different lossless codec. Currently, I use FLAC and WavPack, and do not have gapless-playback issues.

I used APE exclusively for the longest time (C5000 Insane, last year) and found FB2K did not buffer the next track quick enough. Even using APE-images with embedded CUE-sheets, I would have gapless problems (which makes no sense to me!).


I used the highest compression with my apes. I didn't check it out with lower compression.

Shortly after I posted my first comment I tried EAC with Flac instead of ape with the highest compression. Playback in Foobar is perfect--no gaps. So I wonder why there are gaps with ape and gapless with flac? Is it because foobar natively supports flac and but needs a plugin for ape? I dunno. I thought I saw a setting for buffer in foobar. Maybe tweaking that would allow FB2K to buffer so that the tracks would be gapless? I guess that's why I posted here in the first place because I figured someone would have a simple answer. Certainly I'm not the first to use ape files with Foobar and expect gapless playback, am I? Haven't a million other people done it already? sad.gif (don't mean to sound upset, I'm not, just very bewildered. I feel like I'm asking a "how do I change my desktop resolution in windows xp" kind of question.)
maggior
QUOTE(xerkon @ Dec 21 2007, 13:58) *


Shortly after I posted my first comment I tried EAC with Flac instead of ape with the highest compression.
Playback in Foobar is perfect--no gaps. So I wonder why there are gaps with ape and gapless with flac?



In the past, I have found APE files to decode VERY slowly, at least 1/2 as fast as FLAC. Perhaps this has something to do with it. Of the lossless encoders, FLAC is on of the less CPU intensive ones. And of course with WAV, there is no decoding - just shoveling of bits.
greynol
My system has trouble with MAC files encoded at Extra High and Insane. Playback is perfect at the High preset or lower.

The Insane preset is just that and there have been reported cases where it resulted in files which were bigger than Extra High.
xerkon
QUOTE(greynol @ Dec 21 2007, 10:26) *

My system has trouble with MAC files encoded at Extra High and Insane. Playback is perfect at the High preset or lower.

The Insane preset is just that and there have been reported cases where it resulted in files which were bigger than Extra High.


Yeah, I just did both insane and extra high and while insane wasn't bigger it only turned out to be 1 Mb less than extra high--372 megs for insane compared to 373 for extra high. That was on a whole 70 min CD.

GOOD NEWS! I FIGURED OUT THE PROBLEM! (at least in my situation) smile.gif If anyone else out there is having a tough time with gapless playback of ape files ( .ape) in foobar2000 ver. 0.9.4.5 go to file and then preferences in FB2K and under playback click on output. There's a "buffer length" slider (recommended 500 - 2000ms) and it directly influences the gaps between tracks.

I took the same set of wav files and encoded them once with insane and once with fast in monkey's audio. Then I loaded both sets into foobar and set the buffer slider all the way to the left at 100ms. With the fast encoded songs there was the tiniest gap between tracks (prob about 50ms if I had to guess). With the insane tracks there was over 2 seconds of gap. A move of the slider up to 200ms took the gap out of the fast encoded tracks. There was still a 2 second gap between the insane tracks. Since it was about 2 seconds i moved the buffer slider up to 2000ms and it helped but there was still a little bit of silence between tracks. At 2700ms the gap was gone.

So, there it is. If this has all been documented somewhere else I'm sorry, but I googled "gapless" "foobar" and "ape" last night (and about 50 other words and combination of words) and in about an hour of searching never found anything telling me to move the buffer slider. If someone else finds it, let me know where. I'd love to see where I should have been looking.

I'm not too sure why "500-2000ms" is "recommended". Why wouldn't I put the slider all the way to the right and be done with it? Maybe it takes up more memory or something. Anything under 2600 or 2700 didn't work for me with apes that had been encoded with the insane setting. I'm not sure what the default setting is but I'm guessing (and someone could probably confirm) that it's high enough so that normal and high encoded apes don't notice any gaps, which is probably why the majority of foobar users don't have problems.

Hope this helps people in the future! Thanks for the feedback, folks!

(Oh, I just tried the same thing with flac levels 0 and 8. at 100ms buffer there was the slightest of gaps between tracks, we're talking in the very low milisecond range, but it didn't seem to matter whether it was level 0 or level 8 encoded tracks, the gap was the same (maybe slightly larger gap with the 8s) Moving the slider to 200 eliminated any gaps.)
greynol
When I said "my system" I would have said Winamp with the default buffer settings, had I known better. Like you, I bet changing these would result in gapless playback for more aggressive compression settings.
Dandruff
QUOTE(maggior @ Dec 21 2007, 19:19) *
In the past, I have found APE files to decode VERY slowly, at least 1/2 as fast as FLAC. Perhaps this has something to do with it.


Exactly, it has.


Here a reply from the developer of Reaper on my questions about slow zooming and gapless loop problems with Monkey's Audio files:

QUOTE
I think these relate to the monkey's audio SDK seeking very slowly. Not sure what we can do about this at this time...

-Justin



http://www.cockos.com/forum/showpost.php?p...amp;postcount=2


So basically in Reaper I had to increase the source buffer size to ~640ms to get proper gapless playback ...

http://www.cockos.com/forum/showthread.php?p=114746




in foobar it works with 1000ms here. but still it seems very cpu consuming at the start of playback (or at each new start of a repeat). just have a look at the taskmanager: on my intel e6700 dualcore it peaks to >20% cpu usage at the beginning of playback. then during the file it's just ~1%.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.