2

I have about 50x 1 hour long flac files (audiobooks), each of which I need to encode into (approx.) 10 minute long segments at a convenient silence point (+ or - 30 seconds either side of 10 minutes). The last segment can be shorter than 10 minutes (for those flac files which are not exactly an hour).

Grateful for any suggestions of a command line for each flac, which I can then put into a bash script. Thanks.

andrew.46
  • 39,359
abssorb
  • 55
  • 2
  • 7

1 Answers1

1

Just to let you know: If you have cuesheets to those files you can split them by the information provided by the cuesheet file.


I don't know about GUI tools for this job, but I used mp3splt for such a task in the past. You could convert all those files into MP3 or Vorbis (oggsplt) and then feed them to mp3splt.

Here is an example:

$ mp3splt -rS 5 hoaxcast122_versailles.mp3 
mp3splt 2.4.2 (13/05/12) - using libmp3splt 0.7.2
    Matteo Trotta <mtrotta AT users.sourceforge.net>
    Alexandru Munteanu <io_fx AT yahoo.fr>
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
 Processing file 'hoaxcast122_versailles.mp3' ...
 info: file matches the plugin 'mp3 (libmad)'
 info: found Xing or Info header. Switching to frame mode... 
 info: MPEG 1 Layer 3 - 44100 Hz - Mono - FRAME MODE - Total time: 41m.01s
 info: starting 'split in equal tracks' mode
   File "hoaxcast122_versailles_00m_00s__08m_12s_39h.mp3" created           
   File "hoaxcast122_versailles_08m_12s_39h__16m_24s_78h.mp3" created       
   File "hoaxcast122_versailles_16m_24s_78h__24m_37s_17h.mp3" created       
   File "hoaxcast122_versailles_24m_37s_17h__32m_49s_56h.mp3" created       
   File "hoaxcast122_versailles_32m_49s_56h__41m_01s_94h.mp3" created       
 Processed 94247 frames - Sync errors: 0
 split in equal tracks ok

The parameter r stands for trim using silence detection and S stands for split into equal time tracks or better said parts (5 in this case, which would result in 10 minutes per file in your case).

You could create a project folder containing the converted mp3 files and run the following bash script to have all .mp3 files split with the command:

for file in $(ls *.mp3); do mp3splt -rS 5 $file; done

As far as I know the files are not re-encoded, just split and re-wrapped into proper container.

LiveWireBT
  • 29,597