From: John R. <sax...@gm...> - 2010-01-25 05:43:50
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Jan 24, 2010 at 02:23:35PM -0600, Michael Tiffany wrote: > On Sun, 2010-01-24 at 13:54 -0500, John Regan wrote: > > > I think you may be on the right track here, I had no idea --nogap was > > deprecated! When I pull up the man page for LAME, it's in there with no > > mention of anything being deprecated. > > It may not even be really deprecated, but it just doesn't really have to > do with what we're doing, despite the name. I believe that if you > encode multiple mp3s on the same command line (otherwise nothing > happens), then it takes what would usually be the postgap of track 1, > and fills the rest of the sample with the start of track 2 and so on. > The problem is if you ever listen to the tracks not exactly in order, > you'll have very small samples of tracks on the wrong track. For me, that's never been much of a problem - I only have a few albums that I've really cared about being gapless (because the tracks run into eachother), and I tend to listen to those in a single run-through. So, I had never noticed a problem before! > > > I re-encoded the album with my usual script, loaded it up into gtkpod, > > and it added the gapless track flag. I'll attach the script I use, it's > > nothing fancy. > > OK, I finally replicated the zero postgap. I needed to use both the > --nogap and the --nogaptags flags for the lame tag to be written, and > then encode multiple mp3s on the same line. > > > I should mention, I went ahead and un-applied my change to gtkpod, so > > I'm running off of what's currently in the git repo again. > > > > I haven't tested this on my iPod yet, and won't be able to until later > > tonight, but if gtkpod is checking the gapless track flag, I'll take > > that as a pretty good indication it'll work. I'll follow-up on that, > > though. > > > > I do have some concerns, though: > > When I ran eyeD3 --lametag on the new MP3, there was no mention of > > gapless, unlike my old MP3s. Here's the output: > > > > [john@slim mp3]$ eyeD3 --lametag 01\ -\ Once\ Again.mp3 > > > > 01 - Once Again.mp3 [ 3.66 MB ] > > - ------------------------------------------------------------------------------- > > Encoder Version : LAME3.98r > > LAME Tag Revision : 0 > > VBR Method : Variable Bitrate method2 (mtrh) > > Lowpass Filter : 18500 > > Radio Replay Gain : -6.6 dB (Set automatically) > > Encoding Flags : --nspsytune --nssafejoint > > ATH Type : 4 > > Bitrate (Minimum) : 32 > > Encoder Delay : 576 samples > > Encoder Padding : 1632 samples > > Noise Shaping : 1 > > Stereo Mode : Joint > > Unwise Settings : False > > Sample Frequency : 44.1 kHz > > MP3 Gain : 0 (+0.0 dB) > > Preset : V2 > > Surround Info : None > > Music Length : 3.66 MB > > Music CRC-16 : A615 > > LAME Tag CRC-16 : 80B6 > > > > Also, I tried reloading MP3s from an album that I know had track gaps, > > and they showed up as gapless, too - is that correct behavior? Maybe > > I'm misunderstanding what "gapless" is supposed to mean, but I always > > assumed that I shouldn't see it on anything that I didn't specifically > > encode as gapless. > > I believe it is a misunderstanding. The only time the lame tag reports > No Gap data is if it was encoded with the --nogap flag. Encoded mp3s > have a pregap to account for encoder and decoder delay, and they have a > postgap to pad the length of the data to an full frame (multiple of 1152 > samples). For music to be played gaplessly, these values must be known > so the player knows exactly where the real data stops and starts. This > is the case whether the tracks actually have music that runs together or > not (though you'll really only notice it if they do). Therefore, > gapless playback can work for any pair of songs where the pregap and > postgap are known, but for tracks with silence between them, it just > means that the silence from track 1 cuts off exactly when it should and > the silence from track 2 starts exactly when it should rather than there > being a small delay or pop. lame will add the pregap and postgap data > to *every* encoded file unless it's told to not write the lame tag, so > every file should have the gapless flag set in gtkpod. > > That hopefully isn't too confusing. I did the best I could :) > > > Both these albums were ripped with Exact Audio Copy and encoded to FLAC, > > then I'll use my lil' script to convert to MP3 for my iPod/sharing with > > friends. > > Let me know how the ipod handles it. With the gapless flag set I think > you'll be ok. I wasn't convinced that your tracks should have played > gaplessly before, but now I think they will, but only when played in the > proper order. Otherwise, you lose the advantages of true gapless > playback. I'm inclined to say we should leave the code as is, but I > could see removing the check for postgap as long as people understand > what it means. > > Michael > > > -- > Michael Tiffany > ti...@ti... > http://www.tiffman.com > So I did the final test - does it play gaplessly on the iPod? The answer is yes :) So, I think the problem then, this whole time, was that I was encoding with those --nogap and --nogaptags switches, which creates a zero-length padding. I'd say leave the code as-is, but maybe in some manual or some wiki somewhere, specify that those --nogap and --nogaptags are not needed, and will in fact not work with gtkpod? I can't be the only one that sees the --nogap and --nogaptags in the man page of LAME and think "Oh, I should use this switch, then, if the tracks run into eachother." Alternatively, and this seems like it'd be more work, gtkpod could recognize these MP3s encoded with --nogap and figure out what to do. The warning on a wiki or manual seems to be the much quicker and simpler solution. Anyway, I have a much better understanding of what "gapless" is, and I'm very content with gtkpod now - it seems to be the only Linux iPod manager that does everything 100% correctly... just gotta make sure *I'm* doing everything 100% correctly, too. :-D - -- John Regan (m) +1 904 417 8788 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAktdL0gACgkQFIrb5Z8QrLGuZQCeJUERH7G28BlvOyslYi+/ed9p L2MAnAyJKVvjV/eKn1BizEtXkUhdRjh0 =57Kv -----END PGP SIGNATURE----- |