Opened 8 years ago

Last modified 6 years ago

#6207 new defect

Wrong mkv codec ID for ac3 with bitstream_id > 8

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mkv ac3
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I will attached two mkv samples with codec ID A_AC3/BSID9 and A_AC3/BSID10 that get an incorrect codec ID A_AC3 when remuxed with FFmpeg.

$ ffmpeg -i ac3bsid9.mkv -acodec copy out.mkv
ffmpeg version N-83691-g7f62368 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 47.100 / 55. 47.100
  libavcodec     57. 81.100 / 57. 81.100
  libavformat    57. 66.102 / 57. 66.102
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'ac3bsid9.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.5
    creation_time   : 2017-02-28T20:08:32.000000Z
  Duration: 00:00:01.02, start: 0.000000, bitrate: 141 kb/s
    Stream #0:0: Audio: ac3, 24000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      BPS             : 96000
      BPS-eng         : 96000
      DURATION        : 00:00:01.024000705
      DURATION-eng    : 00:00:01.024000705
      NUMBER_OF_FRAMES: 16
      NUMBER_OF_FRAMES-eng: 16
      NUMBER_OF_BYTES : 12288
      NUMBER_OF_BYTES-eng: 12288
      _STATISTICS_WRITING_APP: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-28 20:08:32
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-28 20:08:32
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, matroska, to 'out.mkv':
  Metadata:
    encoder         : Lavf57.66.102
    Stream #0:0: Audio: ac3 ([0] [0][0] / 0x2000), 24000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      BPS             : 96000
      BPS-eng         : 96000
      DURATION        : 00:00:01.024000705
      DURATION-eng    : 00:00:01.024000705
      NUMBER_OF_FRAMES: 16
      NUMBER_OF_FRAMES-eng: 16
      NUMBER_OF_BYTES : 12288
      NUMBER_OF_BYTES-eng: 12288
      _STATISTICS_WRITING_APP: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-28 20:08:32
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-28 20:08:32
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      13kB time=00:00:00.96 bitrate= 114.5kbits/s speed=3.69e+03x
video:0kB audio:12kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 11.832683%
$ ffmpeg -i ac3bsid10.mkv -acodec copy out.mkv
ffmpeg version N-83691-g7f62368 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 47.100 / 55. 47.100
  libavcodec     57. 81.100 / 57. 81.100
  libavformat    57. 66.102 / 57. 66.102
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'ac3bsid10.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.5
    creation_time   : 2017-02-28T20:08:01.000000Z
  Duration: 00:00:01.15, start: 0.000000, bitrate: 136 kb/s
    Stream #0:0: Audio: ac3, 8000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      BPS             : 96083
      BPS-eng         : 96083
      DURATION        : 00:00:01.151990784
      DURATION-eng    : 00:00:01.151990784
      NUMBER_OF_FRAMES: 6
      NUMBER_OF_FRAMES-eng: 6
      NUMBER_OF_BYTES : 13824
      NUMBER_OF_BYTES-eng: 13824
      _STATISTICS_WRITING_APP: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-28 20:08:01
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-28 20:08:01
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, matroska, to 'out.mkv':
  Metadata:
    encoder         : Lavf57.66.102
    Stream #0:0: Audio: ac3 ([0] [0][0] / 0x2000), 8000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      BPS             : 96083
      BPS-eng         : 96083
      DURATION        : 00:00:01.151990784
      DURATION-eng    : 00:00:01.151990784
      NUMBER_OF_FRAMES: 6
      NUMBER_OF_FRAMES-eng: 6
      NUMBER_OF_BYTES : 13824
      NUMBER_OF_BYTES-eng: 13824
      _STATISTICS_WRITING_APP: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.8.0 ('Kuglblids') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2017-02-28 20:08:01
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-02-28 20:08:01
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      15kB time=00:00:00.96 bitrate= 126.7kbits/s speed=5.03e+03x
video:0kB audio:14kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.997107%

Attachments (2)

ac3bsid9.mkv (17.7 KB ) - added by Carl Eugen Hoyos 8 years ago.
ac3bsid10.mkv (19.2 KB ) - added by Carl Eugen Hoyos 8 years ago.

Download all attachments as: .zip

Change History (4)

by Carl Eugen Hoyos, 8 years ago

Attachment: ac3bsid9.mkv added

by Carl Eugen Hoyos, 8 years ago

Attachment: ac3bsid10.mkv added

comment:1 by Elon Musk, 6 years ago

And why it is wrong?

comment:2 by Carl Eugen Hoyos, 6 years ago

It's different from the specified codec ID.

Note: See TracTickets for help on using tickets.