[FFmpeg-trac] #6343(undetermined:closed): Encoding MP4/AAC audio from pcm: issues with packets, duration, and pts/dts (especially when using -movflags empty_moov)
FFmpeg
trac at avcodec.org
Wed May 3 02:39:33 EEST 2017
#6343: Encoding MP4/AAC audio from pcm: issues with packets, duration, and pts/dts
(especially when using -movflags empty_moov)
-------------------------------------+-------------------------------------
Reporter: ea167 | Owner:
Type: defect | Status: closed
Priority: normal | Component:
Version: git-master | undetermined
Keywords: aac | Resolution:
Blocking: | needs_more_info
Analyzed by developer: 0 | Blocked By:
| Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by ea167):
Hello @heleppkes,
Thank you so much for your answer, I totally missed the notion of decoder
priming indeed. Now it makes totally sense, thanks to your explanation.
The one thing that fooled me is that the Web Audio API decodeAudioData()
function does not properly trim this priming data.
Some pointers for others who would end up in the same case:
1. Audio priming details on Apple Dev website
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html
2. Open issue of Web Audio API https://github.com/WebAudio/web-audio-
api/issues/1091
Big thanks again!
Replying to [comment:1 heleppkes]:
> AAC uses a concept of decoder priming, ie. before the actual data can be
decoded properly, it decodes a bit of nothingness to "start" the decoder.
This data is typically 1024 samples long, and thats where you get your
extra frame from.
>
> This extra frame is generally properly marked as such and the delay set
appropriately, so after decoding you should once again have the same
amount of samples as you put in.
>
> AFAIK empty_moov is only really useful for fragmented MP4 streams, what
exactly are you trying to achieve by using it alone?
>
> PS:
> As a general rule, its greatly advised to report one particular issue in
one ticket, and not bunch all your collected issues into one.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6343#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list