[FFmpeg-trac] #9667(avcodec:new): HE-AAC decode samples off by one sample-time

FFmpeg trac at avcodec.org
Thu Feb 24 00:33:03 EET 2022


#9667: HE-AAC decode samples off by one sample-time
---------------------------------+---------------------------------------
             Reporter:  Nick     |                     Type:  defect
               Status:  new      |                 Priority:  minor
            Component:  avcodec  |                  Version:  unspecified
             Keywords:  he-aac   |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+---------------------------------------
 Minor quirk - ffmpeg appears to decode HE-AACv1/v2 samples shifted in time
 (early) by 1 sample time at 48kHz.

 1) Generate a WAV file, stereo 48kHz.

 2) Use ffmpeg+libfdk_aac to encode the WAV file into AAC-LC, HE-AACv1, and
 HE-AACv2 ".aac" sample files (48kHz) with the -debug_ts option. The
 deubg_ts information reports an initial timestamp of -2048 samples for
 AAC-LC, -5058 samples for HE-AACv1. and -7106 samples for HE-AACv2. The
 HE-AAC values being a multiple of 2 at 48kHz makes sense as the underlying
 LC data will be 24kHz.

 3) Use ffmpeg to decode the ".aac" sample files to WAV and compare the
 time-alignment of the resulting WAV file with the original WAV file.

 AAC-LC - the output WAV file contains exactly 2048 samples of lead-in as
 expected.

 HE-AACv1 - the output WAV file contains 5057 samples of lead-in where 5058
 samples are expected. Being off by 1 at 48kHz (not a multiple of 2)
 suggests the off-by-one error may be on the decoder side.

 HE-AACv2 - the output WAV file contains 7105 samples of lead-in where 7106
 samples are expected.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9667>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list