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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Ah, further down the manpage, it goes into more detail on trim:
trim start [ length ]
Trim can trim off unwanted audio data from the
beginning and end of the audio file. Audio sam-
ples are not sent to the output stream until the
start location is reached.
The optional length parameter tells the number
of samples to output after the start sample and
is used to trim off the back side of the audio
data. Using a value of 0 for the start parame-
ter will allow trimming off the back side only.
Both options can be specified using either an
amount of time and an exact count of samples.
The format for specifying lengths in time is
hh:mm:ss.frac. A start value of 1:30.5 will not
start until 1 minute, thirty and 1/2 seconds
into the audio data. The format for specifying
sample counts is the number of samples with the
letter 's' appended to it. A value of 8000s
will wait until 8000 samples are read before
starting to process audio data.
I saw that trim option, but that cannot save me time:
I would like to automatise splitting up my albums to tracks (I would like to archive my tape collection).
If I would use the trim option of sox, I should still open each album and record where the track boundaries are. Opening an album with glame takes 5 through 10 minutes for me, while I just sit and watch the progress bar.
Then I should start sox, which could split only one track in one turn, so I should repeat this for each track (or maybe I could write a shell to automatise the process, but it does not worth time: the whole thing would be hell slow)
I thought there will be plenty of utils to do this thing, as splitting up an album to tracks did not seem so hard for a computer program to do based on the silent periods between the tracks.
In spite, when I google searched the net I could find nothing useful. Only one util called 'gramofile' can do the trick, but that is very slow: lame is faster to prepare an mp3 than gramofile to split up the same wav. Besides it does not have a command line interface, so one just have to sit and watch the progress bar endlessly.
Sorry, I forgot to mention that tape2mp3 did not compile (although its libsndfile dependency was satisfied):
trackscan.c: In function `main':
trackscan.c:37: warning: implicit declaration of function `sf_open_read'
trackscan.c:37: warning: assignment makes pointer from integer without a cast
trackscan.c:89: structure has no member named `samples'
trackscan.c:90: structure has no member named `samples'
make: *** [trackscan.o] Error 1
make: *** [stuff] Error 2
The others on the first 10 googled pages were either for windows or had no command line interface or had no automatic track splitting.
Tape2mp3 now works. It was the old dependency issue:
1. It did not compile with the new, 1.0.3 version of libsndfile
2. It compiled with the old, 0.0.20 version of libsndfile (coming in source), but it did not work
3. It complied and worked with the libsndfile rpm from SuSe ftp.
Tape2mp3 now works and is very fast: it splits the tracks of an album in 30s. (Previously it took 5-10 minutes just to open them in glame).
For those who read this thread and want to archive tapes I can also recommend an other program called "normalize", which normalizes the volume of wav files (even faster).
So, my great assisstants for archiving tapes:
arecord (recording an album in one turn into wav)
+ tape2mp3 (splitting to tracks)
+ normalize (normalizing volume)
+ lame (mp3 encoding).
All these are command line programs, so everything (except recording) can be fully automatized with a small script so that no user interaction is needed.
In practice, I had to make an important modification in the tools used:
Replaced arecord with wavrec as the wav recording tool.
Reason: arecord (or, at least its version 0.5.10 included with SuSe 7.3) seems to be buggy when preparing the wav header. This resulted in tape2mp3 splitting the album at the wrong places.
(The error of arecord was not noticed so far, since glame, which I had used as the editor, seemed to automatically correct it even without an error message)