Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Large file concatenation
#7
Short of a nice one-liner, here is a process that works for me - in Linux.

The Android drive that contains USB Audio Recorder PRO recordings is, on my machine, /dev/sdh1; I move an SD card but an MTP USB connection might also work.  I mount it to /mnt/test, copy the files (retaining timestamps) to two directories (1 and 2, each of which holds a stereo pair of four recorded tracks) in ~Desktop/RecordingWork.  sox then concatenates the files in each directory and produces a flac for each, which can then be imported to Audacity which can then save a project of four tracks.  Here, the recording is contained in three pairs of 2GB files and lesser fragments (~14GB) resulting in a pair of ~4.5GB flacs:
Code:
$ sudo mkdir -p ~/Desktop/RecordingWork/1
$ sudo mkdir -p ~/Desktop/RecordingWork/2
$ sudo mkdir -p /mnt/test

$ sudo mount /dev/sdh1 /mnt/test
$ cp -p /mnt/test/USBAudioRecorderPRO/Recordings/*_*_*_*_*_1*.wav ~/Desktop/RecordingWork/1  # -p retains timestamps
$ cp -p /mnt/test/USBAudioRecorderPRO/Recordings/*_*_*_*_*_2*.wav ~/Desktop/RecordingWork/2
$ sudo umount /mnt/test
$ cd ~/Desktop/RecordingWork
$ sox $(ls -lcrt ./1/*.wav | sed -n "s/.*:..//p") -C0 ./1/outfile_1.flac
$ sox $(ls -lcrt ./2/*.wav | sed -n "s/.*:..//p") -C0 ./2/outfile_2.flac

$ audacity ./1/outfile_1.flac ./2/outfile_2.flac

This listing is the same but shows intermediate and resulting files:
Code:
$ sudo mkdir -p ~/Desktop/RecordingWork/1
$ sudo mkdir -p ~/Desktop/RecordingWork/2
$ sudo mkdir -p /mnt/test

$ sudo mount /dev/sdh1 /mnt/test
 $ ls -l /mnt/test
      131072 Jun 26 12:39 Android
      131072 Jun 29 20:55 DCIM
      131072 Jun 26 12:52 System Volume Information
      131072 Jun 26 12:49 USBAudioRecorderPRO

 $ ls -l /mnt/test/USBAudioRecorderPRO
      131072 Jun 26 12:49 Firmware
      131072 Jul  7 15:39 Recordings

 $ ls -l /mnt/test/USBAudioRecorderPRO/Recordings
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_1aaa.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_1aa.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_1a.wav
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_1.wav
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_2aaa.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_2aa.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_2a.wav
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_2.wav

$ cp -p /mnt/test/USBAudioRecorderPRO/Recordings/*_*_*_*_*_1*.wav ~/Desktop/RecordingWork/1  # -p retains timestamps
 $ ls -lcrt ~/Desktop/RecordingWork/1  # -crt sorts chronologically
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_1.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_1a.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_1aa.wav
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_1aaa.wav

$ cp -p /mnt/test/USBAudioRecorderPRO/Recordings/*_*_*_*_*_2*.wav ~/Desktop/RecordingWork/2
 $ ls -lcrt ~/Desktop/RecordingWork/2
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_2.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_2a.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_2aa.wav
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_2aaa.wav

$ sudo umount /dev/test
$ cd ~/Desktop/RecordingWork
$ sox $(ls -lcrt ./1/*.wav | sed -n "s/.*:..//p") -C0 ./1/outfile_1.flac
 $ ls -lcrt
  4446653264 Jul  8 14:55 outfile_1.flac
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_1.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_1a.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_1aa.wav
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_1aaa.wav

$ sox $(ls -lcrt ./2/*.wav | sed -n "s/.*:..//p") -C0 ./2/outfile_2.flac
 $ ls -lcrt
  4573594185 Jul  8 14:57 outfile_2.flac
  2097393440 Jul  7 14:39 Record_2017_Jul_07_130851.459_2.wav
  2097393986 Jul  7 15:09 Record_2017_Jul_07_130851.459_2a.wav
  2097393950 Jul  7 15:39 Record_2017_Jul_07_130851.459_2aa.wav
   836466230 Jul  7 15:52 Record_2017_Jul_07_130851.459_2aaa.wav

$ audacity ./1/outfile_1.flac ./2/outfile_2.flac
 $ ls -l
        4096 Jul  8 15:20 1
        4096 Jul  8 14:55 2
     4966234 Jul  8 15:19 outfile.aup
        4096 Jul  8 15:19 outfile_data
I hope this is useful to someone.
Tom
Cape Coral
Reply


Messages In This Thread
Large file concatenation - by GTBecker - 06-28-2017, 05:32 PM
RE: Large file concatenation - by dwrae - 06-29-2017, 11:02 AM
RE: Large file concatenation - by GTBecker - 06-29-2017, 02:00 PM
RE: Large file concatenation - by GTBecker - 07-01-2017, 08:14 PM
RE: Large file concatenation - by GTBecker - 07-02-2017, 12:56 AM
RE: Large file concatenation - by GTBecker - 07-05-2017, 10:23 PM
RE: Large file concatenation - by GTBecker - 07-08-2017, 10:43 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)