<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://11713/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="color: rgb(31, 73, 125); ">I’m trying to<span class="Apple-converted-space"> </span><span class="SpellE">mux</span><span class="Apple-converted-space"> </span>a H264 elementary stream along with the private data into MPEG TS.<span> <span class="Apple-converted-space"> </span></span>It should be done offline, with 2 files – video and data. I’ve added the support for data in the<span class="Apple-converted-space"> </span><b>MPEG2TransportStreamMultiplexor<span class="Apple-converted-space"> </span></b>( PMT and other stuff ), and this works. The problem is that I only get data packets inserted in the resulted file until the first video packet (something like 5 packets). After that, only video packets are present.</span></div></div></div></blockquote><div><br></div>I think the problem you're facing is that our Transport Stream multiplexing code inserts chunks of data - from each source - as soon as it gets them, regardless of how the chunks of data is timestamped.  I.e., it *doesn't* use the timestamps to make sure that all of the chunks of data get inserted into the Transport Stream in timestamp order.  The reason for this is that the code was intended to multiplex live sources, or data from a single file only (as we do with our "testH264VideoToTransportStream" demo application).</div><div><br></div><div>Your solution, therefore, is to (somehow) make your data sources 'live' streams, delivering data to their downstream object (in this case, the Transport Stream multiplexor) only at the appropriate time, rather than immediately.</div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>