<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>I have an application running on iPhone that generates an H.264 RTP<br>video stream from camera. I wanna writing an application to convert<br>the received H.264 stream to an MPEG-2 Transport Stream and then<br>stream the live TS to another device.<br><br>my first try is modified the example "testH264VideoToTransportStream"<br>, use H264VideoRTPSource to receive H.264 RTP stream from VLC, then<br>try to convert it to TS</div></blockquote><div><br></div>The problem here is that the output from "H264VideoRTPSource" is a sequence of raw H.264 NAL units - i.e., without 'start code's. </div><div><br></div><div><br></div><div><blockquote type="cite"><div>3. H264VideoRTPSource -> MPEG2TransportStreamFromESSource -> MPEG2TransportStreamFramer -> SimpleRTPSink<br></div></blockquote><div><br></div>This *should* work, with one modification: You will need to add a 'start code' (i.e., 0x00 0x00 0x00 0x01) before each NAL unit that comes out of the "H264VideoRTPSource". You will need to do this - using a separate filter class (that you would write) - before you feed the output into a "MPEG2TransportStreamFromESSource".</div><div><br></div><div>Before doing this, though, I suggest that you do</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>H264VideoRTPSource -> H264VideoFileSink (*not* just a "FileSink")</div><div>and then try running the (original, unmodified) "testH264VideoToTransportStream" application to generate a Transport Stream. (Note that "H264VideoFileSink" adds 'start codes' before each NAL unit.)</div><br><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>