[FFmpeg-trac] #2706(avcodec:new): Native AAC encoder produces warbling with pure aevalsrc sine wave

FFmpeg trac at avcodec.org
Tue Jun 25 01:42:59 CEST 2013


#2706: Native AAC encoder produces warbling with pure aevalsrc sine wave
---------------------------------+--------------------------------------
             Reporter:  MarkZV   |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  avcodec  |                  Version:  git-master
             Keywords:  aac      |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 When encoding a pure sine wave using aevalsrc, using the example
 expression in the documentation {{{sin(440*2*PI*t)}}}, encoding it with
 the native AAC encoder, and playing it with ffplay, the output warbles
 rather than being a pure sine wave as expected.

 How to reproduce:
 {{{
 $ ffmpeg -v 9 -loglevel 99 -filter_complex "aevalsrc=sin(440*2*PI*t)" -c:a
 aac -strict experimental -t 3 out.aac
 ffmpeg version 1.1.git-bbe26ef Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jun 24 2013 14:49:49 with gcc 4.2.1 (GCC) (Apple Inc. build
 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
 --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora
 --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
 --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray
 --enable-gnutls --enable-libfreetype --mandir=/opt/local/share/man
 --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64
 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-
 libxvid --enable-version3 --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-nonfree --enable-libfdk-aac --enable-libfaac
   libavutil      52. 37.101 / 52. 37.101
   libavcodec     55. 17.100 / 55. 17.100
   libavformat    55.  9.100 / 55.  9.100
   libavdevice    55.  2.100 / 55.  2.100
   libavfilter     3. 77.101 /  3. 77.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-filter_complex' ... matched as option 'filter_complex'
 (create a complex filtergraph) with argument 'aevalsrc=sin(440*2*PI*t)'.
 Reading option '-c:a' ... matched as option 'c' (codec name) with argument
 'aac'.
 Reading option '-strict' ... matched as AVOption 'strict' with argument
 'experimental'.
 Reading option '-t' ... matched as option 't' (record or transcode
 "duration" seconds of audio/video) with argument '3'.
 Reading option 'out.aac' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Applying option filter_complex (create a complex filtergraph) with
 argument aevalsrc=sin(440*2*PI*t).
 Successfully parsed a group of options.
 Parsing a group of options: output file out.aac.
 Applying option c:a (codec name) with argument aac.
 Applying option t (record or transcode "duration" seconds of audio/video)
 with argument 3.
 Successfully parsed a group of options.
 Opening an output file: out.aac.
 detected 4 logical cores
 [Parsed_aevalsrc_0 @ 0x103100000] compat: called with
 args=[sin(440*2*PI*t)]
 [Parsed_aevalsrc_0 @ 0x103100000] Setting 'exprs' to value
 'sin(440*2*PI*t)'
 [audio format for output stream 0:0 @ 0x1031010c0] Setting 'sample_fmts'
 to value 'fltp'
 [audio format for output stream 0:0 @ 0x1031010c0] Setting 'sample_rates'
 to value
 '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
 Successfully opened the file.
 [audio format for output stream 0:0 @ 0x1031010c0] auto-inserting filter
 'auto-inserted resampler 0' between the filter 'Parsed_aevalsrc_0' and the
 filter 'audio format for output stream 0:0'
 [AVFilterGraph @ 0x102421880] query_formats: 3 queried, 6 merged, 3
 already done, 0 delayed
 [Parsed_aevalsrc_0 @ 0x103100000] sample_rate:44100 chlayout:mono
 duration:-1.000000
 [auto-inserted resampler 0 @ 0x103101800] [SWR @ 0x10380a600] Using double
 precision mode
 [auto-inserted resampler 0 @ 0x103101800] ch:1 chl:mono fmt:dblp r:44100Hz
 -> ch:1 chl:mono fmt:fltp r:44100Hz
 Output #0, adts, to 'out.aac':
   Metadata:
     encoder         : Lavf55.9.100
     Stream #0:0, 0, 1/90000: Audio: aac, 44100 Hz, mono, fltp, 128 kb/s
 Stream mapping:
   aevalsrc -> Stream #0:0 (aac)
 Press [q] to stop, [?] for help
 No more output streams to write to, finishing.
 size=      23kB time=00:00:03.01 bitrate=  63.0kbits/s
 video:0kB audio:22kB subtitle:0 global headers:0kB muxing overhead
 3.990025%
 0 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 0x103101700] Statistics: 0 seeks, 131 writeouts
 $ ffplay out.aac
 ffplay version 1.1.git-bbe26ef Copyright (c) 2003-2013 the FFmpeg
 developers
   built on Jun 24 2013 14:49:49 with gcc 4.2.1 (GCC) (Apple Inc. build
 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
 --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora
 --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
 --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray
 --enable-gnutls --enable-libfreetype --mandir=/opt/local/share/man
 --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64
 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-
 libxvid --enable-version3 --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-nonfree --enable-libfdk-aac --enable-libfaac
   libavutil      52. 37.101 / 52. 37.101
   libavcodec     55. 17.100 / 55. 17.100
   libavformat    55.  9.100 / 55.  9.100
   libavdevice    55.  2.100 / 55.  2.100
   libavfilter     3. 77.101 /  3. 77.101
   libswscale      2.  3.100 /  2.  3.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 Estimating duration from bitrate, this may be inaccurate 0B f=0/0
 Input #0, aac, from 'out.aac':
   Duration: 00:00:00.84, bitrate: 226 kb/s
     Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 226 kb/s
    4.29 M-A:  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
 }}}

 Seems to be overshooting the range.  It works as expected if the FDK AAC
 encoder is used (-c:a libfdk_aac).  Also the "sine" source works (although
 it is quieter) if a sine wave is all that is needed, but of course it is
 not as flexible.  It would be nice to start with a working sine wave and
 then be able to make modifications to the expression.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2706>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list