[Libav-user] How to encode aac coded packets with priming samples and remainder samples to keep av sync

qw applemax82 at 163.com
Fri Oct 9 18:47:12 CEST 2015


Hi,


I'm want to mux video and audio packets into one mp4 file, where aac is used as audio encoder.


https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html


As the above link shows, aac encoder has priming samples at the start and remainder samples in the end, which should be removed in player site to keep av sync. The above url link shows solution to avoid av desync, i.e. using edit list or sample group structure.


Generally, write_frame() is used to write video/audio packets. What we can do is set pts, dts, and duration. How to create edit list entry or sample group structure to mark priming and remainder samples in mp4 file? Does ffmpeg have  examples for this kind of issue?


Thanks!


B.R.


Andrew





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151010/68428e96/attachment.html>


More information about the Libav-user mailing list