I am trying to concatenate 15 wav audio files, recorded as 24-bit, 96kHz, linear PCM. I have run experiments with ffmpeg, shntool, and sox, with differing results.
The files were created by a Zoom H2n recorder, which split the ~15 hours of continuous recording into several files (in real time) to accommodate the SD memory card spec.
The first 14 files are each 2,147,385,344 bytes (1:02:08.04 in time) and the last file is 1,838,248,046 bytes (53:11.35 in time). The original files report a bitrate of 4,608 kb/s (using ffmpeg -i).
Create a text file with the filenames:
printf "file '%s'\n" ./*.WAV > mylist.txt
Concatenate the files:
ffmpeg -f concat -i mylist.txt -c copy output-ffmpeg.wav
This generates a file that is 31,901,151,444 bytes, but reports as only 53:08 in time. ffmpeg -i reports a bitrate of 80,049 kb/s, much higher than the original 4,608 kb/s.
Join the files:
shntool join -r none 01.wav 02.wav [etc]
This generates a file that is 31,901,151,386 bytes -- different than the ffmpeg concatenate -- but also reports as 53:08.16 in time. Again, ffmpeg -i reports a bitrate of 80,049 kb/s, much higher than the original 4,608 kb/s.
Concatenate the files:
sox 01.wav 02.wav [etc] output-sox.wav
This generates a file that is 31,901,151,422 bytes -- different than both ffmpeg and shntool -- but reports as 01:02:08.26 in time. ffmpeg -i reports a bitrate of 68,452 kb/s, much higher than the original 4,608 kb/s but different than ffmpeg or shntool conversions.
1) How can I make the file reflect it's actual time? Bringing this 31 Gb / ~15 hour recording into audio software that thinks it's only ~53 min long is likely to be problematic.
2) Why do the three concatenations differ in file size? Is there a flag or setting I should be using to, for example, pad the length for some reason? Are the differing file sizes a clue as to why the files think they're only 53:08 or 01:02:08 long?
When I first saw the 53:08 I thought, Ah, it's writing the time length of the final file into the header -- but the time length of the final file is actually 53:11. When I first saw the 01:02:08.26 I thought, Ah, it's writing the time length of the FIRST file, but sadly, no (close, but not exact).
It seems like my best clue is the incorrect (?) bitrate of the concatenated files. I'm surprised a stream copy or file concatenation changes this. Perhaps it's just a metadata error?