Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Someone has split my audio class lessons and some songs I put on my smartphone into multiple pieces: I guess he or she used the "split utility" to do this in order to make me angry but how could I use the "join utility" to mend the files?
What are the names of the pieces? Can you post an example? If you are sure they have been divided using the split utility, you can assemble pieces using cat. Just pay attention to put the names of the pieces in the correct order. Example:
@TobiSGD/colucix:
I am just currious... Can cat create a full music file (i.e. may be mp3 clips) from pieces of file?
Of course. It simply put bytes in sequence and it doesn't make any difference among file types. On the other hand, every file is a pure sequence of bits: it is the software that interpret the sequences in one way or another. cat simply concatenates the pieces and doesn't make any attempt to interpret them, nor changes them in any way.
Of course. It simply put bytes in sequence and it doesn't make any difference among file types. On the other hand, every file is a pure sequence of bits: it is the software that interpret the sequences in one way or another. cat simply concatenates the pieces and doesn't make any attempt to interpret them, nor changes them in any way.
Agree. That means, if I want to combine two mp3 files or clips i.e. song1.mp3 and song2.mp3, I can use cat to combine them... right?
Yes and no. The situation you describe is totally different from joining pieces coming from one original file. A mp3 file has a header that contains information about the bit-rate, the audio codec and so on. If you concatenate two mp3 using cat, this information is not updated and it remains related to the first file, not to the resulting mp3. Nevertheless an audio player can still play the file and you will listen to two songs in sequence. However I think it is a matter of luck in this case!
Yes and no. The situation you describe is totally different from joining pieces coming from one original file. A mp3 file has a header that contains information about the bit-rate, the audio codec and so on. If you concatenate two mp3 using cat, this information is not updated and it remains related to the first file, not to the resulting mp3. Nevertheless an audio player can still play the file and you will listen to two songs in sequence. However I think it is a matter of luck in this case!
I wouldn't be too sure that an audioplayer will play both parts of such a file. MP3 files can have two blocks of metadata, one in the last 128 bytes of the file (ID3v1) and one in the beginning of the file (size dependend on content, up to 16 so called frames with a maximum of 16MB each, so maximum 256MB, ID3v2). I wouldn't expect any audioplayer to handle files correctly were these chunks of data appear on places were they are not expected, for example when you concatenate a file with ID3v1 and a file with ID3v2 in a way that the metadata is in the middle of the new file. With files without metadata colucix should be correct, since MP3 files have not only one header, but many of them, so that a change in bitrate or other variables shouldn't make any differences.
I wouldn't expect any audioplayer to handle files correctly were these chunks of data appear on places were they are not expected, for example when you concatenate a file with ID3v1 and a file with ID3v2 in a way that the metadata is in the middle of the new file.
Indeed, I tried with two files having the same ID3 version (ID3v2). This probably explains the "matter of luck" I mentioned in my previous post!
@colucix :is the any other utility to split a mp3 file and corrupt a song and how can I get the information about the corrupted file I want to mend to check if it is therefore the split utility used by the guy?
tomorrow, I will be able to give you more details as I don't have the cable to connect my smartphone with the computer.
Instead of the split utility you also can use any audio editor to split the file into multiple smaller ones. In this case you would even be able to play any chunk independent from the others.
To test if the person that did this really used split (or a similar working tool) the best and simplest option is to just launch the cat command to join them and try if you can play it.
to TobiSGD:
as I am a newbie on linux, I don't know how to use the cat utility , I mean : I transfered the corrupted files from my smartphone to my computer and I put it in /home.
But what shall I write in the shell ? I must give details : for example it is a file of german class lessons but for each file , it is complete indeed but when I listen to it, it is as if it is splited, I don't know if I am clear enough: it it as if you have your mp3 cd device that bugs when you listen to the music. Do you understand ?
If I misunderstood you then please try to explain what you mean in a different way. If you have problems to do that because English is not your native language it may be easier for you to e-mail me and explain your problem in German (since you mentioned German lessons).
Also, please remove those insults, this forum is not a place for that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.