How to combine files into a RAR file?

How can I combine a number of (timestamped) wav files into one long file?

  • I have a number of wav files, timestamped as hhmmss.wav and would like to combine them into a single file with all of the clips at their correct (relative) positions. Does anyone have any ideas of how to do this? Detail: I am training to be an Air Traffic Controller, and we are able to record our simulator exercises to listen back to later. The bad: It has its own software player, so needs a computer to play back. The good: The recordings are stored as a series of WAV files, named as e.g. "142004.wav", for a transmission at 14:20:04. It is possible that some of these will overlap. I would like to use these timestamps to combine the WAVs into a single file, which could then be encoded as MP3 or similar for playback on other devices. I've looked briefly into Python options, and a little at audacity. Does anyone have any ideas of how to do this (relatively) easily. I'm wary of overengineering a solution and making it more effort than it's worth. Thanks for any help.

  • Answer:

    I think you can do this with avisynth, although i've never tried it. It basically is a non linear video editing solution that's 100% scriptable. Don't know if it can produce wav files, but you can always convert any video output it creates with ffmpeg.

d7415 at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

3mendo

This *might* work, and is simple enough to not pass up trying atleast once. From a CMD prompt while in the WAV directory: copy *.wav final.wav Usually it will copy in alphabetical order (technique is used often for splitting large mpg/avi files...though I've never tried it with wav)

samsara

samsara: Looks like the wav headers don't allow concatenation like that. 3mendo: Just had a look at sox. I'm not sure it will put them in the right place (but I may just need to look harder) but it should at least be able to join them up. Looking at avisynth now....

d7415

What happens if there are multiple audio streams applicable for a certain time span? Do you mind hearing them simultaneously? If not, sox and audacity should do the trick. Suppose your first WAV is 093054.wav i.e. 09:30:54 AM then for each of your WAV files, you need to run sox HHMMSS.wav HHMMSS-padded.wav pad {time offset from 09:30:54 in seconds} i.e., for 104553.wav, it should be sox 104553.wav 104553-padded.wav pad 4499 Once done, load all files in Audacity at once, downmix and export.

Gyan

Ah yes, of course, sorry about that. Ok here's another method that should work. Grab a copy of http://www.foobar2000.org/download and load all of your wavs into a playlist. Highlight them, and right-click/convert/... From there you can change the destination to a single output file.

samsara

samsara: Good thinking, but sox does that nicely (now that I've been pointed that way!) and is easier for me as I'm in Linux most of the time. Thanks though! Gyan: You've read my mind - I'm just running a script I've bodged together to do that, and I'll be running it through Audacity when it's done. That should work fine. I don't suppose anyone knows how to do the combining/downmixing from the command line? Just a thought. It'd be nice to be able to combine all of this into one script.... *goes looking into the sox documentation again*

d7415

Update: "merge" command looks promising for a start....

d7415

Convert to mp3 and then concatenate the files. On Macs and Linux you can just cat filenames > singlefile

zippy

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.