Find the answer to your Linux question:
Results 1 to 3 of 3
A little help please.. I decided that I should do a "cat * >> newfile.wav" because I wanted the whole cd in one major file. I didn't have audacity ( ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Feb 2003
    Location
    Norway, Asker
    Posts
    267

    putting files together with cat turs out to make a mess...


    A little help please..

    I decided that I should do a "cat * >> newfile.wav" because I wanted the whole cd in one major file. I didn't have audacity ( wich I think does this job in a more "nicer" way... ) at hand, so I hoped that cat would do the job. And, yes. It worked. The whole file is in about an hour +/-. Mplayer can play the whole file, but xmms and oggenc thinks that the file is 1:30 seconds.

    Why? When mplayer sees the whole file, why doesn't xmms and oggenc? Oh well, maybe I will do it in a more "gentle" way next time.


  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    You can't really cat wav files together, since that will create duplicate headers and stuff. MPlayer probably sees it becuase it ignores the header and just uses the file size instead, while xmms and oggenc might actually use the information in the header. Do this instead:
    Code:
    (for file in *; do sox "$file" -t .raw -r 44100 -sw -c 2 -; done) | sox -t .raw -r 44100 -sw -c 2 - -t .wav newfile.wav
    I believe that should work better. The files get concatenated in raw format over the pipe and then converted back into wav.

  3. #3
    Linux User
    Join Date
    Feb 2003
    Location
    Norway, Asker
    Posts
    267
    Thanks! You're the man!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •