November 1st, 2012, 04:40 AM
Upload live webcam video to RTSP Server
So I would like to program an application where the user can record a video and instantly (live) upload that video to a RTP/RTSP Server.
The server side will not be a problem. The thing I am unclear about is how to achieve this on the phone-side.
My research so far is that I have to write the video on recording to a local socket rather than to a file, because the 3gp files if written to a file cannot be accessed, until finalized (when the video is stopped and the header information have been written to the video about length and others).
When the socket receives the continuous data, I will need to wrap it into a RTP packet and send it to the remote server. I possibly will also have to do basic encoding first (which is not so important yet).
Does anybody have any idea, if this theory is correct so far.
I would also like to know if someone could point me to a few code-snippets of similar approaches, especially for sending the video on the fly to the server. I am not sure yet how to do that.
Thank you very much and best regards