Help - Search - Members - Calendar
Full Version: Can't get perfect Gapless encoding!
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
CyberDance
Hi guys,
im new here and im hope that im posting at the right place or no Double posting anything.

i relay need your tip on this one!

Lots of ppl adivced me to ask here and i noticed that many of u here have pretty much amazing understanding in Audio and on the digital media in general.

the thing is i cant mangae to produce a perfect rip from a so-called Gapless CD Compilation.

the problem is that i get a very small (and almost not audible) clicking sound when both tracks are overlayed (wich is common on this type of cd as u know)
its driving me nuts! i try to use many configs/settings diff apps/rippers
Among them EAC/CDEX with Lame 3.97/3.98 and the problem cant be solved!!! i did NOT normalize the tracks on purpose to avoid clicking and let the Waveform stay on their original dynamics
and still the same thing!

maybe its some kind of strings/switchs which im missing here in the command line?
i wondered how on earth they mange to make those perfect ripps to those type of cd's on the secene?!?

feel free to use the wave smaples from the cd so u can encode them yourself and c if u get the same thing or not


hope to sort this issue soon smile.gif

TX
Nir
Mike Giacomelli
Are you using a gapless audio player? Because if your player adds gaps, it doesn't matter how you encode.
CyberDance
QUOTE (Mike Giacomelli @ Sep 2 2008, 01:41) *
Are you using a gapless audio player? Because if your player adds gaps, it doesn't matter how you encode.


Sorry i forgot to mention!
Yeah, i am using a gapless player, as FB2K and Winamp 5.24
i may alsp mention that the Extracted waves are played Perfectly!
its only happen when im playing the encoded files, and as i said its a realy small click sound.
/mnt
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead. Also be carefull with other id3 tag editors and media players, that could destroy the Xing or the LAME header.

You mp3s should be gapless with this example for EAC:
CODE
-V 2 --vbr-new --ignore-tag-errors --add-id3v2 --pad-id3v2 --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d


Also to make sure that your LAME mp3s are gapless, you can look up for the gapless info that can be displayed on both foobar2000 and Winamp, e.g "ENC DELAY" and "ENC PADDING".
greynol
QUOTE (/mnt @ Sep 1 2008, 17:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead.

CyberDance,

Please don't believe this nonsense. /mnt doesn't know what he's talking about.

--g

PS: I can't vouch for ID3v2.4, but ID3v2.3 tags from EAC will not under any circumstance create a problem with gapless playback.
/mnt
QUOTE (greynol @ Sep 2 2008, 01:59) *
QUOTE (/mnt @ Sep 1 2008, 17:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead.

CyberDance,

Please don't believe this nonsense. /mnt doesn't know what he's talking about.

--g

PS: I can't vouch for ID3v2.4, but ID3v2.3 tags from EAC will not under any circumstance create a problem with gapless playback.

EAC did have a few issues in the past when it writes id3 tags, such as corrupting the Xing header. It could be a config error his EAC setup, or ripping from a lossy sourced cd.
greynol
QUOTE
EAC did have a few issues in the past when it writes id3 tags, such as corrupting the Xing header.

Just show me ONE corroborated example, else keep your FUD to yourself.

EDIT: ...and if you find one, please tell us which version of EAC.
CyberDance
QUOTE (greynol @ Sep 2 2008, 03:59) *
QUOTE (/mnt @ Sep 1 2008, 17:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead.

CyberDance,

Please don't believe this nonsense. /mnt doesn't know what he's talking about.

--g

PS: I can't vouch for ID3v2.4, but ID3v2.3 tags from EAC will not under any circumstance create a problem with gapless playback.



QUOTE (/mnt @ Sep 2 2008, 03:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead. Also be carefull with other id3 tag editors and media players, that could destroy the Xing or the LAME header.

You mp3s should be gapless with this example for EAC:
CODE
-V 2 --vbr-new --ignore-tag-errors --add-id3v2 --pad-id3v2 --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d


Also to make sure that your LAME mp3s are gapless, you can look up for the gapless info that can be displayed on both foobar2000 and Winamp, e.g "ENC DELAY" and "ENC PADDING".


Thanks 4 the replay guys!


greynol, i know that Tags are Ain't a Problem here since They Have Their Own specific headers
I used the strings from /mnt and its still the same!

@ /mnt
u mention that i can use the file info to know if its "gapless" eg "ENC DELAY" and "ENC PADDING".
thats what i got after using your command line:

(FB2K)

CODE
File Name : 01. AudioTrack 01.mp3
Folder Name : C:\AudioData
File Path : C:\AudioData\01. AudioTrack 01.mp3
Subsong Index : 0
File Size : 62.3KB (63 815 bytes)
Last Modified : 2008-09-02 03:52:08
Duration : 0:03.013 (132888 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 166 kbps
Codec : MP3
Codec Profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.97
Tag Type : id3v2|id3v1
<ENC_DELAY> : 576
<ENC_PADDING> : 1320
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo


CODE
File Name : 02. AudioTrack 02.mp3
Folder Name : C:\AudioData
File Path : C:\AudioData\02. AudioTrack 02.mp3
Subsong Index : 0
File Size : 57.9KB (59 298 bytes)
Last Modified : 2008-09-02 03:52:09
Duration : 0:03.013 (132888 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 154 kbps
Codec : MP3
Codec Profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.97
Tag Type : id3v2|id3v1
<ENC_DELAY> : 576
<ENC_PADDING> : 1320
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo


did n e of u guys try to encode my smaples?
Mike Giacomelli
QUOTE (CyberDance @ Sep 1 2008, 21:21) *
did n e of u guys try to encode my smaples?


Can you write correctly? Its painful to read your posts.
greynol
QUOTE (CyberDance @ Sep 1 2008, 18:21) *
did n e of u guys try to encode my smaples?

Not yet, but I can in a few hours.
/mnt
QUOTE (greynol @ Sep 2 2008, 02:14) *
QUOTE
EAC did have a few issues in the past when it writes id3 tags, such as corrupting the Xing header.

Just show me ONE corroborated example, else keep your FUD to yourself.

Well i did read a old EAC changlog a few years ago, that mentioned that a tagging bug that courrpts the Xing header was fixed. But you never know, since most users don't use the EAC tag writer. Anyway i was only making sure if he was using the same settings from the HA wiki.
Kitsuned
If these mp3 files are for a portable mp3 player, most of which are not gapless, you could always use foobar's converter and select "Convert to Single File" if you were going to listen to the whole album anyway. wink.gif Works great for me.
greynol
QUOTE (/mnt @ Sep 1 2008, 18:29) *
Well i did read a old EAC changlog a few years ago, that mentioned that a tagging bug that courrpts the Xing header was fixed. But you never know, since most users don't use the EAC tag writer. Anyway i was only making sure if he was using the same settings from the HA wiki.

...which says is perfectly ok to use EAC to tag.

Most people don't have EAC tag files? huh.gif I don't know how you could possibly know this.
/mnt
QUOTE (CyberDance @ Sep 2 2008, 02:21) *
QUOTE (greynol @ Sep 2 2008, 03:59) *

QUOTE (/mnt @ Sep 1 2008, 17:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead.

CyberDance,

Please don't believe this nonsense. /mnt doesn't know what he's talking about.

--g

PS: I can't vouch for ID3v2.4, but ID3v2.3 tags from EAC will not under any circumstance create a problem with gapless playback.



QUOTE (/mnt @ Sep 2 2008, 03:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead. Also be carefull with other id3 tag editors and media players, that could destroy the Xing or the LAME header.

You mp3s should be gapless with this example for EAC:
CODE
-V 2 --vbr-new --ignore-tag-errors --add-id3v2 --pad-id3v2 --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d


Also to make sure that your LAME mp3s are gapless, you can look up for the gapless info that can be displayed on both foobar2000 and Winamp, e.g "ENC DELAY" and "ENC PADDING".


Thanks 4 the replay guys!


greynol, i know that Tags are Ain't a Problem here since They Have Their Own specific headers
I used the strings from /mnt and its still the same!

@ /mnt
u mention that i can use the file info to know if its "gapless" eg "ENC DELAY" and "ENC PADDING".
thats what i got after using your command line:

(FB2K)

CODE
File Name : 01. AudioTrack 01.mp3
Folder Name : C:\AudioData
File Path : C:\AudioData\01. AudioTrack 01.mp3
Subsong Index : 0
File Size : 62.3KB (63 815 bytes)
Last Modified : 2008-09-02 03:52:08
Duration : 0:03.013 (132888 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 166 kbps
Codec : MP3
Codec Profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.97
Tag Type : id3v2|id3v1
<ENC_DELAY> : 576
<ENC_PADDING> : 1320
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo


CODE
File Name : 02. AudioTrack 02.mp3
Folder Name : C:\AudioData
File Path : C:\AudioData\02. AudioTrack 02.mp3
Subsong Index : 0
File Size : 57.9KB (59 298 bytes)
Last Modified : 2008-09-02 03:52:09
Duration : 0:03.013 (132888 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 154 kbps
Codec : MP3
Codec Profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.97
Tag Type : id3v2|id3v1
<ENC_DELAY> : 576
<ENC_PADDING> : 1320
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo


did n e of u guys try to encode my smaples?


The gapless info on your files looks ok and should be working flawlessly with foobar2000, Winamp and iTunes.
CyberDance
QUOTE (/mnt @ Sep 2 2008, 04:07) *
QUOTE (greynol @ Sep 2 2008, 01:59) *

QUOTE (/mnt @ Sep 1 2008, 17:39) *
If you are ripping with EAC, make sure that you not using its built in tagger and use the built-in tagger on LAME instead.

CyberDance,

Please don't believe this nonsense. /mnt doesn't know what he's talking about.

--g

PS: I can't vouch for ID3v2.4, but ID3v2.3 tags from EAC will not under any circumstance create a problem with gapless playback.
or ripping from a lossy sourced cd.


Umm, what do u mean by lossy? the disk is original pressed cd in mint condition.
and as i said, the Wavs are played perfectly!!!
only the encoded files are the problematic once!!

QUOTE (Mike Giacomelli @ Sep 2 2008, 04:27) *
QUOTE (CyberDance @ Sep 1 2008, 21:21) *


did n e of u guys try to encode my smaples?


Can you write correctly? Its painful to read your posts.


Sorry, i meant "Samples" but u know exactly what i meant so give me a break!
/mnt
I have once encounter a problem that using foobar, on a hard disc that is suffering from heavy hd usage and with badly fragmanted files, at the same time can break the gapless playback.
greynol
QUOTE (CyberDance @ Sep 1 2008, 18:39) *
Sorry, i meant "Samples" but u know exactly what i meant so give me a break!

No, he's talking about "n e", "4" and "u". There's a rule against posting this way, you know...
http://www.hydrogenaudio.org/forums/index....974#entry149483

"n e" is the same number of characters as "any" and is easier for people to read. It isn't cute.
CyberDance
QUOTE (/mnt @ Sep 2 2008, 04:42) *
I have once encounter a problem that using foobar, on a hard disc that is suffering from heavy hd usage and with badly fragmanted files, at the same time can break the gapless playback.


i got your point /mnt, but my HDs are in top shape! and the PC is free of any heavy load biggrin.gif

its something with the encoder.. something strange i must say... wink.gif

QUOTE (greynol @ Sep 2 2008, 04:49) *
QUOTE (CyberDance @ Sep 1 2008, 18:39) *
Sorry, i meant "Samples" but u know exactly what i meant so give me a break!

No, he's talking about "n e", "4" and "u". There's a rule against posting this way, you know...
http://www.hydrogenaudio.org/forums/index....974#entry149483

"n e" is the same number of characters as "any" and is easier for people to read. It isn't cute.


WoW! boring ruels lol im to lazy to write the whole words laugh.gif
but thanks for the info greynol
/mnt
I tried your samples and encoded them with LAME at V2, and they are gapless under foobar2000.

QUOTE (CyberDance @ Sep 2 2008, 02:56) *
QUOTE (/mnt @ Sep 2 2008, 04:42) *

I have once encounter a problem that using foobar, on a hard disc that is suffering from heavy hd usage and with badly fragmanted files, at the same time can break the gapless playback.


i got your point /mnt, but my HDs are in top shape! and the PC is free of any heavy load biggrin.gif

its something with the encoder.. something strange i must say... wink.gif



Its a good idea, to try a different build from a different site, such as Rarewares.
CyberDance
QUOTE (/mnt @ Sep 2 2008, 04:58) *
I tried your samples and encoded them with LAME at V2, and they are gapless under foobar2000.

QUOTE (CyberDance @ Sep 2 2008, 02:56) *

QUOTE (/mnt @ Sep 2 2008, 04:42) *

I have once encounter a problem that using foobar, on a hard disc that is suffering from heavy hd usage and with badly fragmanted files, at the same time can break the gapless playback.


i got your point /mnt, but my HDs are in top shape! and the PC is free of any heavy load biggrin.gif

its something with the encoder.. something strange i must say... wink.gif



Its a good idea, to try a different build from a different site, such as Rarewares.


it will be realy hard to noticed on FB2K (But its there)
But it's much easier to hear it if you playing it using WINAMP with a Volume Boost of about 8 - 9 dB on its standard Graphic EQ
Listen good and you'll See!

Btw /mnt, can u post the samples here please?
/mnt
QUOTE (CyberDance @ Sep 2 2008, 03:08) *
Btw /mnt, can u post the samples here please?


No problem, i have uploaded my encoded samples
CyberDance
QUOTE (/mnt @ Sep 2 2008, 05:20) *
QUOTE (CyberDance @ Sep 2 2008, 03:08) *


Btw /mnt, can u post the samples here please?


No problem, i have uploaded my encoded samples

/mnt Thank you very much!
now i played your encoded files using WINAMP + 8 db volume Boost and + 12 dB on 14KHz and 16KHz and recorded the session Here!

HAVE A LISTEN PLEASE.
kjoonlee
Maybe you shouldn't boost the high frequencies so much.
Heliologue
QUOTE (CyberDance @ Sep 1 2008, 20:56) *
WoW! boring ruels lol im to lazy to write the whole words laugh.gif
but thanks for the info greynol


I think greynol's point was that it's usually just as efficient to write in a grammatically-correct way as it is to abbreviate with... whatever that's called (text speek? internetese?).

Please remember that there are plenty of HA members for whom English is a second (or third or fourth, &c.) language, and having to decode "lazy" abbreviations or sloppy spelling is significantly more work than it is for native English speakers. And even for native English speakers it can be irritating.

That being said, welcome to HA. I hope you enjoy your stay here. Just remember to read the ToS. HA is a fabulous resource, but it stays that way only because its moderators are pretty good about keeping spam, abuse, and nonsense to a minimum.
Glenn Gundlach
QUOTE (CyberDance @ Sep 1 2008, 18:43) *
QUOTE (/mnt @ Sep 2 2008, 05:20) *

QUOTE (CyberDance @ Sep 2 2008, 03:08) *


Btw /mnt, can u post the samples here please?


No problem, i have uploaded my encoded samples

/mnt Thank you very much!
now i played your encoded files using WINAMP + 8 db volume Boost and + 12 dB on 14KHz and 16KHz and recorded the session Here!

HAVE A LISTEN PLEASE.


You have some serious clipping in there. Not good. Significant (0.211%) DC offset on the left channel.

[JAZ]
I've been checking the files.

First, there's one strange thing, in you wave, the samples were inverted (up to down) compared to what winamp decoded. I don't know if you used an erroneous cable loopback to record it or if it was the result of the equalizer.

Second, the noise exists in both, your recorded files, and with the independently decoded files. It is less present in the latter because you have intentionally boosted the highs so that it was more obvious. The position in your recorded wav is between second 0.7350 and 0.7370 (wasn't audacity able to indicate position in samples too? couldn't find it)

It is not present in the wav files.


Basically, with this i mean the problem is in the mp3 encoding. The gapless decoding is working correctly. I don't know if this is solvable, or it is a weak point. (the glitch exists in both, the first .mp3 end, and the second mp3 start)

[Edit: to G2. There is no clipping whatsoever in his recorded track. Audacity let me increase by 0.1dB the volume in it ]
[Edit2: CyberDance, better not be lazy when you ask for help. And this does apply to your life also, not only here]
cliveb
QUOTE (CyberDance @ Sep 2 2008, 01:36) *
Yeah, i am using a gapless player, as FB2K and Winamp 5.24
i may alsp mention that the Extracted waves are played Perfectly!
its only happen when im playing the encoded files, and as i said its a realy small click sound.

What quality level are you using? If you're compressing quite heavily, then the encoding at the end of one file may get out of sync with that at the start of the next (so that after decoding, there is a discontinuity in the waveform at the track boundary). I've noticed this on odd occasions when encoding at 128kbs (an audible "tick" as the track changes), but things were fine at 192kbs. [I guess this issue is due to the encoder working on an isolated file and therefore not having the "following context" to take into account.]
[JAZ]
QUOTE (cliveb @ Sep 2 2008, 13:48) *
What quality level are you using? If you're compressing quite heavily, then the encoding at the end of one file may get out of sync with that at the start of the next (so that after decoding, there is a discontinuity in the waveform at the track boundary).


It is not the case. The files mnt encoded are lame 3.97 -V2.

And yes, gapless playback always has the problem of isolated files. There is a switch in lame named --nogap, where you specify the different files (in order) that are gapless, and encodes them separately, but without resetting the encoder inbetween.
I've tried right now with these samples, and it is not perfect either. It does not have the noise, but looks as if there were a few samples missing.
/mnt
QUOTE (CyberDance @ Sep 2 2008, 03:08) *
/mnt Thank you very much!
now i played your encoded files using WINAMP + 8 db volume Boost and + 12 dB on 14KHz and 16KHz and recorded the session Here!

HAVE A LISTEN PLEASE.


Just listened to your recorded session, it sounds like that the gapless playback is broken on Winamp, and your problem with foobar2000 could be a placebo.
[JAZ]
QUOTE (/mnt @ Sep 2 2008, 14:12) *
Just listened to your recorded session, it sounds like that the gapless playback is broken on Winamp, and your problem with foobar2000 could be a placebo.


Is people ignoring my posts?
/mnt
QUOTE
' date='Sep 2 2008, 13:29' post='585984']
QUOTE (/mnt @ Sep 2 2008, 14:12) *

Just listened to your recorded session, it sounds like that the gapless playback is broken on Winamp, and your problem with foobar2000 could be a placebo.


Is people ignoring my posts?


Sorry about that. Anyway am sure that the files are gapless on foobar2000, but am not sure about Winamp since i just reformated my computer this weekend.

Anyway i created a couple of image files (MP3 and WAV decodes) of the tracks, that have been decoded with foobar2000 for CyberDance to ABX and see if it is gapless to him.
[JAZ]
QUOTE (/mnt @ Sep 2 2008, 14:48) *
Anyway i created a couple of image files (MP3 and WAV decodes) of the tracks, that have been decoded with foobar2000 for CyberDance to ABX and see if it is gapless to him.


As i said in my post, he intentionally boosted the click. I've taken your files and verified that indeed the problem exists.

Open both files in audacity and compare them, the samples between second 3.0130 and 3.0140.

You'll see that the LAME encoded one has noise in the peak of the wave.
2Bdecided
People like to pretend that individual tracks are somehow encoded perfectly without gaps or glitches by lossy codecs. They are not. This has been discussed several times on HA now...

http://www.hydrogenaudio.org/forums/index.php?showtopic=5308

The only solution I know about is this...
http://www.hydrogenaudio.org/forums/index....showtopic=35654

Hope this helps.

Cheers,
David.
[JAZ]
QUOTE (2Bdecided @ Sep 2 2008, 18:43) *
People like to pretend that individual tracks are somehow encoded perfectly without gaps or glitches by lossy codecs. They are not.


It is not that far from being perfect (in this case, it was 8 samples that had an incorrect value, and off by not much), and with the --nogap it could be perfect (maybe I did something wrong when trying it).

The problem when encoding from individual songs is because there are missing samples to compute the block, and they have to be initialized to some value (I guess zero). Since a lossy encoder won't encode a delta, it will cause noise in the samples near it. I wonder if keeping the value of the last sample (viceversa for the next song) would work better. Or maybe doing an inverse sample (as in a ping-pong loop) is the better solution :?

Gonna make some tests with generated samples... Will post about it later. smile.gif
2Bdecided
The best solution (so far) is the one I linked to! wink.gif

Anything less good will audibly fail some time.

You also have to be careful not to break tracks that currently work e.g. the ping-pong loop might cause some audible pre-echo or frequency effect from impulse-like signals near the start or end of a track.


btw, the audible impact of pcutmp3 when using a gapless unaware player is almost zero. The possibility of hearing some audio twice was something I was concerned about in previous posts, but in the real world it's almost a non-issue

Cheers,
David.
CyberDance
Thanks Guys for trying to help me here and Thank you JAZ for making my point much clear to all the others wink.gif

but still the Problem Has NOT Been Solved!!
im amazed since i know i can get a perfect rip!
i actualy got one in my own hands!

let me tell you the whole sotry.
1 year ago a guy from the MP3 Scene ask me to borrow him the CD (the one which have the rips we are trying to sort here) so he can Release it to topsite etc...
i made a BIN/CUE and duped it as a .rar file on the FTP he gave me.
The rips he made are so perfect (in terms of gapless encoding) so i know i can achieve the same result!
I Dont know which preset he used nor exact Lame version OR app and i lost contact with him right after that..

i would be more then happy to upload the two tracks (full) from the original Release if it could help anyone!
or maybe is there a "way" or a tool to know which preset/lame was used to produce the rips??
Any help would be much appreciated, Thanks!!!
2Bdecided
I think you should read the terms of service, specifically number 9, before going any further!

http://www.hydrogenaudio.org/forums/index.php?showtopic=3974
http://www.hydrogenaudio.org/forums/index....974#entry149482


If you had a cue file, the method I linked to would give perfect gapless mp3s when decoded via foobar2k, rockbox players etc.

Cheers,
David.
CyberDance
QUOTE (2Bdecided @ Sep 11 2008, 13:27) *
I think you should read the terms of service, specifically number 9, before going any further!

http://www.hydrogenaudio.org/forums/index.php?showtopic=3974
http://www.hydrogenaudio.org/forums/index....974#entry149482


If you had a cue file, the method I linked to would give perfect gapless mp3s when decoded via foobar2k, rockbox players etc.

Cheers,
David.


Tx david. i dont have the cue file but i have the original CD, can i use it insted of a cue file?
2Bdecided
You can rip to single wav+cue using EAC (and other software), encode one long mp3, feed the mp3 and cue into pcutmp3, you get one gapless mp3 per track - job done.
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-2009 Invision Power Services, Inc.