HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: elenhil on 2019-03-11 19:58:12

Title: help with 3-channel FLAC convesion
Post by: elenhil on 2019-03-11 19:58:12
Hi guys!

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?
Title: Re: help with 3-channel FLAC convesion
Post by: Case on 2019-03-11 20:19:37
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.
Title: Re: help with 3-channel FLAC convesion
Post by: elenhil on 2019-03-11 20:22:45
I dunno. I guess it's fake 5-channel, then. Any command line arguments to mask the other two channels while encoding?
Title: Re: help with 3-channel FLAC convesion
Post by: Case on 2019-03-11 20:34:51
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).
Title: Re: help with 3-channel FLAC convesion
Post by: elenhil on 2019-03-11 20:43:49
Thanks a lot, Case!
Title: Re: help with 3-channel FLAC convesion
Post by: elenhil on 2019-03-11 21:03:27
Ah, well, now it turns out Channel Mixer DSP can't convert 3 to 5.1.
Title: Re: help with 3-channel FLAC convesion
Post by: yetanotherid on 2019-03-12 00:45:18
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:
--channel-map=none

That mightn't be your problem, but I thought I'd mention it, just in case.
Title: Re: help with 3-channel FLAC convesion
Post by: elenhil on 2019-03-12 05:57:40
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.