How to merge mp3 files into a single file?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

How to merge mp3 files into a single file?

#1 Post by Flash »

Can anyone tell me why Menu -> Multimedia -> Soxgui audio file tools -> Merge audio files seems to list every file type known to man except mp3? :?
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69321][color=blue]Puppy Help 101 - an interactive tutorial for Lupu 5.25[/color][/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

I don't know, but I think you can do:

cat file1.mp3 > new.mp3
cat file2.mp3 >>new.mp3
cat file3.mp3 >>new.mp3

I think I read in a forum, that several applications can play such a file, though it is not "correct".

Hope someone has a cleaner solution.
Mark

User avatar
cplater
Posts: 56
Joined: Sat 11 Jun 2005, 11:51
Location: Huntsville, Alabama

#3 Post by cplater »

You might want to look at the Snack sound toolkit and perhaps WaveSurfer and SndBite which uses it. I'm not sure if you want to append or mix two files but they have graphical sound editing tools. It is based on tcl/tk so puppy should run it fine. I've use the snack demo tools to do some light editing to shorten sound clips. Anyway, here is a Freshmeat link to the project: http://freshmeat.net/projects/snack/

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#4 Post by plinej »

MU's solution should work. As far as soxgui it seems as though there was a reason I didn't include it. It seems like sox would read mp3 but not write mp3 so where mp3 appears in soxgui it is taken care of by lame. It seems that the new version of sox that is in now in Puppy may handle mp3 properly now. I'll have to mess around with it when I get a chance and see if I can add that option to soxgui. If not I could just implement a script within soxgui to do what MU suggested.


User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

Thanks, plinej. I don't understand how to use what Mark said :oops: but I'll gladly test whatever solution anyone comes up with. :)

Cplater, the last time I tried the Snack dotpup, I think it was missing a library. It worked in earlier versions of Puppy but I think Barry removed something.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#7 Post by plinej »

I should've read Mark's post more carefully. His solution probably will mess up the headers of the files. I'll look and see if I can get it to work in sox otherwise I'll compile one of the programs GuestToo posted.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#8 Post by plinej »

sox 12.18.2 (current version in Puppy) will merge mp3 files but it decodes and re-encodes to 128 Kbps. I think I'll compile those programs that GuestToo posted and see which one works the best.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#9 Post by plinej »

http://www.murga-linux.com/puppy/viewtopic.php?p=97616

Will install /usr/local/bin/mp3wrap

The binary is only 14 kilobytes.

just run the following from within your directory with mp3 files:

sh-3.00# mp3wrap merged.mp3 *.mp3

That command will merge all mp3's in current directory and name the new file to

merged_MP3WRAP.mp3

The _MP3WRAP in the name is just automatically done.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#10 Post by Flash »

Thanks, plinej. That looks simple enough to do that maybe I won't mess it up. :lol:

User avatar
cplater
Posts: 56
Joined: Sat 11 Jun 2005, 11:51
Location: Huntsville, Alabama

#11 Post by cplater »

Flash wrote:Cplater, the last time I tried the Snack dotpup, I think it was missing a library. It worked in earlier versions of Puppy but I think Barry removed something.
Looks like snack is looking for 8.4 tcl and the new pup is 8.5. Put the following links using a rxvt terminal to make it think 8.5 libs are 8.4 and it'll run.

cd /usr/lib
ln -s libtcl.so libtcl8.4.so
ln -s libtk.so libtk8.4.so

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#12 Post by Flash »

Thanks, cplater. I think MU or GuestToo said the same when I reported that Snack didn't work in 2.12 or 2.13. I forgot. :oops:

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#13 Post by MU »

Flash,

the comand "cat" can be used in a consolewindow, to display a textfile:
cat a.txt

But if you use
cat a.txt > new.txt
then it is not displayed, but copied to another file instead.
As ">" redirects output to a file.

If you use ">>", then it is attached in the end of an existing file.

So
cat a.txt > new.txt
cat b.txt >> new.txt
would create a file new.txt with the contents of a.txt and b.txt.

The same can be done with mp3 files.
As pliney said, this can break the mp3-headers, but in my german board someone wrote, that this does not matter for many applications.
You could play such a combined mp3, but should not use it to edit it further in programs like audacity.

Have a nice weekend, Mark

Post Reply