Properly handle AAC/MP4 encoder delay

NEW
Unassigned

Status

()

P3
normal
2 years ago
3 months ago

People

(Reporter: jya, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
See https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html

Also found in ISO 14496-12.

AAC has traditionally had a default encoder delay set at 2112 frames. This is an implicit encoder.

Additionally, there's in the MP4 container an explicit encoding to define the encoder delay 
There are two boxes to handle such information:
sample group description box (sgpd) and
sample-to-group (sbgp)

This is in additional to an eventual edit list.

Stagefright appears to have handling for all of those and set some keys
kKeyEncoderDelay
kKeyEncoderPadding

we should handle this with the rust demuxer, and then modify all the decoders to trim the frames on both ends.
(Reporter)

Updated

2 years ago
Duplicate of this bug: 1320652
Priority: -- → P3
(Reporter)

Updated

2 years ago
See Also: → bug 1345756

Comment 3

3 months ago
Hi Jean-Yves, here's a test case of AAC with elst box: https://github.com/nzhang227/gapless_audio_mse#details-about-the-test-files. There's details on the transcoding and elst box generation. Could you take a look and see if you can make the test case work? Please feel free to ask any questions.
You need to log in before you can comment on or make changes to this bug.