HydrogenAudio

Digital Audio/Video => Movie/Multichannel audio => Topic started by: FLX90 on 2018-11-20 09:21:56

Title: qaac error with 7.1-channel ALAC/MP4
Post by: FLX90 on 2018-11-20 09:21:56
Hello,

I have an 7.1-channel audio file (ALAC/MP4) from ffmpeg (Lavf58.12.100) and want it to convert to the same but with Apple Encoder.

I use this command:
Code: [Select]
qaac64.exe --verbose -A audio2.m4a -o iTunes\audio2.m4a

qaac 2.67, CoreAudioToolbox 7.10.9.0

audio2.m4a
ERROR: Channel layout not supported

Unfortunately I get the error message above.

Here are the meta-information from audio2.m4a:
Code: [Select]
General
Complete name                            : C:\Users\Felix\Downloads\Lossless\Tools\qaac_2.67\x64\audio2.m4a
Format                                   : MPEG-4
Format profile                           : Apple audio with iTunes info
Codec ID                                 : M4A  (isom/iso2)
File size                                : 4.30 GiB
Duration                                 : 2 h 24 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 4 263 kb/s
Writing application                      : Lavf58.12.100

Audio
ID                                       : 1
Format                                   : ALAC
Codec ID                                 : alac
Codec ID/Info                            : Apple Lossless Audio Codec
Duration                                 : 2 h 24 min
Duration_LastFrame                       : -74 ms
Bit rate mode                            : Variable
Bit rate                                 : 4 262 kb/s
Nominal bit rate                         : 9 216 kb/s
Channel(s)                               : 8 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 4.30 GiB (100%)
Default                                  : Yes
Alternate group                          : 1

The format should be supported:
Code: [Select]
qaac64.exe --format

LC 48000Hz 7.1 (C Lc Rc L R Ls Rs LFE) -- 224,256,288,320,384,448,512,576,640,768,960


Afconvert (v2.0) on my Mac is doing fine:
Code: [Select]
afconvert -v -d 0 -f m4af audio2.m4a

Formats:
  Input file     8 ch,  48000 Hz, 'alac' (0x00000003) from 24-bit source, 4096 frames/packet
  Output file    8 ch,  48000 Hz, 'alac' (0x00000003) from 24-bit source, 4096 frames/packet
Optimizing ./audio2-1.m4a... done
Output file: audio2-1.m4a, 416137760 frames


I thought qaac and afconvert are using the same encoder?

So I don't understand what I see.

Can you help me.


Best regards,
Felix
Title: Re: qaac error with 7.1-channel ALAC/MP4
Post by: nu774 on 2018-11-20 13:47:43
Fixed in 2.68:
https://github.com/nu774/qaac/releases/tag/v2.68

This was due to:

(The following is what ALAC spec says: https://github.com/macosforge/alac/blob/master/ALACMagicCookieDescription.txt )
Quote
If the channel layout is absent from the cookie, then the following assumptions are made:
1 channel - mono
2 channels - stereo in left, right order
> 2 channels - no specific channel designation or role.

In v2.68, qaac picks up more appropriate channel layout for ALAC in MP4 when it is absent in the input.
Title: Re: qaac error with 7.1-channel ALAC/MP4
Post by: FLX90 on 2018-11-20 17:02:12
Thank you, works like a charm :)