I'm at a loss here. I have a 3-channel source I'd like to encode, but the default settings produce a 5-channel file with the extra 2 channel being silent. For some reason, inserting --channels=3 into the command line (C:\Program Files (x86)\foobar2000\flac.exe" --channels=3 -8 - -o filenamehere) makes the whole thing go 'Conversion failed: The encoder has terminated prematurely with code 1 (0x00000001); please re-check parameters'
Any ideas what I might be doing wrong?
What kind of channel config does your source have? I just tried encoding a three-channel source and the encoded FLAC had the same amount of channels. Didn't require any configuration.
I dunno. I guess it's fake 5-channel, then. Any command line arguments to mask the other two channels while encoding?
You don't have to guess, right click the source file and check the details tab of properties. It shows the number of channels and usually the channel configuration. If you want to strip some channels away you can use Matrix Mixer DSP (http://skipyrich.com/w/index.php/Foobar2000:Matrix_Mixer).
Thanks a lot, Case!
Ah, well, now it turns out Channel Mixer DSP can't convert 3 to 5.1.
Why not keep the two empty channels?
I assume the 3ch audio is left, right and centre? FLAC won't tolerate anything but the standard SMPTE channel layouts (https://xiph.org/flac/format.html#frame_header) by default. If you send it anything else it'll probably spit the dummy.
There's an undocumented command line option to prevent flac from being too stubborn to accept non-SMPTE layouts, although I often use ffmpeg for flac encoding and it'll accept other layouts by default.
For the official flac encoder:
That mightn't be your problem, but I thought I'd mention it, just in case.
Actually, playing a 3- and a fake 5-channel file sounds exactly the same: the two back channels are just silent. And that's the pity, I like to have a bit of front in the back.