Opened 7 years ago

Closed 7 years ago

#3695 closed defect (fixed)

extremely slow 5.1 float aiff decoding since ffmpeg 2.x

Reported by: divide Owned by:
Priority: important Component: avformat
Version: git-master Keywords: aif regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


Summary of the bug: Decoding an aiff file with float samples and more than 2 channels is extremely slow since ffmpeg 2.x (but very fast with ffmpeg 1.2)
How to reproduce:

% ffmpeg -i 5.1-32f.aif 5.1-32f.wav
ffmpeg version: any version since ffmpeg 2.x
built on windows platform

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

Attachments (1) (1.3 MB) - added by divide 7 years ago.
aiff files reproducing the bug

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by divide

aiff files reproducing the bug

comment:1 Changed 7 years ago by cehoyos

  • Keywords regression added; aiff decoding 5.1 surround 32bit float removed

Please test current FFmpeg and please provide your "slow" command line together with the complete, uncut console output to make this a valid ticket.

comment:2 Changed 7 years ago by divide

I've just tested with ffmpeg 2.2.2 from (both 32 and 64 bits) and it shows the same very slow behaviour.
Repro steps:
unpack the attached file, then run ffmpeg -i 5.1-32f.aif output.wav

Notice that the problem doesn't happen with the stereo 32bit float file, nor does it happen with the 5.1 16bit signed file.
It is specific to all aif files with more than 2 channels, float samples, and with any ffmpeg 2.x.y version

comment:3 Changed 7 years ago by divide

output from the command line:

ffmpeg.exe -i 5.1-32f.aif output.wav
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers

built on May 22 2014 19:53:12 with gcc 4.8.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-libcaca --enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib

libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100

Input #0, aiff, from 'C:\temp\ffmpegbug\5.1-32f.aif':

Duration: 00:00:10.00, start: 0.000000, bitrate: 9220 kb/s

Stream #0:0: Audio: pcm_f32be (fl32 / 0x32336C66), 48000 Hz, 5.1, flt, 9216

File 'C:\temp\ffmpegbug\output.wav' already exists. Overwrite ? [y/N] y
Output #0, wav, to 'C:\temp\ffmpegbug\output.wav':


ISFT : Lavf55.33.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1, s16, 4

608 kb/s
Stream mapping:

Stream #0:0 -> #0:0 (pcm_f32be -> pcm_s16le)

Press [q] to stop, ? for help
size= 5625kB time=00:00:10.00 bitrate=4608.1kbits/s
video:0kB audio:5625kB subtitle:0 data:0 global headers:0kB muxing overhead 0.00

Last edited 7 years ago by divide (previous) (diff)

comment:4 Changed 7 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords aiff added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from 2.1.4 to git-master

For future tickets: Please always test current FFmpeg git head, and please tell us if you believe this isn't explained well on

Regression since 9526c9cc

comment:5 Changed 7 years ago by cehoyos

  • Keywords aif added; aiff removed

comment:6 Changed 7 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in 763e7144 - thank you for the report!

Note: See TracTickets for help on using tickets.