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

I am new to this.

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

There are many protocols for streaming, such as RTP, RTCP, and RTSP.

But I don’t know how to start streaming ...

The ideal is as follows:

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

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

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

So, I have to develop a streaming server.

Question:

1. Should I use the RTSP server for Android to stream to the client via Wi-Fi? or is it better to use VLC on Android?

2. Does Android Android have an api for developing VLC on the Android platform?

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

Thanks in advance.

+6
source share
2 answers

for your questions

  • You can use VLC for simplification, but you can write your own server for streaming through RTP if you
  • You can check libVLC for VLC API
  • You would use android.net.rtp.AudioCodec for encoding and decoding and stream using android.net.rtp.AudioStream . For more information, you can refer to the Android documentation for RTP
+1
source

You can also use the pure Java libstreaming library. With it, you can easily create an RTSP server. It is licensed under the GPL.

0
source

All Articles