HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: Larsus on 2003-07-29 15:28:43

Title: gapless encodes?
Post by: Larsus on 2003-07-29 15:28:43
Hi All!

I own the Nomad Jukebox 40G. When playing mp3s of music that have no gaps (Pink Floyd, Porcupine Tree, etc.) there is a slight gap of silence between tracks. This bugs me to no end. So, on music that have no gaps I started using BladeEnc with the -nogap option (and use lame for evrything else). Does lame have an option like this or will it be getting this option? It is really nice to hear these albums play back gapless.
Title: gapless encodes?
Post by: nyarlathotep on 2003-07-29 15:39:43
The mp3 format doesn't allow gapless encoding. So there's no real solution if you use a Nomad Jukebox.

If you want to listen to Pink Floyd, Porcupine Tree, etc albums without gaps between tracks, the only solution I know is to encode those albums as a single big track.
Title: gapless encodes?
Post by: FuRaL on 2003-07-29 16:09:32
Quote
If you want to listen to Pink Floyd, Porcupine Tree, etc albums without gaps between tracks, the only solution I know is to encode those albums as a single big track.

... and the other possibility is using a better audio format like Ogg Vorbis or Musepack MPC. These formats are able to encode absolutely gapless and have at the same filesize as an mp3 file much better sound quality!
Title: gapless encodes?
Post by: nyarlathotep on 2003-07-29 16:17:23
Quote
... and the other possibility is using a better audio format like Ogg Vorbis or Musepack MPC. These formats are able to encode absolutely gapless and have at the same filesize as an mp3 file much better sound quality!

My answer was referring to Larsus' question: "I own the Nomad Jukebox 40G...", which implies ha can't use another audio format but mp3 for his Nomad Jukebox.

Everybody here knows that the other possibility is to use another audio format (or foobar2000 to play mp3's).
Title: gapless encodes?
Post by: Larsus on 2003-07-29 16:52:01
Actually, BladeEnc does provide a gapless solution. I would rather use Lame since it appears that development on the program is continual. BladeEnc is no longer being worked on.

Anyway, BladeEnc is the solution at the moment.
Title: gapless encodes?
Post by: Larsus on 2003-07-29 16:54:01
...oh. On the JB I can also use wav (too big) or wma (yech)...
Title: gapless encodes?
Post by: M on 2003-07-29 17:21:43
Yes, L.A.M.E. has a --nogap option. The simplest way to use it is with Speek's ALL2LAME (http://home.wanadoo.nl/~w.speek/all2lame.htm) frontend (just check the "No Gap" box in the "Gapless encoding" section), since that also automatically configures the necessary --nogapout parameter.

    - M.
Title: gapless encodes?
Post by: Raffles on 2003-07-29 17:42:50
You could rip your cd's as a single file and then encode with Lame.

Using EAC under Action and Copy Range, you'll have a choice between ripping a compressed or uncompressed file.

The result will be a single wav or mp3, which should be just what you want for gapless playback on a portable.

I used this method for The Mars Volta's album "De-loused In the Comatorium", which sounded crap on my MuVo with gaps between the tracks that should have run into each other.

Raf.
Title: gapless encodes?
Post by: Larsus on 2003-07-29 18:35:19
I'm going to try the --nogap option with A2L. That should also work with RazorLame, yes?

I'd rather not encode the whole CD as 1 file. I'd like to have the ability to change tracks. BladeEnc gave me clean (no ticks) gapless encodes. But, like I said, I'd rather use Lame.

I was putting these CDs onto my JB3 as wavs, which played gapless, but it was taking up too much space.

I'll let you know how that turns out.
Title: gapless encodes?
Post by: Larsus on 2003-07-29 19:07:38
O.K. It worked!

Now I can use my encoder of choice (Lame) to create gapless mp3s. It's interesting to note that in the list of command parms for Lame --gapless is not listed.

Now I'll A/B the BladeEnc & Lame mp3s.
Title: gapless encodes?
Post by: DickD on 2003-07-30 07:58:21
You can also get lame 3.90.3 with .APE and .CUE-sheet support from Rarewares (http://rarewares.hydrogenaudio.org). (Also a 'modified' version with added --preset medium and lower ABR presets is available)

EAC can create the WAV or Monkey's (.APE) image and a Cuesheet with artists and titles, then you can use this extended version of Lame to encode.

Instructions are on Nyaochi's website (http://www.geocities.com/nyaochi2000/lame/cuesheet/index.html).

The commandline will be something like:
Code: [Select]
lame --apeinput --alt-preset standard -t CUESHEET CDImage.ape.cue "%n - %p - %t.mp3" --naming-rule


Gapless is usually a hack. The latest Foobar2000 v0.7 beta is supporting a VBR header type fix to allow you to make regular Lame MP3's play gapless properly, but that's not got portable support for the gapless feature, as it's stored in the VBR Xing/LAME header frame, which portables treat as a silent frame.

--nogap will remove the VBR header if you had a VBR encode, so track length and seeking may be messed up for VBR files if they rely on the Xing/LAME header. lame+APE+CUE by default puts in the VBR headers, but these are treated as valid silent frames by most portable players (fb2k is about the only software player that treats it right), thereby creating a tiny gap, so you need to revert to -t (the default LAME --nogap method) and remove the headers, as in my example commandline above. If it's just track shuffling that matters to you, this shouldn't be a big problem.
Title: gapless encodes?
Post by: PlastikFabric on 2004-01-01 21:11:27
hi people,

i am currently using CDex Version 1.51 to rip mix cds. Now, i have it set up to use an external decoder ( ALL2LAME ) in order to make use of the nogap feature.

couple of questions:

firstly, with CDex - i rip the cd into wav files. and then use ALL2LAME to code them to mp3's.

the encoding is:  44.1 kHz / 128 kbps / j-stereo MPEG-1 Layer II / qcal=2

This is what ALL2LAME displays when encoding.

is this right? can i not encode anything higher than 128?

also, i seem to have to manually open up ALL2LAME and select the files, rather than CDex picking up the decoder automatically.

i dont mind the 128 kbps, but the main prob is that none of the file information (title, artist, year etc) is retained when ripping it from the cd into wav and then into mp3 - so i need to manually enter in the missing details.

is this something thats unavoidable?

when you rip a cd normally via CDex (using its own lame decoder) it retains all the info, as you would expect it to do.

any tips or hints?

the other problem is that when it decodes from to wav from the cd, it loses the track number - which means its a pain when using ALL2LAME (another case of manually renaming the files).

must be an easier way? (i'm hoping i've missed the obvious)
Title: gapless encodes?
Post by: kasztan on 2004-01-01 22:00:02
Quote
the encoding is:  44.1 kHz / 128 kbps / j-stereo MPEG-1 Layer II / qcal=2

i think MPEG-1 Layer III
and it will be better when you look at FAQ - very powerfull guide
Title: gapless encodes?
Post by: saratoga on 2004-01-02 05:26:20
Rip directly to MP3.  Wav files do not support tagging, so if you include wav as a step you will lose metadata.  Theres no reason to use ALL2LAME anyway.

Edit:  And next time instead of digging up the corpse of an old thread and shoving your thread inside, start a fresh one.
Title: gapless encodes?
Post by: PlastikFabric on 2004-01-02 13:10:21
if i rip directly to mp3 and not use all2lame, how can i do so and still retain 'no gap' with the ripping?

sorry for breathing life into this old thread. i just thought it was relevant to what i am aiming to do.

for example, find a combination of programs that will allow me to rip with no gaps.


edit: sorry, i should have made it clear in my original post - that i am ripping cds which i do not wish to have sounds between the tracks. my aim is indentical to what Larsus aimed for.

using cdex and all2lame, i am able to do this - except it is time consuming (because of having to re-enter all the track details) and i can only achieve the 128.

the mp3's are then being transfered onto a Zen player.
Title: gapless encodes?
Post by: DonP on 2004-01-02 14:46:50
You can encode the whole CD as one file.  There is a splitting program MP3Directcut which I believe splits your file up on frame boundaries.  So, no gaps.


Personally I don't find the inherent mp3 gap all that bothersome as it is on the order of 1/100 second.  Much worse is the large gap due to players that don't start reading the next track until the current one is done.  Have the Blade encodes been gapless for you?
Title: gapless encodes?
Post by: PlastikFabric on 2004-01-02 15:02:35
not tried blade encodes.

but the MP3Directcut program sounds good as an alternative. will try that out now.
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-02 15:37:21
Um, so what switch do I use to make these sorta-kinda gapless mp3s when directly using Lame.exe? --gapless? --nogapout? --nogap? Help?
Title: gapless encodes?
Post by: saratoga on 2004-01-02 18:04:30
MP3s encoded with LAME are normally gapless.  AFAIK the --nogap option is depreciated (could be wrong though).  If it turns out that --nogap helps, just use it in EAC, CDex or whatever.

Here is what i do:  I rip with EAC and preset standard.  That produces gapless MP3s.  Then to burn them later to a disk I use foobar to make sure the decoder does not introduce a gap.
Title: gapless encodes?
Post by: saratoga on 2004-01-02 18:06:58
Ah here we go:

Quote
--nogap is useless, deprecated, and hardly supported anywhere.
All recent versions of LAME (3.90 and above if I remember correctly) always write additional gapless playback info (amounts of samples to skip) into LAME tag (unless you disable LAME tag writing). All you need is a player that reads and utilizes info from LAME tag; see the topic linked above for more info.
And again, gapless playback using LAME tags has absolutely nothing to do with --nogap switch.


http://www.hydrogenaudio.org/forums/index....6020&hl=--nogap (http://www.hydrogenaudio.org/forums/index.php?showtopic=16020&hl=--nogap)
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-03 10:06:23
That wasn't much help--if LAME mp3s were gapless by default Larsus wouldn't have his problem in the first place. I'm having trouble with LAME mp3s in the Nomad Zen NX too--they don't play gaplessly, but there are plenty of other tracks on my player that do!
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-03 10:33:57
Larsus, what are you doing to make gapless work with your player?
Title: gapless encodes?
Post by: Peter on 2004-01-03 10:41:11
Some hardware players "support" --nogap by not resetting their MP3 decoders between tracks. I highly doubt if any hardware player supports LAME tags.
IMO more sane solution would be to upload entire album CD image as one MP3 track, that would work everywhere (but no track titles, starting playback from selected track, etc then).
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-03 10:48:51
Does (*gasp*) WMA support gapless playback?
Title: gapless encodes?
Post by: Peter on 2004-01-03 10:52:44
Quote
Does (*gasp*) WMA support gapless playback?

From what I've heard, yes.
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-05 15:42:32
Larsus?
Title: gapless encodes?
Post by: Joe Bloggs on 2004-01-09 10:58:56
Anyone?
Title: gapless encodes?
Post by: saratoga on 2004-01-09 20:23:28
Quote
That wasn't much help--if LAME mp3s were gapless by default Larsus wouldn't have his problem in the first place. I'm having trouble with LAME mp3s in the Nomad Zen NX too--they don't play gaplessly, but there are plenty of other tracks on my player that do!

I wasn't addressing Larsus, but PlastikFabric, who did not mention a Zen if he has one 
Title: gapless encodes?
Post by: Larsus on 2004-01-23 06:21:11
Sorry for the delay in response...

I've been using bladeEnc to handle my gapless mp3s. Only on stuff that requires it - like Pink Floyd, Porcupine Tree, etc. Otherwise I use lame - which by default does not create gapless mp3s.

I play my gapless mp3s on a Jukebox 3. It works like a charm. However, I understand that the latest firmware upgrade for the jb3 breaks this. Hhmm... I won't be flashing it.

The player needs to support playing the gapless mp3 gaplessly  Either by design or accident. I figure on the jb3 it is by accident or it wouldn't have gotten broken with the new firmware.

I read (somewhere) that the newer lame does gapless better, than before - whatever that means. I may try it.

This is from the bladeEnc manual on using the -nogap switch:

"Gapless Encoding

From version 0.92.5 BladeEnc supports what we refer to as gapless encoding.

You might have noticed that you normally get a few milliseconds of silence in the beginning and end of each encoded track. This is normally not a problem, but when you have encode a record where the songs blends into each other (like Enigma and most live albums) and listen to the mp3s you can hear a short pause or click between the tracks which can be quite anoying.

There are some technical reasons for this which has made it quite hard to solve, but by using a few tricks and allowing a few milliseconds of music to be moved from the end of one track and onto the beginning of the next, we can make sure that we don't get any gaps.

The downside of this is that if you encode two totally unrelated tracks where the first one ends very sharply and the next one begins with silence, we can unwantedly get a short click in the beginning of the second track since it starts with some milliseconds of music that isn't intended to be there.

The sollution was therefore to by default disable gapless encoding and let the user enable it where wanted by using the -nogap switch.

The -nogap switch can either be placed as a global switch, specifying that all tracks should blend into each other or as a local switch if just two of the tracks should blend into each other.

Example:

1.  bladeenc track01.wav track02.wav track03.wav -nogap track04.wav track05.wav

Only the transition between track03 and track04 is made gapless, only track04 'steals'  a few milliseconds from track03.

2.  bladeenc -nogap track01.wav track02.wav track03.wav track04.wav track05.wav

All the tracks are made to blend into each other, taking a few milliseconds of music from the previous one."

I don't know if this answers many questions, such as why mp3s aren't gapless to begin with (I know why), but I thought I'd stop here and save some typing...
Title: gapless encodes?
Post by: DeadMan on 2004-01-27 21:30:21
Winamp 5 plays back Lame --nogap files perfectly using wave output (Or DirectSound with read head buffer set). Yes you need the in_mpg123.dll for it to work. But no need for foobar2000 if that is not the player of choice.

I just use EAC with Lame 3.95 and it's perfect gapless playback even for DJ mix CD rips. It appears that in_mpg123.dll for winamp is the key.

Also for MP3's that don't appear to be ripped using the nogap feature in_mpg123 with the 'suppress 0 samples at beginning of file' option enabled and mp3splice as an output plugin provides near perfect gapless results. In fact mp3splice is the dll of choice for winamp in this respect. in_nogap.dll is far too agressive and tends to clip too much off.

As for stand alone players. I see no way around the problem until manufacturers pickup on gapless features and work to create some standard (Unlikely) or use Lame's nogap feature correctly (Less unlikely but still unlikely).
Title: gapless encodes?
Post by: ltoth on 2004-02-01 05:46:13
"MP3Splice" (out_mp3splice.dll) works great in Winamp 5 and "Gapless Audio Output" (out_nogap.dll) does too with thousands of LAME VBR encoded opera tracks that I have where there is no gap between tracks. Occasionally a click is heard (less than 1%, I'd say) and most of these can be cured with a tool like MP3Trim by removing a single frame from the end of one track or the beginning of the next.