8

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

the server is coded using java.

how can I do that?

Sam
  • 81
  • 1
  • 1
  • 2

3 Answers3

9

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

Community
  • 1
  • 1
Rich
  • 1,015
  • 1
  • 10
  • 22
2

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

Volodymyr Kulyk
  • 6,455
  • 3
  • 36
  • 63
-2

With rtsp you should also specify the sdp file where the rtp and other info are stored.

Engr M Hassan
  • 1,222
  • 4
  • 14
  • 22