Opened 9 years ago

Last modified 13 months ago

#5448 reopened defect

aac: wrong calculation of duration

Reported by: ami_stuff Owned by:
Priority: minor Component: avformat
Version: git-master Keywords: aac regression
Cc: RutD0g Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

it used to be correct long time ago:

C:\>ffmpeg -i 1.aac
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 21 2014 18:55:26 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-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[aac @ 02a7a980] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from '1.aac':
  Duration: 00:00:29.58, bitrate: 73 kb/s
    Stream #0:0: Audio: aac, 88200 Hz, mono, fltp, 73 kb/s
At least one output file must be specified
C:\>ffmpeg -i 1.aac out.wav
ffmpeg version N-79468-ga676c29 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.0-1.fc14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      55. 22.100 / 55. 22.100
  libavcodec     57. 34.102 / 57. 34.102
  libavformat    57. 34.101 / 57. 34.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 42.100 /  6. 42.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[aac @ 0x2894160] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from '1.aac':
  Duration: 00:04:47.72, bitrate: 7 kb/s
    Stream #0:0: Audio: aac (LC), 88200 Hz, mono, fltp, 7 kb/s
File 'out.wav' already exists. Overwrite ? [y/N] y
[wav @ 0x2897420] Using AVStream.codec to pass codec parameters to muxers is dep
recated, use AVStream.codecpar instead.
Output #0, wav, to 'out.wav':
  Metadata:
    ISFT            : Lavf57.34.101
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 88200 Hz, mono, s16,
1411 kb/s
    Metadata:
      encoder         : Lavc57.34.102 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 0; changing to 88057. This may result in incorrect timestamps in the output
 file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 1024; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 2048; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 3072; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 4096; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 5120; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 6144; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 7168; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 8192; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 9216; changing to 88057. This may result in incorrect timestamps in the out
put file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 10240; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 11264; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 12288; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 13312; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 14336; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 15360; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 16384; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 17408; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 18432; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 19456; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 20480; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 21504; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 22528; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 23552; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 24576; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 25600; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 26624; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 27648; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 28672; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 29696; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 30720; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 31744; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 32768; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 33792; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 34816; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 35840; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 36864; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 37888; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 38912; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 39936; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 40960; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 41984; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 43008; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 44032; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 45056; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 46080; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 47104; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 48128; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 49152; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 50176; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 51200; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 52224; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 53248; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 54272; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 55296; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 56320; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 57344; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 58368; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 59392; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 60416; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 61440; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 62464; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 63488; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 64512; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 65536; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 66560; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 67584; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 68608; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 69632; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 70656; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 71680; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 72704; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 73728; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 74752; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 75776; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 76800; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 77824; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 78848; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 79872; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 80896; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 81920; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 82944; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 83968; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 84992; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 86016; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
[wav @ 0x2897420] Non-monotonous DTS in output stream 0:0; previous: 88057, curr
ent: 87040; changing to 88057. This may result in incorrect timestamps in the ou
tput file.
size=    5188kB time=00:00:29.10 bitrate=1460.2kbits/s speed= 133x
video:0kB audio:5188kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.001920%

Attachments (1)

1.aac (266.2 KB ) - added by ami_stuff 9 years ago.

Download all attachments as: .zip

Change History (10)

by ami_stuff, 9 years ago

Attachment: 1.aac added

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: aac regression added
Priority: normalminor
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Regression since 215db293 / b263f8ff

comment:2 by Balling, 3 years ago

Okay, couple of points here: there is some priming and remainder and yet we cannot say how much due to it being bare aac (.adts).

Also it now regressed further and prints

Duration: 00:04:38.71, bitrate: 7 kb/s

The correct actual duration (with priming and remainder) is 30 s 116 ms (that is written in editlist after reencoding Media time: 1024, Track duration: 30116).

Non-monotonous DTS in output stream does not happen.

Reencoding does not help so bug is ours.

May be a problem due to 1/28224000 timebase.

Last edited 3 years ago by Balling (previous) (diff)

comment:3 by Jozef Chutka, 3 years ago

Hi everyone, considering this error exists for 6 years, is there any recent work ongoing? Or should be aac format in ffmpeg considered unstable?

Seems I hit a similar issue reported on https://trac.ffmpeg.org/ticket/9708 . I wonder if there is any workaround?

in reply to:  3 comment:4 by RutD0g, 14 months ago

Bottom line:

ffmpeg -i audio.aac[.adts]/video.ts -c copy audio.m4a/video.mp4

The workaround solution is to use a different container. I have found success muxing AAC audio into MP4/M4A. No need to recode, just -c copy.

Replying to Jozef Chutka:

Hi everyone, considering this error exists for 6 years, is there any recent work ongoing? Or should be aac format in ffmpeg considered unstable?

The best I've been able to figure out is that it's not a bug, it's a limitation of the container represented by the .AAC extension.

Adding to the confusion is that the .AAC file extension, unlike MP4/M4A, MKV/MKA, etc., is NOT representing a container of the same or similar name.

As someone said elsewhere (I can't remember where) "AAC is a codec, not a container."

File extension .AAC is just a synonym for .ADTS, the audio version of .TS for video. These are transport stream containers.

I'm unclear why, but TS containers do not include the type of time data that other containers include. At least in the .AAC and .TS files I've dealt with.

I first encountered this because some media players are error prone when playing .TS videos. Some players can't play them at all, others play but you can't FF or RW. They are also prone to go on "forever", like a 2 hour video that stretches to 8 hours.

Recently working with audio files, I noticed my .AAC audio files were displaying inaccurate times. They play fine, but usually the time estimate (see below) is a little low. When the progress bar hits the "end" it just keeps playing, right up to the time that I originally expected

Using ffprobe on an .AAC audio file returns the following:

[aac @ 00000186079e0100] Estimating duration from bitrate, this may be inaccurate

And a sample .TS video file has a time related error as well:

[mpegts @ 000001298c210100] start time for stream 2 is not set in estimate_timings_from_pts

Most media players figure it out and play the media. And Windows OS also estimates the "length" property in Explorer, but at least with audio files the estimates are always a bit off.

According to this TRAC guide, AAC is compatible with MP4/M4A, which I've tested, and MKV/MKA, FLV/F4V, and RMVB, but I haven't tested any of those.

I have found success muxing .TS video and AAC/.ADTS audio into MP4/M4A. No need to recode, just -c copy.

ffmpeg -i audio.aac[.adts]/video.ts -c copy audio.m4a/video.mp4

Doing so eliminates all the errors/glitches noted above. Time is correct, videos play, ffprobe returns no error/alert messages.

Last edited 14 months ago by RutD0g (previous) (diff)

comment:5 by RutD0g, 13 months ago

Cc: RutD0g added
Resolution: worksforme
Status: openclosed

Everything I said (in other comment) about transport streams and time codes is true, but that wasn't directly adddressing this issue, which now seems to have been fixed.

C:\>ffmpeg -i 1.aac 1.wav
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200726
  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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  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
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[aac @ 0742cfc0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from '1.aac':
  Duration: 00:04:47.72, bitrate: 7 kb/s
    Stream #0:0: Audio: aac (LC), 88200 Hz, mono, fltp, 7 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '1.wav':
  Metadata:
    ISFT            : Lavf58.45.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 88200 Hz, mono, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc58.91.100 pcm_s16le
size=    5188kB time=00:00:30.11 bitrate=1411.2kbits/s speed=  94x
video:0kB audio:5188kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001920%

comment:6 by Balling, 13 months ago

Resolution: worksforme
Status: closedreopened

But FFprobe is still broken.

in reply to:  6 comment:7 by RutD0g, 13 months ago

Replying to Balling:

But FFprobe is still broken.

Here's my perspective, though I'm sure I'm less knowledgeable than you.

1) The command the OP ran which generated non-monotonous DTS errors no longer generates errors and generates a usable .wav.

2) The only problem I see with ffprobe is the inaccurate time estimate.

3) As I detailed in my longer post, every single tool I've tried also gives an inaccurate time estimate on all .AAC files. Windows Explorer, VLC, MPC-HC, archive.org video player, etc. etc.

If FFmpeg/FFprobe exhibits the same behavior as every other tool, how is that a bug?

I'm grateful that FFmpeg stands alone with the alert message (specific to AAC) warning that the estimate is likely inaccurate. If not for that alert I'd still be stumped.

[aac @ 0000021bf26c1400] Estimating duration from bitrate, this may be inaccurate
C:\>ffprobe 1.aac
ffprobe version N-112508-g3c5bceb751-20231025 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231025
  libavutil      58. 27.100 / 58. 27.100
  libavcodec     60. 30.102 / 60. 30.102
  libavformat    60. 15.101 / 60. 15.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[aac @ 0000021bf26c1400] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from '1.aac':
  Duration: 00:04:38.71, bitrate: 7 kb/s
  Stream #0:0: Audio: aac (LC), 88200 Hz, mono, fltp, 7 kb/s

comment:8 by Balling, 13 months ago

Do you know what a regression is? It was correct in version 2.1.3. The bug is likely because it reads bitrate 7 kb/s instead of 73 kb/s.

comment:9 by RutD0g, 13 months ago

Gotcha. I see now.

Thanks for your patience.

Note: See TracTickets for help on using tickets.