I have already tried jplayer but unfortunately there are problems with Shoutcast mp3 streaming and Android.
Is there an alternative? I wouldnt mind even "serving" the stream directly in some way and cause the Android device to open its default media player if that is posible. - I just want to make sure that an Android device will play my stream.
Unfortunately, you can't open an MP3 stream from SHOUTcast on Android directly. This is because of the way SHOUTcast has broken HTTP. Instead of a normal status line:
HTTP/1.0 200 OK
SHOUTcast sends this:
ICY 200 OK
Android's HTTP client doesn't like this. The good news is that with a different server, you can link directly to the MP3 stream, and it will open up on Android. Instead of linking to the playlist file like you would do for iOS, link to the stream. Android will detect the content type audio/mpeg, and open whatever player is configured for that content type.
Icecast is compatible with this method. Alternatively, I offer a hosting service that can relay your SHOUTcast streams for Android. E-mail me at brad#audiopump.co if you are interested.
Related
I have a live audio stream hosted on ice cast server. There is an API that returns the information about the audio played and also details of the actual audio being played (mp3 file).
I would like to know how to play an live audio stream from server in android app? I believe I will have to use Ice cast client? Are there any other alternative streaming APIs that I can use?
If you can point out some libraries it would be great help.
The built in multimedia capabilities of Android should work just fine. Just give it the stream URL (not the playlist).
I have never worked on video related project, however we have to now.
1. What we tried to do
Build an Andriod application which can take the real time steam of video an audio.
Send the captured stream to Server
Other clients(Either Android client or iOS or HTML5) can view these streams
All of the above three steps should work at the same time.
Video streamed to server should be cached by future play.
2. What I know at the moment
I have searched at google and sf to see if someone have the same requirement.
After that I know a little about the video transformation:
Protocol:
RTSP/RTP/RTCP
RTSP: control the state of the transformation like PLAY,PAUSE,STOP..
RTP: which do the real transport job
RTCP: work in conjunction with RTP(synchronize the stream)
HTTP:
1) Download the small pieces of the video file and play them, use the `range-requset` to control the download(play) location.
2) HLS by Apple. Even it said it is live stream, it is based on `.m3u8` file, by updating the index of which to do the live job.
RTMP by Adobe.
Encoding:
Nothing I know yet.
And it seems that RTSP/RTP/RTCP can be used for both uploading to server and playing at the client. So it apply for the application which need high real-timing. However since the RTSP/RTP/RTCP based on TCP/UDP so getting through the Router would be a problem.
While the HTTP can only be used for playing at the client(Technologically you can stream the small pieces of file by HTTP, but I think it is not a good idea), so it can be use to play the existed video stream either from file or something else. And you don't worry about the Router, which means it can be used under complex network environment.
For our application, since we do not have a strict requirement for the real-timing during the playing. So we tried to stream the video source from the Android client to Server by RTSP/RTP/RTCP, and serve these streams by HTTP.
2. Questions:
Anything wrong in all of the above?
Is it posssible of my idea:streaming by RTSP/RTP/RTCP and serving
by HTTP.
If yes, it seems that the Server shoud do something to cache the video to a proper format for further serving. I am not sure if this job can be done by a Video Server out of the box, or by myself?
What should I know more about the streaming development(at least for
my current project)? Any tutorial are welcome.
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?
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
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
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
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.
Is it possible to stream video to an Android device by using Windows Media Services? Which protocol should I use between RTSP and HTTP? Actually, I have a video file (MP4 format) at a server and I want to stream video files to an Andriod device.
Currently Android does not support adaptive streaming. I searched for some methods a while ago, but Android does not support any of them. No streaming via Windows Media Server, no support for Flash Media Server and HTTP Live Streaming also does not work. The last one would be the best solution since it does not depend on proprietary protocols - but unfortunately it uses a different container format MPEG-TS and a playlist file M3U8 which Android does not understand at the moment. There is an issue for this - you might want to stare it. ;-)
That said, I would recommend you to just upload the MP4 file to an HTTP server and play it via the HTTP url. If it doesn't play, you have to add some extra streaming information by hinting it - e.g. with MP4Box:
mp4box -hint <filename>
Have fun. :-)
I 've Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I 've Totem video player at client side. The same url or video is failing to work on android device and the application that tries to access that rtsp url breaks with Mediaplayer error (1,-1).
I recently also set up a Wowza streaming server, and had three things trip me up before I could get it to work. One or more of these may help you out.
Wowza Settings:
1) In the Vhost.xml file, make sure that <port>1935</port> is changed to <port> 1935,554 </port> (You may have to use ROOT to start the Wowza server after this. 554 is a reserved port for RTSP streaming).
2) In the Application.xml file make sure PlayMethod is set like this: <PlayMethod>none</PlayMethod>
In your Android Code:
3) In your Android code, the URL needs to follow the format rtsp://serverip/live/myStream.sdp
so NO port number in the URL. This is the one that tripped me up the longest.
After this, I was able to play my video by passing the url right to the MediaPlayer.