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).
Related
How can we stream audio from the server live in an android app ?. As we have HttpLivestreaming in IOS, do we have anything like that which we can use?
My android app needs to play a live video from a remote RTMP server (Adobe Flash Media Server).
As android's android.media.MediaPlayer doesn't support rtmp protocol, I found a library which provides me with streaming functionality. I.e. I can connect and receive portions of video stream as byte array.
The question is how I can use this incoming video stream data to display it in a view?
It seems that current standard API doesn't allow me to do that. MediaPlayer accepts either file or url. For audio data there is an AudioTrack which allows to achieve similar goal to mine, but for audio. For video I don't see an option.
Any suggestions are appreciated, maybe there is a third party media library which may provide the functionality for Android.
We have enabled multicast streaming in one of our machines using VLC server. We use the following URL for streaming the multicast data.
rtp://239.1.2.11:5004 & udp://239.1.2.11:1234
But when we pass these links to the VideoView or mediaplayer in android, we get the message as "Sorry, the video can not be played".
Is it the case that multicast streaming is not supported in android? (Though multicastsocket class is present in library) or are we missing anything?
The links play well on the VLC client so we don't think there is any issue in VLC server.
We are using android v2.3 for development.
I am not at all an expert in video encoding, but I think the problem is not with the streaming, I think it is with the encoding of your videos. You should have a look at Android Supported Media Formats and make sure that your video encoding,format,resolution meet the recommendation specified there.
I want to know is it mandatory to use any of the streaming servers like Darwin,Wowza or VLC to stream an RTSP live stream video? I am receiving an RTSP link from my client and it tends to change everytime. I can successfully play it in the VLC player but on phone I cant see anything. I tried playing a sample link having .3gp extension and it worked fine. But my links dont have an extension. They look like this rtsp://122.166.229.151:1950/1346a0cf0ef7c2. Please help me.If its compulsory to use an extension or a server, I will continue working in that direction.
A streaming server (as you describe) isn't strictly necessary - as long as you can pull RTSP from whatever your source is, you should be able to see it. Most IP cameras have onboard RTSP servers (although I wouldn't put too many connections on it). If you can see it in VLC, the phone should be able to consume it as well, given that the codec used to encode is one supported by the android device (in most cases, if you're doing H.264 Baseline 3.0 with AAC, you should be good to go).
A streaming server like Wowza can make that stream available to a wider audience than pulling directly from the source device, but if you're not intending to broadcast to a wide audience, it's not required for streaming to Android devices.
Newer versions of Android (Gingerbread and later) are also able to consume Apple HTTP Live Streaming.
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. :-)