<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,</div><div><br></div><div>I'm want to mux video and audio packets into one mp4 file, where aac is used as audio encoder.</div><div><br></div><div><a href="https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html">https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html</a></div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks!</div><div><br></div><div>B.R.</div><div><br></div><div>Andrew</div><div><br></div><div><br></div><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>