Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy home page: puppylinux.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 09 Feb 2010, 09:32
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
[Solved] Can pup301 merge(append) mp3 files
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
r__hughes

Joined: 13 Apr 2006
Posts: 320
Location: Canada

PostPosted: Fri 11 Jan 2008, 12:55    Post_subject:  [Solved] Can pup301 merge(append) mp3 files
Sub_title: need to create one big file from alphabetic sorted small files
 

Can puppy3.01 do this?
I have a folder with many (about 90) small mp3 files and I would like to merge(append) these files into one big mp3 file where the filenames are merged(appended) in alphabetical order - see the list below.

ss1-01.mp3
ss1-02.mp3
ss1-03.mp3
ss1-04.mp3
ss1-05.mp3
ss1-06.mp3
ss1-07.mp3
ss1-08.mp3
ss1-09.mp3
ss1-10.mp3
- - etc etc --
ss1-87.mp3

The pup301 menu/multimedia/Soxgui doesn't handle mp3 files.
Is there a linux merge or join command to do this (cat doesn't work) or perhaps a puppy package that I haven't been able to find. I have seen references to sourceforge's mp3wrap but I lack the expertise to compile the downloadable source code.

_________________
--- triple booting pup421& pup431 (with OO3 & devx) & WXP on DELL Dimension 2400 PC & DELL Latitude 610 Laptop using grub.
---USB-Flash booting pup431 (with OO3 & devx) on Samsung N110 Netbook.

Edited_time_total
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13525
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 13:07    Post_subject:  

Type this in the same folder:

Code:
touch big.mp3

ls *.mp3 | while read a;do cat "$a" >>big.mp3;done



According to postings in my german board the resulting big.mp3 can be played in most players, but you might not be able to edit it in Soundeditors like Audacity.

Mark
Back to top
View user's profile Send_private_message Visit_website 
Bruce B


Joined: 18 May 2005
Posts: 7420
Location: Los Angeles

PostPosted: Fri 11 Jan 2008, 14:10    Post_subject:  

Mark,

Very interesting in two regards

(1) is I didn't know .mp3 files could be butted together to make a playable file. Maybe I thought it couldn't because of the ID3 data.

(2) is more complex for me to explain, I think I'll try and do it by example using a set of DOS commands with its for loop and explain where I'd get in trouble.

rem >big.mp3
for %%f in (*.mp3) do cat %%f >> big.mp3

This presumes that I have a dos external file called cat which is available.

One annoyance is that the DOS for loop doesn't sort the files as Linux ls would.

The real problem is big.mp3 will be included in the for instructions. When its turn comes up, it will cat to itself.

My workaround would be to call big.mp3 something like big.out to exclude it from processing. - after the processing, I'd name it big.mp3

Sorry for my DOS for example, but I guess it gives enough qualifying information to ask the question below.

Code:
touch big.mp3
ls *.mp3 | while read a;do cat "$a" >>big.mp3;done


Due to big.mp3 existing before the ls *.mp3 wouldn't it be included in the do cat portion of the while loop?
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13525
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 14:26    Post_subject:  

I think you're right.
Simple to solve:
Code:
touch big.tmp

ls *.mp3 | while read a;do cat "$a" >>big.tmp;done

mv big.tmp big.mp3


Smile
Back to top
View user's profile Send_private_message Visit_website 
MU


Joined: 24 Aug 2005
Posts: 13525
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 14:31    Post_subject:  

concerning 1.)
Doing a simple "cat" will create no "valid" mp3.
Beside the music you have the header of each file.
A header must be in the head, and not somewhere inside a file.
For this reason sound-editors should have problems with it.
But according to reports, players skip these headers, so you can play it.

Just try it and let us know if you can confirm that Smile
Mark
Back to top
View user's profile Send_private_message Visit_website 
rabiul

Joined: 16 Dec 2007
Posts: 3

PostPosted: Fri 11 Jan 2008, 16:42    Post_subject:  Join mp3
Sub_title: Utility to join mp3
 

<<<-------- Allah, In your heart.

There is a command line utility 'mp3wrap' to join mp3 files. Project's homepage is:
http://mp3wrap.sourceforge.net/

I think if you join mp3 files by 'cat', you can listen the result mp3 file by command line player. Each source mp3's header will be in the result mp3. However, I am not sure about 'cat' result. Try by....
Back to top
View user's profile Send_private_message Send_email 
MU


Joined: 24 Aug 2005
Posts: 13525
Location: Karlsruhe, Germany

PostPosted: Fri 11 Jan 2008, 17:02    Post_subject:  

Thanks rabiul!
Dotpup:
http://puppyfiles.ca/dotpupsde/dotpups/Multimedia/Mp3wrap-0.5.pup

It adds a menu-entry in multimedia Smile
Mark
Back to top
View user's profile Send_private_message Visit_website 
disciple

Joined: 20 May 2006
Posts: 3808
Location: Auckland, New Zealand

PostPosted: Fri 11 Jan 2008, 17:14    Post_subject:  

mp3wrap package for Puppy. The forum search is your friend Smile
-----------------
Oops - Mark beat me to it. Now we have 2 copies.
Back to top
View user's profile Send_private_message 
Dingo


Joined: 11 Dec 2007
Posts: 923

PostPosted: Fri 11 Jan 2008, 17:24    Post_subject:  

three with me. file mirrored on dokupuppy

I think, like the ancient latins melius abundare quam deficere
Back to top
View user's profile Send_private_message Send_email Visit_website 
r__hughes

Joined: 13 Apr 2006
Posts: 320
Location: Canada

PostPosted: Fri 11 Jan 2008, 17:39    Post_subject:  

Thank you MU for your code - it works a treat - I had 8 folders , each with about 90 mini mp3 files which I have now been able to convert to 8 big files which work perfectly on all my mp3 players Smile

Code:
touch big.tmp

ls *.mp3 | while read a;do cat "$a" >>big.tmp;done

mv big.tmp big.mp3


Thanks also to everybody else who provided info and for indicating the existence of Mp3wrap-0.5.pup
--------------------------------------------
corollary --- edited 12jan08
I still occasionally run W98 for some applications - one of them is Goldwave which records, edits, mererges, splits & provides special filtering & other audio/acoustic effects to audio files (incl mp3) - it also allows batch processing of mp3 files to change album info etc. Inspite of the warnings posted above that the merged mp3 bigfiles might not be readable by application programs - I find that Goldwave has no problem with the resultant mp3 bigfiles and can retag them & process other acoustic effects. Hopefully other applications will also work with the bigfiles Smile
--------
reedited 13jan08
Pup301 menu/multimedia/sweep had a bug which muggins has just solved - see discussion below
http://www.murga-linux.com/puppy/viewtopic.php?t=25343
I can now report that sweep will also load, play, edit my mp3 bigfiles - but sadly it won't save in mp3 format

_________________
--- triple booting pup421& pup431 (with OO3 & devx) & WXP on DELL Dimension 2400 PC & DELL Latitude 610 Laptop using grub.
---USB-Flash booting pup431 (with OO3 & devx) on Samsung N110 Netbook.
Back to top
View user's profile Send_private_message 
okabacus

Joined: 09 Jan 2008
Posts: 9

PostPosted: Sun 13 Jan 2008, 15:15    Post_subject:  

I've been able to open otherwise-unreadable mp3s for editing after converting them to WAV (a trick I think I learned while using Goldwave. Gads that was long ago).

There's a companion util, mp3splt, that will split the files back into their component files (claims to work with AlbumWrap files also; haven't tried it).

http://mp3splt.sourceforge.net/mp3splt_page/downloads.php (the GNU/Linux entry is a precompiled binary, seems to work fine).
Back to top
View user's profile Send_private_message Send_email 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
hot copy
[ Time: 0.2861s ][ Queries: 9 (0.0137s) ][ Debug on ]