How to make an RTSP server on an Android phone?

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

the server is encoded using java.

How can i do this?

+6
source share
3 answers

RTSP is simply a flow channel that includes only information about the flow and lack of data. you can use it as a β€œtunnel” for data streams (for example, RTP). you can use RTSP as tcp connection to support your udp stream. therefore, the necessary data cannot be lost.

Here is a simple example of server-client interaction between RTSP: Streaming video with RTSP and RTP . in this exercise there is only the basics of connection (connection), and this application is for Java, so you need to change it a little.

For more information about the RTSP connection and the sdp file, check RFC2326 - RTSP and RFC4566 - SDP

to transfer data from your Android device, see this stream: Creating RTP packets from an Android camera to send

EDIT:

found this great project example for streaming RTP: SpyDroid

+6
source

Use libstreaming to stream RTP video / audio over UDP.


Or use twilio as a turnkey solution (the hole punch is already integrated, so you don't need to worry about STUN / TURN ).

+1
source

With rtsp, you must also specify the sdp file where rtp and other information is stored.

0
source

Source: https://habr.com/ru/post/897809/


All Articles