Discussion:
[Flac] Way to decode specific channel(s) flac --decode?
J.B. Nicholson-Owens
2014-10-01 00:09:26 UTC
Permalink
Is there a way to decode user-specified channel(s) using the flac
command-line utility?

I tried:

$ flac --decode --output-name=1.wav --channels=1 input.flac
ERROR: --channels not allowed with --decode
Type "flac" for a usage summary or "flac --help" for all options

It appears that using the --channels option is simply disallowed with
--decode, or maybe I'm totally misusing --channels without realizing it
(in which case I welcome correction).

Thanks for your help.
Martijn van Beurden
2014-10-01 05:26:34 UTC
Permalink
Post by J.B. Nicholson-Owens
Is there a way to decode user-specified channel(s) using the flac
command-line utility?
No, there is not. To make sure the encoding and decoding
processes are lossless, there are no switches like these. You
will have to use another program, like SoX, to do this.
J.B. Nicholson-Owens
2014-10-01 22:20:14 UTC
Permalink
Post by Martijn van Beurden
No, there is not. To make sure the encoding and decoding
processes are lossless, there are no switches like these. You
will have to use another program, like SoX, to do this.
I was not aware this behavior was considered lossy and I didn't know
that only lossless encoding and decoding was a goal. Specifically, I
thought extracting only some channels from a FLAC file would be okay to
expect flac to do given the other lossy encoding and decoding options
already in flac such as --skip (to skip over samples) and --until (for
stopping at a given sample) which each allow extracting only some
samples, and --apply-replaygain-which-is-not-lossless. None of these
options are marked as deprecated in the documentation and two of them
aren't marked as lossy.
Martijn van Beurden
2014-10-02 17:11:26 UTC
Permalink
Post by J.B. Nicholson-Owens
such as --skip (to skip over samples) and --until (for
stopping at a given sample)
You're completely right, and I didn't think of those when I
wrote the mail. That doesn't change the fact that it is not
possible though ;)

Loading...