Opened 4 months ago

Last modified 3 months ago

#7058 open defect

loud aac encoder artefact

Reported by: nol2ter Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: aac regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
AAC At 00:59, the sound goes down.

How to reproduce #first:

% ffmpeg.exe -i 59s_sound_falls_original.flac -y -c:a aac -b:a 320k -ar 44100 -movflags +faststart -map 0:a -map_metadata -1 -report 59s_sound_falls.m4a
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enab
le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enabl
e-libspeex --enable-libxvid --enable-libmfx --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, flac, from '59s_sound_falls_original.flac':
  Metadata:
    TITLE           : *deleted
    ARTIST          : *deleted
    ALBUMTITLE      : *deleted
    COMMENT         : *deleted
  Duration: 00:04:31.43, start: 0.000000, bitrate: 1046 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to '59s_sound_falls.m4a':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp (16 bit), 320 kb/s
    Metadata:
      encoder         : Lavc57.107.100 aac
[ipod @ 00000000004d6b40] Starting second pass: moving the moov atom to the beginning of the file
size=   10796kB time=00:04:31.44 bitrate= 325.8kbits/s speed=21.1x
video:0kB audio:10749kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.433493%
[aac @ 00000000004abac0] Qavg: 3600.476

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (5)

comment:1 Changed 4 months ago by cehoyos

  • Keywords sound falls removed
  • Version changed from 3.4 to unspecified

Please provide the input file.

comment:3 Changed 3 months ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords aac regression added
  • Priority changed from normal to important
  • Summary changed from FLAC to AAC sound falls to loud aac encoder artefact
  • Version changed from unspecified to git-master

Strangest bug ever, thank you!

I believe this is a regression since 8005b6de4f88c9e3739a3a4ceda4288804788df9
For the original command line, the bug depends on strlen(LIBAVCODEC_IDENT), explaining why it was a regression since 70143a3954e1c4412efb2bf1a3a818adea2d3abf fixed by 36c85d6e773d51af1d084fb15ad89d9acc5dd893 but the issue is also reproducible without writing bitstream info:

$ ffmpeg -i 59s_sound_falls_original.flac -b:a 320k -flags +bitexact -aac_coder twoloop -t 65 out.aac
ffmpeg version N-90232-g0645698 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl
  libavutil      56.  8.100 / 56.  8.100
  libavcodec     58. 13.102 / 58. 13.102
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, flac, from '59s_sound_falls_original.flac':
  Metadata:
    TITLE           : Clarity
    ARTIST          : Zedd, Foxes
    ALBUMTITLE      : Clarity
    COMMENT         : 00602537547067_1_5;0bfaa24dc0cb300acd9f604b3b5f261b
  Duration: 00:04:31.43, start: 0.000000, bitrate: 1046 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> aac (native))
Press [q] to stop, [?] for help
[adts @ 0x27d3140] The AVFormatContext is not in set to bitexact mode, only the AVCodecContext. If this is not intended, set AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.
Output #0, adts, to 'out.aac':
  Metadata:
    TITLE           : Clarity
    ARTIST          : Zedd, Foxes
    ALBUMTITLE      : Clarity
    COMMENT         : 00602537547067_1_5;0bfaa24dc0cb300acd9f604b3b5f261b
    encoder         : Lavf58.10.100
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp (16 bit), 320 kb/s
    Metadata:
      encoder         : Lavc aac
size=    2534kB time=00:01:05.01 bitrate= 319.3kbits/s speed=19.4x
video:0kB audio:2515kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.761414%
[aac @ 0x27d42c0] Qavg: 9635.397

The output file contains a very audible artefact after 59 seconds when decoded with libavcodec or faad.

Last edited 3 months ago by cehoyos (previous) (diff)

comment:4 Changed 3 months ago by cehoyos

  • Reproduced by developer set

comment:5 Changed 3 months ago by cehoyos

  • Status changed from new to open
Note: See TracTickets for help on using tickets.