I have a series of wave files that I want to combine into one long mp3 and flac. I have checked each file individually, and I'm convinced that I've confirmed my previous notion that these files combined last a total of just above 12 hours.

Now, normally I've been using sox to combine the wave files, and using the result in lame and flac to create the result files, but in this instance I'm getting wrong results. A normal run creates a wave file (and resultant mp3) of just above 5 hours. I figured this might be because of a limitation in the wave headers, so I made sox output to a w64 file instead. Now both the wave and result mp3 turned out at 18+ hours. Any idea why sox is getting a wrong result here? Do I need to tell it that the input files are regular wave?

When I tried to pipe the output, like this:

sox 01.wav 02.wav -t wav - | lame - result.mp3 (or something like that)

the file turned out at only 2+ hours, while

sox 01.wav 02.wav -t raw - | lame -r -s 44.1 - result.mp3

turned out a 56 hour file.

Nevertheless, I think I'm on to something with the last command, but I might have misunderstood some sox or lame documentation. Tips?

Arve