Discussion:
[SoX-users] Concatenate multiple different-format mp3 to one compressed mp3 file?
Jonathan H
2016-09-15 13:29:55 UTC
Permalink
Basically: up to 20 input files in one directory, some may be stereo,
some mono, some at different bitrates OR FREQUENCIES, all will be mp3.

I'd like the output file to be a mono mp4 file, optimized for speech
and size, but able to handle occasional music.

All the guides I've found don't seem to handle the case where some
files might be 44.1 and some might be 22Khz.

(Bonus - same as above but with additional mp4 (m4a) output of
possible!. Oh, and normalizing all the tracks to about the same ideal
db if possible?!?)

Thank you.

Sorry, I've looked, I really have. Maybe I'm not using the right
search term, but I've google it, I promise!

------------------------------------------------------------------------------
Jan Stary
2016-09-15 17:09:37 UTC
Permalink
Post by Jonathan H
Basically: up to 20 input files in one directory, some may be stereo,
some mono, some at different bitrates OR FREQUENCIES, all will be mp3.
I'd like the output file to be a mono mp4 file, optimized for speech
and size, but able to handle occasional music.
Do you mean mp3 (as opposed to mp4)?

This seems to be a scripting excercise
rather than a SoX problem. Something like

for f in *.mp3 ; do sox -c 1 -r 48000 -b 16 $f out.$f.wav remix - ; done
sox out.*.wav output.mp3

Obviously, replace the format parameters
with what you want to have.
Post by Jonathan H
All the guides I've found don't seem to handle the case where some
files might be 44.1 and some might be 22Khz.
sox -r

The manpage is better than "all the guides".
Post by Jonathan H
(Bonus - same as above but with additional mp4 (m4a) output of
possible!. Oh, and normalizing all the tracks to about the same ideal
db if possible?!?)
SoX does not produce mp4 or m4a files.
See the norm effect for normalization.
Post by Jonathan H
Sorry, I've looked, I really have. Maybe I'm not using the right
search term, but I've google it, I promise!
man sox

Jan


------------------------------------------------------------------------------
Loading...