[PLUG] mp3 file question

Jeme A Brelin jeme at brelin.net
Sun May 26 21:55:50 UTC 2002


On Sun, 26 May 2002, Richard Steffens wrote:
> Now that you mention it, I remember that recommendation. That answers
> the question of how to put a gap between songs, but how do you combine
> several files into one file? I'm assuming that simple concatenation
> won't work due to the presence of a header in each file. What I'd like
> is something that would work like cat, but would build a new header for
> the finished file. Something like:
> 
> mp3cat file1.mp3 gap.mp3 file2.mp3 gap.mp3 file3.mp3 > newfile.mp3

I'm not aware of such a utility, but I've never looked for one.

In reading the lame man page, there's a special switch for "gapless
encoding" which makes me think that the default mode is to include gaps
for contiguous files.  If that's the case, you can simply experiment with
dumping giving lame a string of raw PCM or PCM with WAV file headers and
letting it handle the gaps.

I also might just do something LIKE this:

for song in *.mp3; do
	mpg123 -s $song >>longsong.raw
	mpg123 -s blank.mp3 >> longsong.raw
done
# Of course, this adds some blank to the END of the album, but you can
# figure out your way around that.
lame -m s -r -s 44.1 longsong.raw album.mp3

But those are just some suggestions.  You'll have to play with the
options.

J.
-- 
   -----------------
     Jeme A Brelin
    jeme at brelin.net
   -----------------
 [cc] counter-copyright
 http://www.openlaw.org





More information about the PLUG mailing list