stream audio file from FTP server to Android App

2019-07-26 06:00发布

I have a FTP server setup that holds audio files in one of its directories. I would like to stream the audio from the server and play it on my Android phone instead of downloading it and playing it back that way. Also, is it possible to stream it to the MediaPlayer in Android for playback?

4条回答
冷血范
2楼-- · 2019-07-26 06:41

You can stream mp3 over FTP. Same way you can DL mp3 from ftp and listen to it before it's finished DLing. There's File Managers/Explorers like FX for one that will do this, but all it's streaming stuff is a trial or maybe by now a paid unlockable feature. Look for an open source remedy.

查看更多
We Are One
3楼-- · 2019-07-26 06:51

The FTP protocol does not support streaming audio or video.

However, you could set up a streaming server on the same box that will do it for you. I've used VLC to stream video and it's pretty easy to set up. Should work for audio too.

http://www.videolan.org/doc/streaming-howto/en/index.html

查看更多
疯言疯语
4楼-- · 2019-07-26 06:51

Sure it is possible, the only problem I see is that your media files should be in a continuous file format, such as MP3. See shoutcast streaming for example, it works via http.

yxplayer is what you want, but it might be a bit limited

查看更多
可以哭但决不认输i
5楼-- · 2019-07-26 07:06

You can stream video over FTP. It is just a basic transfer protocol and once you have the data streaming to your device you can do what you want with it. Take a look at this tutorial if you want to set up streaming to your phone:

https://www.digitaldrugs.co.uk/wordpress/?p=37

查看更多
登录 后发表回答