[FFmpeg-trac] #4698(avcodec:reopened): Wrong channel layout for FLAC 3/1 channels on playback

FFmpeg trac at avcodec.org
Mon Jul 20 10:12:31 CEST 2015


#4698: Wrong channel layout for FLAC 3/1 channels on playback
-------------------------------------+------------------------------------
             Reporter:  Mango        |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:  flac         |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by Mango):

 Replying to [comment:22 cehoyos]:
 > Replying to [comment:21 Mango]:
 > > This bug report is about playing back a FLAC with the
 WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag, and not about encoding.
 >
 > That's surprising given that you wrote ''ffmpeg 2.7 outputs this error
 while encoding'' in your original report.
 >
 > Anyway: Is your issue reproducible with the following command line?
 > {{{
 > $ ffmpeg -i input out.wav
 > }}}
 > (ffmpeg is the relevant application, not ffplay or ffprobe)
 > If yes, please provide the complete, uncut console output and your input
 sample to make this a valid ticket.

 Yes, you are right. I get this error in red when encoding to FLAC (I don't
 get the error when encoding to WAV). Here is the console output:


 ----

 C:\Video>ffmpeg.exe -i "Source DTS-HDMA-3.1-sample.dts" out.flac
 ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
   built with gcc 4.9.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-av
 isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
 --enab
 le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-
 libcaca --
 enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm
 --enable-l
 ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enab
 le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --en
 able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
 --ena
 ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-
 amrwbenc
  --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
 --enabl
 e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
 --ena
 ble-decklink --enable-zlib
   libavutil      54. 27.100 / 54. 27.100
   libavcodec     56. 41.100 / 56. 41.100
   libavformat    56. 36.100 / 56. 36.100
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 16.101 /  5. 16.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.100 /  1.  2.100
   libpostproc    53.  3.100 / 53.  3.100
 Input #0, dts, from 'Source DTS-HDMA-3.1-sample.dts':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Audio: dts (DTS-HD MA), 48000 Hz, 4.0, fltp
 [flac @ 00000000047178a0] encoding as 24 bits-per-sample
 [flac @ 00000000047178a0] Channel layout not supported by Flac, output
 stream wi
 ll have incorrect channel layout.
 Output #0, flac, to 'out.flac':
   Metadata:
     encoder         : Lavf56.36.100
     WAVEFORMATEXTENSIBLE_CHANNEL_MASK: 0x107
     Stream #0:0: Audio: flac, 48000 Hz, 4.0, s32 (24 bit), 128 kb/s
     Metadata:
       encoder         : Lavc56.41.100 flac
 Stream mapping:
   Stream #0:0 -> #0:0 (dts (dca) -> flac (native))
 Press [q] to stop, [?] for help
 size=    4122kB time=00:00:12.32 bitrate=2741.0kbits/s
 video:0kB audio:4114kB subtitle:0kB other streams:0kB global headers:0kB
 muxing
 overhead: 0.197755%

 ----

 For out.flac, mediainfo reports the correct channel positions (which means
 ffmpeg has set the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag correctly):

 Channel positions : Front: L C R, Back: C

 As said above, the problem is that with ffmpeg based players, the playback
 has a wrong channel mapping as they are showing it as 2/2 instead of 3/1
 (which means the ffmpeg players are ignoring the
 WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag).

 Thanks.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4698#comment:23>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list