[FFmpeg-trac] #9140(ffmpeg:open): aac gapless fail

FFmpeg trac at avcodec.org
Sun Oct 17 14:27:12 EEST 2021


#9140: aac gapless fail
-------------------------------------+----------------------------------
             Reporter:  Guy Sivey    |                    Owner:  (none)
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  ffmpeg
              Version:  unspecified  |               Resolution:
             Keywords:  aac gapless  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+----------------------------------
Changes (by Balling):

 * status:  reopened => open

Comment:

 Okay, I have a question to Paul/Elon. Why editlist's media '''duration'''
 is not applied while editlist's media time is applied??? This is this bug:
 https://bugs.chromium.org/p/chromium/issues/detail?id=668999

 Generate

 ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -c:a aac
 outaaceditlist.mp4

 that will have


 {{{
 AB1F      Track duration:                    5000 (0x00001388) - 5000
 (0x1388) ms
 AB23      Media time:                        1024 (0x00000400) - 1024
 (0x400)
 AB27      Media rate:                        65536 (0x00010000) - 1.000

 B00A      sgpd (26 bytes)
 B00A       Header (8 bytes)
 B00A        Size:                            26 (0x0000001A)
 B00E        Name:                            sgpd
 B012       Unknown:                          (18 bytes)
 B024      sbgp (28 bytes)
 B024       Header (8 bytes)
 B024        Size:                            28 (0x0000001C)
 B028        Name:                            sbgp
 B02C       Unknown:                          (20 bytes)

 }}}

 Yet when decoded it has 5000 not applied (and it is a problem, since aac
 past 5000 ms (1024 dropped samples are not counted there) has actually
 some garbage there, not total silence)!!! So 683 samples are to be dropped
 (not counting that sample on 5 seconds perfectly).


 {{{
 ffmpeg -i outaaceditlist.mp4 coolaac5ms.wav

 }}}

 At least sgpd / sbgp is being applied. Those atoms say that decoding
 should happen from -1 sample so not dropping 1024 samples but dropping
 1023 then decoding 1 then dropping it and applying its MDCT to next sample
 so that it is correct.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9140#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list