Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send streaming from Android via WiFi base on VLC or RTSP?

I am new for this.

I want to develop an application that it can streaming music for SD card to another device via WiFi.

There has many protocol for streaming , like RTP ,RTCP and RTSP.

But I don't know how to begin for streaming...

Ideal is like the following:

1. Android Phone-A turn on the Hotspot(Wireless Access Point mode) , and the client will connect to this Android Phone-A.

2. After client to this Android Phone-A, Android Phone-A can choose the MP3 music file, and live-streaming to this client via WiFi (not WiFi Direct).

3. And the client will play the music from Android Phone-A.

So , what I have to develop is A streaming Server.

Question:

1. Should I use RTSP server on Android for doing streaming to client via WiFi ? or it is better for using VLC on Android ?

2. Does there has Android api for VLC can be develop on Android ?

3. How to encode and send the music streaming from Wireless Access Point to client ?

Thanks in advance.

like image 620
Martin Avatar asked Feb 21 '14 05:02

Martin


1 Answers

for your questions,

  1. You can use VLC to make things easier, but you can write your own server to stream via RTP if you would
  2. You can check libVLC for VLC API
  3. You would use android.net.rtp.AudioCodec for encoding and decoding and stream it using android.net.rtp.AudioStream. For more details, you can consult android documentation on RTP
like image 136
Mark Avatar answered Oct 19 '22 22:10

Mark