Re: Using sox as an alternative to mp3wrap to losslessly concat a dir full of mp3s?

fmiser <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <20170719165417.7edbccee@Daniel>
> Jonathan wrote:

> I wanted to combine all mp3 files into one in each directory
> using Ubuntu command line.
> 
> I started using a thing called MP3Wrap
> (https://sourceforge.net/projects/mp3wrap/)

> except it turns out to horribly break id3 tags, doesn't
> recognise vbr properly etc.
> 
> Is there are way of losslessly concatenating mp3 files with sox,
> or is it a job for another tool?

SoX decodes as the first step - so it will not losslessly
concatenate MP3 files.

ffmeg can do it, though.  Something like:
ffmpeg -i "concat:file1.mp3|file2.mp3" -c copy output.mp3

or create a text file with one source file per line like this:
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

 and this command:
ffmpeg -i list-of-files.text -c copy output.mp3

> (The ability to unwrap the combined mp3 into individual files
> isn't a requirement, but it would be a nice thing if possible!)

If you document the timing (length) of the source files, mp3split
should be able to be used to separate them again.  But it is not a
built-in feature like it is with mp3wrap.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.