Opened 7 months ago

#7846 new defect

AAC -f lavfi or -filter_complex aevalsrc exceed the specified time

Reported by: vsc55 Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: aac lavfi filter_complex
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: When generating a silence with "-f lavfi -t 5" or with "-filter_complex" aevalsrc = 0: d = 5 "" of 5 seconds it generates a silence of 10 seconds, this happens with the encoding of AAC, if you generate a AC3 or WAV is generated correctly.
Also, if you try to concatenate a silence with an audio file, add a few seconds between both audios.
How to reproduce:

ffmpeg started on 2019-04-16 at 21:01:32
Report written to "ffmpeg-20190416-210132.log"
Command line:
".\\ffmpeg.exe" -report -f lavfi -t 5 -v 9 -loglevel 99 -i anullsrc silence.aac
ffmpeg version N-93580-g036b4b0f85 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-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 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 51.100 / 58. 51.100
  libavformat    58. 27.102 / 58. 27.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '5'.
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 '-i' ... matched as input url with argument 'anullsrc'.
Reading option 'silence.aac' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input url anullsrc.
Applying option f (force format) with argument lavfi.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.
Successfully parsed a group of options.
Opening an input file: anullsrc.
detected 8 logical cores
[AVFilterGraph @ 000002590e83ca40] query_formats: 2 queried, 3 merged, 0 already done, 0 delayed
[Parsed_anullsrc_0 @ 000002590e83ce40] sample_rate:44100 channel_layout:'stereo' nb_samples:1024
[lavfi @ 000002590e83b580] All info found
Input #0, lavfi, from 'anullsrc':
  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0, 1, 1/44100: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Successfully opened the file.
Parsing a group of options: output url silence.aac.
Successfully parsed a group of options.
Opening an output file: silence.aac.
[file @ 000002590e8cf180] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_u8 (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_0_in_0_0 @ 000002590ec90f80] Setting 'time_base' to value '1/44100'
[graph_0_in_0_0 @ 000002590ec90f80] Setting 'sample_rate' to value '44100'
[graph_0_in_0_0 @ 000002590ec90f80] Setting 'sample_fmt' to value 'u8'
[graph_0_in_0_0 @ 000002590ec90f80] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 000002590ec90f80] tb:1/44100 samplefmt:u8 samplerate:44100 chlayout:0x3
[format_out_0_0 @ 000002590e8d3d80] Setting 'sample_fmts' to value 'fltp'
[format_out_0_0 @ 000002590e8d3d80] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[format_out_0_0 @ 000002590e8d3d80] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0'
[AVFilterGraph @ 000002590e8cfe80] query_formats: 5 queried, 9 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 000002590e8d4340] [SWR @ 000002590e8d5840] Using s16p internally between filters
[auto_resampler_0 @ 000002590e8d4340] ch:2 chl:stereo fmt:u8 r:44100Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz
Output #0, adts, to 'silence.aac':
  Metadata:
    encoder         : Lavf58.27.102
    Stream #0:0, 0, 1/44100: Audio: aac (LC), 44100 Hz, stereo, fltp, delay 1024, 128 kb/s
    Metadata:
      encoder         : Lavc58.51.100 aac
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[out_0_0 @ 000002590e8d3bc0] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.
[aac @ 000002590e843cc0] Trying to remove 684 more samples than there are in the queue
size=       3kB time=00:00:05.01 bitrate=   4.5kbits/s speed=100x    
video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 115.163002%
Input file #0 (anullsrc):
  Input stream #0:0 (audio): 217 packets read (444416 bytes); 217 frames decoded (222208 samples); 
  Total: 217 packets (444416 bytes) demuxed
Output file #0 (silence.aac):
  Output stream #0:0 (audio): 216 frames encoded (220500 samples); 217 packets muxed (1319 bytes); 
  Total: 217 packets (1319 bytes) muxed
217 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000002590e8cf240] Statistics: 0 seeks, 1 writeouts
[aac @ 000002590e843cc0] Qavg: 65536.000

Attachments (5)

test.cmd (410 bytes) - added by vsc55 7 months ago.
silence_lavfi.aac (2.8 KB) - added by vsc55 7 months ago.
silence_lavfi.wav (861.4 KB) - added by vsc55 7 months ago.
silence_lavfi.mp3 (79.0 KB) - added by vsc55 7 months ago.
silence_lavfi.ac3 (117.6 KB) - added by vsc55 7 months ago.

Download all attachments as: .zip

Change History (5)

Changed 7 months ago by vsc55

Changed 7 months ago by vsc55

Changed 7 months ago by vsc55

Changed 7 months ago by vsc55

Changed 7 months ago by vsc55

Note: See TracTickets for help on using tickets.