how to make RTSP server at android phone?

Sam picture Sam · Sep 22, 2011 · Viewed 24.4k times · Source

I want send streaming video from android phone to computer server on RTSP.

the server is coded using java.

how can I do that?

Answer

Rich picture Rich · Sep 22, 2011

RTSP is just a streaming protocal which only includes information about a stream and no data. you can use it as a "tunnel" for data streams (e.g. RTP). you can use RTSP as a tcp connection to support your udp stream. so necessary data can't get lost.

here is a simple example of a RTSP server-client communication: Streaming Video with RTSP and RTP. there are only the basics of the connection (communication) at this exercise and it's for a java application, so you have to modify it a little bit.

to get some more information about the RTSP connection and the sdp file check out the RFC2326 - RTSP and the RFC4566 - SDP

to stream data from your android device take a look at this thread: Creating RTP Packets from Android Camera to Send

EDIT:

found this great example project for RTP streaming: SpyDroid