|
From: Jan S. <ha...@st...> - 2015-06-09 15:55:24
|
On Jun 09 03:28:49, ry...@ju... wrote: > Hi folks, > I have a dir which mp3s are regularly added to one at a time. Each time an > mp3 is added, I would like to copy it onto the end of another file while > keeping the separate files. > > Ex: > 1.mp3 shows up > - add to end of master.mp3 > 2.mp3 shows up > - add to end of master.mp3 > 3.mp3 shows up > - add to end of master.mp3 Why do you need to do that, and for how long? Surely this will produce a hard to maintain huge audio file (which will outgrow your disk one day). Is the interval predictable, e.g. does the new file appear every morning? Every whole hour? Every ten seconds? Are the new files always names sequentially like in your example, so that the new file is always named N.mp3 (or NNNNNNN.mp3)? Are the coming files always in the same format? Do you also need master.mp3 to be in that same format? Do the individual files need to stay in that same directory, after they are appended to the master? > Note that the files are added to the dir *one at a time*. So the first to > show up is 1.mp3, which I would then run `sox 1.mp3 master.mp3` and the > content of 1.mp3 would be copied to master.mp3. But then 2.mp3 shows up and > I run `sox 2.mp3 master.mp3` and it overwrites master.mp3 with only the > content of 2.mp3. Well, that's exactly what the command tells SoX to do. > Is there any way to simply add each new file (one at a time, as they show > up) to the end of master.mp3 *without* overwriting the previous content of > the other mp3 files? Yes. But reencoding mp3's over and over will gradually degrade the sound quality. Let's see the big picture first. |