[Live-devel] Receiving RTP packets by a RTSP Client app

Ross Finlayson finlayson at live555.com
Wed Jan 18 21:57:36 PST 2012


> I have a low end device with Live555 RTSP server serving live H264 stream. 
> 
> My application needs acts as a RTSP client and do the following 2 things
> a) Store this H264 data in mp4 format.
> b) Re - stream the H264 data to  another application(can be more than one) for a doing some other processing. 
> 
> feature a) can be directly done using the current Live555 library. 
> 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. 

OK, this is completely different to what you were asking about before.  You don't need to 'receive RTP packets' at all.

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).

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.

Then create two 'replica' streams (using "createStreamReplica()") from the "StreamReplicator" object.

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.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120118/4454f068/attachment.html>


More information about the live-devel mailing list