Android mediaplayer radio streaming with wma codec - android

I'm trying to play radio audio stream from the media player in android 4.0.3 API15.
Some of the stations work, but a lot of the stations fail, for example :
http://switch3.castup.net/cunet/gm.asp?ai=31&ar=88FM
This station(and many other) is returning me the following error:
error (1,-21477483648).
I checked the codec being used in that station and its wma.
The media player doesnt support this codec but i know that there is application("Radio Israel") that can play this station.
My question is , is there any workaround for playing that stream?
Thanks

WMA is a Windows format and Android is Linux. You could use a proxy server of your own to encode into MP3 (or another format) then stream from there.

Related

Android - Live audio streaming from server

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).

Play audio RTMP stream on android

Has anyone had any success playing back an audio RTMP stream on Android using http://code.google.com/p/android-rtmp-client or know of any other non-flash solutions. The example that comes with the android rtmp source records the audio to a file but I'm looking for example code that plays back over speakers (or bluetooth).
The easiest way to play an audio RTMP stream in Android has a partial discussion of what's needed.

What playlist format does Android 2.2 support to stream?

Hello i am trying to get my android 2.2 app stream music. So far I have been able to stream from a radio station via the mediaPlayer.setDataSource("STREAM HERE")
I have tried with a m3u file and it won't work (unless my m3u file is wrong). Can it support xspf or what other file types?
How could i go about solving this problem?
thanks a lot
The setDataSource() method on the media player will accept file or URIs for a media source. Look at this list to see what media formats the media player accepts: http://developer.android.com/guide/appendix/media-formats.html
I am fairly certain that the media player will not play playlist files like M3U. You would have to create your own M3U player, which could be accomplished via the MediaPlayer method: setOnCompletionListener(MediaPlayer.OnCompletionListener listener)
Register a callback to be invoked when the end of a media source has been reached during playback.
When playback is done, you could start playing the next media resource in your playlist.

Problem playing media from RTSP URL in Android

I have made a Android streaming application that plays media from online URL's. For playing the media, I am using the
standard MediaPlayer class for playing media.
As per the Android documentation, it supports RTSP protocol for audio & video playback
http://developer.android.com/guide/appendix/media-formats.html
But when I am trying to play media from a RTSP URL, it gets connected but I am not able to hear any media
Following is one of those RTSP URL -
rtsp://sfera.live24.gr/sfera4132
Does anybody media have an idea of playing RTSP URL's through the Android MediaPlayer
Thanks
That link you provided has 3 audio tracks, with the first and last tracks appearing to be silent and don't contain any valid audio.
The middle track has audio (as per VLC). I don't know how Android deals with multiple audio tracks. I imagine you may get better results if you use links that only contain 1 audio and 1 video track at most.
I expect for an rtsp stream with multiple audio tracks, android is only going to play the first one as there is no user interface to select a specific audio stream, hence why you aren't hearing any audio.
If this is a stream from your own server, to hear the audio you should adjust the SDP file the valid audio track first. If this is not from your server, I don't know what you're options are.

Can FLV AAC stream be played in Android

I'm trying to build a radio player and the client is providing a stream which is a FLV container with the audio being AAC
When I read the headers it shows up as audio/aacp.
I have tried all possible ways such as using the
1) Streaming through mediaplayer (Does not work)
2) Use the NPR mode of using a proxy stream (I get a broken pipe exception)
3) Play it in chunks ( Plays but I need the SDCard and the playback is not very great)
4) Use the GPL'd FAAD2 Library but I would have to pay the royalty fee
Can some one help me out on figuring this issue out.
The last option that I have is to have my client change the stream to mp3 container (which I know that it works)
Regards,
Hari

Categories

Resources