Re: which is better / more effective

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glenn English <ghe2001@xxxxxxxxx> writes:

> I'm getting ready to ask sox to do several things: EQ, compression,
> normalization, speed change, etc. I see on the web, suggestions of
> several different ways to do this: make one call to sox with several
> switches, make several calls to sox with one switch, or pipe those
> several calls together.
>
> Which of these works best? Does it matter? Does sox just figure all
> this out and fork several times if it needs to? (multi-core CPU and
> lots of RAM on Debian Linux, and the file is ~1G FLAC, if any of that
> makes any difference)

Sox has very limited support for multi-processing built-in, and it
doesn't work very well.  For a long effects chain, you'll get better
throughput by piping multiple processes.

If you have a single command like this:

  sox in.flac out.flac effect1 effect2 effect3

it can be split up like this:

  sox in.flac -p effect1 | sox -p -p effect2 | sox -p out.flac effect3

The end result should be exactly the same.

It probably doesn't make sense to put light-weight effects in a separate
command as the extra inter-process copying could easily negate any
gains.

-- 
Måns Rullgård

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux