I want send streaming video from android phone to computer server on RTSP.
the server is coded using java.
how can I do that?
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
Use libstreaming library to stream video / audio RTP over UDP.
Or use twilio as ready solution (hole punching already integrated, so you don't need to care about STUN / TURN servers).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With