Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make RTSP server at android phone?

Tags:

java

android

rtsp

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

the server is coded using java.

how can I do that?

like image 318
Sam Avatar asked Sep 22 '11 09:09

Sam


2 Answers

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

like image 74
Rich Avatar answered Nov 13 '22 10:11

Rich


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

like image 35
Volodymyr Kulyk Avatar answered Nov 13 '22 12:11

Volodymyr Kulyk