<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite">I have a low end device with Live555 RTSP server serving live H264 stream. <div><br><div>My application needs acts as a RTSP client and do the following 2 things</div><div>a) Store this H264 data in mp4 format.</div><div>b) Re - stream the H264 data to another application(can be more than one) for a doing some other processing. </div>
<div><br></div><div>feature a) can be directly done using the current Live555 library. </div><div>To implement feature b) one option is , my application has to packetize the elementary H264 data into RTP and stream this data on a UDP socket. </div></div></blockquote><div><br></div>OK, this is completely different to what you were asking about before. You don't need to 'receive RTP packets' at all.</div><div><br></div><div>You can do what you want to do by using the new "StreamReplicator" class (see the "testReplicator" demo application for hints on how to use this).</div><div><br></div><div>First, take the incoming H.264 NAL unit stream from your RTSP client (i.e., from "subsession->readSource()") and feed it into a new "StreamReplicator" object.</div><div><br></div><div>Then create two 'replica' streams (using "createStreamReplica()") from the "StreamReplicator" object.</div><div><br></div><div>Use one replica for your 'mp4' file output (i.e., a "QuickTimeFileSink"). Use the other replica for streaming (using a "H264VideoStreamDiscreteFramer" fed into a "H264VideoRTPSink"). Call "startPlaying()" on each of these 'sink' objects before entering the event loop.</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>