> I would like to implement a pre-motion event capturing in an IP camera. > > For this purpose I need the stream to be always collected in a circular > buffer and then when a motion is detected the stream data should be saved > into an mp4 file and it should contain the video of the last 10 seconds > before the event and the next 10 seconds after the event. > > Please let me know what is the best approach to implement this functionality.
You can implement the ‘capturing from IP camera’ part of this quite easily using our “LIVE555 Streaming Media” software (assuming that your ‘IP camera’ uses RTSP); I suggest using our “testRTSPClient” demo application as a model; see the code in “testProgs/testRTSPClient.cpp”. However, to do ‘motion detection’, you’ll need to decode the captured video stream. Then you’ll need to re-encode the parts that you want to save. Then you’ll need to write the re-encoded video into “.mp4” files. For all of this, you’ll need something like the “ffmpeg” library. Sorry. Ross Finlayson Live Networks, Inc. http://www.live555.com/ _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel