sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Glenn English <ghe2001@gmail.com>
Cc: sox-users@lists.sourceforge.net
Subject: Re: which is better / more effective
Date: Sun, 26 Nov 2017 12:36:58 +0000	[thread overview]
Message-ID: <yw1xy3mtw711.fsf@mansr.com> (raw)
In-Reply-To: <CAKS_MTvb6UWpTMj=tzSpGVoexdTcthP+=q50qGLNwZbzoJDtUQ@mail.gmail.com> (Glenn English's message of "Sat, 25 Nov 2017 18:50:39 +0000")

Glenn English <ghe2001@gmail.com> 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  parent reply	other threads:[~2017-11-26 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-25 18:50 which is better / more effective Glenn English
2017-11-25 19:28 ` James Trammell
2017-11-26 12:04   ` Måns Rullgård
2017-11-26 12:36 ` Måns Rullgård [this message]
2017-12-01 18:03   ` Glenn English

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xy3mtw711.fsf@mansr.com \
    --to=sox-users@lists.sourceforge.net \
    --cc=ghe2001@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).