stream audio file from FTP server to Android App

百般思念 提交于 2019-12-11 07:21:38

问题


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?


回答1:


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




回答2:


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




回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/8361609/stream-audio-file-from-ftp-server-to-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!