Maximum number of files that can be merged in SoX?

1

For anyone who has experience with the sox audio tool, what is the maximum amount (in MB) of files you have tried to merge?

So far I have merged up to 925MB worth of wav files and have not had issues, but for anything more than about 3GB, I get an error message saying "Too many files open", and the merging does not occur.

lord_missingno

Posted 2016-03-01T19:24:15.320

Reputation: 57

Answers

2

If I get it right, you give a bunch files to sox to merge at a time when you get that error. You should check the maximal open files setting for your user and it would also be worth a try to increase it. Here you can see, now mine is 1024 (note the -n which will be used to set a specific system resource setting):

$ ulimit -a | grep "open files"
open files                      (-n) 1024

but I just double it:

$ ulimit -n 2048
$ ulimit -a | grep "open files"
open files                      (-n) 2048

Now if I had suffered from the too many open files error, I would have a chance to go on. However, if this error is not passed forward from the OS by sox but it has its own limit for whatever reason, then this is not the solution.

IMPORTANT: the resource settings you specify with ulimit will be valid only in the given session and its children, in parallel shells the original limits will exist.

Gombai Sándor

Posted 2016-03-01T19:24:15.320

Reputation: 3 325

YWC, I'm glad it was so easy (could have been more cryptic). – Gombai Sándor – 2016-03-01T21:43:49.467