<div dir="ltr"><span style="font-size:12.8px">I'm trying to do an all in-memory demux, mess around with data, then remux of a TS stream.  I'm finding that the output TS data has a PES frame for every ADTS frame, which makes for some extra overhead.  The ffmepg command doesn't behave this way, so it seems like I must be missing an option or something.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">A simplified version of my code is attached.  I've stripped the error checking to make it super simple.  I also changed the in-memory reading/writing to just read/write from a file to make testing easier.  I'm building against the latest from git.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Is there an option to have the muxer handle bundling ADTS frames together for me? Or do I need to do it myself before passing it to av_interleaved_write_frame?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Also, is there anything that seems off with the way I'm using the libavformat API? (aside form no error checking; that's intentional to make the example code easier to read)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div></div>