[FFmpeg-trac] #8621(undetermined:new): FFMPEG Audio decoding fails on audio packet (works using libfdk)

FFmpeg trac at avcodec.org
Sun Aug 30 02:48:06 EEST 2020


#8621: FFMPEG Audio decoding fails on audio packet (works using libfdk)
-------------------------------------+-------------------------------------
             Reporter:  rayaudius    |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  aac          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by ricidina):

 * cc: brendon@… (added)


Comment:

 We seem to have encountered the same bug. We upgraded from ffmpeg 3.3 in
 Debian Stretch to a Docker container running Alpine Linux and ffmpeg 4.3.
 So far only one video that we know of has been affected thankfully.

 I have tested this with ffmpeg 3.3, 3.4, 4.0, 4.1, and 4.3. It seems the
 bug is present ONLY in 4.0+ using the built-in aac.

 Workaround is to use ffmpeg < 4.0 or libfdk_aac.

 Here is an example command line we are using:

 {{{
 /usr/bin/env ffmpeg -i /app/scratch/tomars_theme_song_remix.mp4 -y -c:v
 libx264 -s 640x360 -preset veryfast -crf 21 -maxrate 2000000 -bufsize
 2500000 -pix_fmt yuv420p -movflags +faststart -c:a aac -b:a 384000
 -profile:v baseline /app/scratch/tomars_theme_song_remix.360p.mp4
 }}}

 Here is the build info:

 {{{
 ffmpeg version 3.4.8 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.0 (Alpine 9.3.0)
   configuration: --disable-debug --disable-doc --disable-ffplay --enable-
 shared --enable-avresample --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig
 --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-
 libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-
 libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264
 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc
 --enable-small --enable-version3 --enable-libbluray --enable-libzmq
 --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-
 libkvazaar --extra-cflags=-I/opt/ffmpeg/include --extra-
 ldflags=-L/opt/ffmpeg/lib
   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
   libavresample   3.  7.  0 /  3.  7.  0
   libswscale      4.  8.100 /  4.  8.100
   libswresample   2.  9.100 /  2.  9.100
   libpostproc    54.  7.100 / 54.  7.100
 }}}


 {{{
 ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 9.3.0 (Alpine 9.3.0)
   configuration: --disable-debug --disable-doc --disable-ffplay --enable-
 shared --enable-avresample --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig
 --enable-libfreetype --enable-libvidstab --
 enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
 --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265
 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl
 --enable-libfdk_aac --enable-postproc --enable-small --enable-version3
 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg
 --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-
 libs=-lpthread --enable-libsrt --enable-libaribb24 --extra-
 cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
   libavutil      56. 51.100 / 56. 51.100
   libavcodec     58. 91.100 / 58. 91.100
   libavformat    58. 45.100 / 58. 45.100
   libavdevice    58. 10.100 / 58. 10.100
   libavfilter     7. 85.100 /  7. 85.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
 }}}

 [https://uploads.ungrounded.net/ffmpeg_bug/tomars_theme_song_remix.original.mp4
 Original video.]

 [https://uploads.ungrounded.net/ffmpeg_bug/tomars_theme_song_remix.encoded_with_ffmpeg_4_3.mp4
 Video encoded with 4.3.1.] This freezes at around the 16 second mark in
 Chrome.

 ffmpeg reports:

 {{{
 ffmpeg -i ffmpeg_bug/tomars_theme_song_remix.encoded_with_ffmpeg_4_3.mp4
 -f null -

 ...
 [aac @ 0x560f2f6dfe00] error in spectral data, ESC overflow
 Error while decoding stream #0:1: Invalid data found when processing input
 }}}

 [https://uploads.ungrounded.net/ffmpeg_bug/tomars_theme_song_remix.encoded_with_ffmpeg_3_4.mp4
 Video encoded with 3.4.8.] No issue with this one.

 [https://uploads.ungrounded.net/ffmpeg_bug/ffmpeg_log_3_4.txt Full encode
 log for 3.4.]

 [https://uploads.ungrounded.net/ffmpeg_bug/ffmpeg_log_4_3.txt Full encode
 log for 4.3.]

 These logs are the full debug log for the project so contain ffprobe
 output and other stuff as well.

 Let me know if I can provide anything else.

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


More information about the FFmpeg-trac mailing list