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

FFmpeg trac at avcodec.org
Mon Jul 20 04:21:11 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            |
-------------------------------------+------------------------------------
Changes (by Mango):

 * status:  closed => reopened
 * resolution:  needs_more_info =>


Comment:

 Replying to [comment:20 cehoyos]:
 > Replying to [comment:18 Mango]:
 > > Replying to [comment:17 cehoyos]:
 > > > Replying to [ticket:4698 Mango]:
 > > > > this layout has been supported by FLAC for the past 9 years, since
 since FLAC 1.1.3
 > > >
 > > > Please reopen this ticket if you can explain how I can reproduce
 above claim (I failed).
 > >
 > > I have already explained it above.
 > >
 > > Since FLAC 1.1.3 (27-Nov-2006) (read the changelog, above) FLAC
 supports all the channel layouts that are not supported by default using
 the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag.
 >
 > Sorry, you misunderstand: This isn't about the Changelog.
 > Please explain how such a file can be encoded with the flac command line
 utility.


 This bug report is about playing back a FLAC with the
 WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag, and not about encoding.

 Encoding with ffmpeg works fine (it sets the
 WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag). You can see the above attached
 (link) of the DTS-HDMA and the resulting FLAC encoded with ffmpeg.

 But to answer your question "Please explain how such a file can be encoded
 with the flac command line utility.":

 You feed the FLAC encoder a wav and when there is no corresponding default
 FLAC channel mapping it will save the WAVEFORMATEXTENSIBLE_CHANNEL_MASK
 tag. (again, this is also in the changelog above).

 This is also what eac3to and ffmpeg do.

 If you open the file with mediainfo, you will see the
 Channel positions : Front: L C R, Back: C

 In the same way,
 ffmpeg.exe -i "FLAC 3.1-sample.mkv" out.wav
 will again preserve the channel layout.

 So: encoding works fine.

 The problem is with playback. The ffmpeg based playback tools give 2/2
 instead of 3/1 as channel layout. ffplay shows 4.0 instead of 3/1.

 Please confirm that:

 1. ffplay (and the ffmpeg based tools) will play the correct channel
 layout (=WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag).

 2. and please have ffplay display the correct channel layout instead of
 "Stream #0:0: Audio: flac, 48000 Hz, 4.0, s32 (24 bit) (default)" , have
 it show 3/1 and even better, also "Channel positions : Front: L C R, Back:
 C" as mediainfo does.

 With this information we can then confirm that playback will have the
 correct channel layout.

 Thanks.

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


More information about the FFmpeg-trac mailing list