[FFmpeg-user] FFMPEG for encoding to Multichannel ALAC

Moritz Barsnick barsnick at gmx.net
Mon Jan 19 14:48:54 CET 2015


Hi Rashed,

On Mon, Jan 19, 2015 at 17:53:44 +0530, Rashed wrote:
> C:\AudioTools\ALAC>ffmpeg -i pcmfile_48k_16bit_5.1.wav -acodec alac -ac 6 out.m4a

What happens if you omit "-ac 6"?

> Output #0, ipod, to 'out.m4a':
>   Metadata:
>     encoder         : Lavf56.19.100
>     Stream #0:0: Audio: alac (alac / 0x63616C61), 48000 Hz, 5.1, s16p, 128 kb/s

This looks correct.

> Channel(s)                               : 2 channels

This doesn't.

First of all, please inspect the resulting file out.m4a with "ffprobe"
or "ffmpeg -i". There may be a mismatch between the file header and the
actual stream. (I recall this having happened with mono versus stereo
MPEG audio.)

Secondly, please try this. Mediainfo and ffprobe both properly report 6
channels in my resulting file:

$ ffmpeg -f lavfi -i "aevalsrc=sin(440*2*PI*t):s=48000:c=5.1" -c:a alac -t 10 out.m4a

(And please inspect the resulting file.)

The only other difference I can see is that your input file is reported
as "6" channels instead of "5.1", with the additional message:
> Guessed Channel Layout for  Input Stream #0.0 : 5.1
which I can't reproduce, but which seems correct for this purpose
anyway.

Moritz


More information about the ffmpeg-user mailing list