Android :: Possible To Use Media Player To Play Streaming Audio?
Mar 21, 2010
The dev guide suggests this
MediaPlayer mp = new MediaPlayer();
I can't seem to get it working though.
I'm getting "java.io.IOException: Prepare failed.: status=0x1"
I am currently new to android development I been working on the examples in the Dev Guide in the android website. I want to get a stream from a server I have to play in the emulator when I insert the url it doesn't seam to want to play. My question is there a way to get the emulator to play audio or is it all enabled also does MediaPlayer require a special kind of format like mp3 or ogg? his is the code i am running on my 'onCreate()' method. MediaPlayer mp - new MediaPlayer(); mp.setDataSource(MY_URL_); mp.prepare(); mp.start()
I tried to play a piec of 16-bit .wav audio file, no sound came out from my earphone, but .mp3 file would be OK. Do any one else have this kind of experience? This is the code: player = MediaPlayer.create(this, R.raw.test); // I put test.wav in /res/raw player.start();
I am new in Android. I am using android os 2.2. I am trying to play streaming audio and video from url. I don't know what to do for that. after 3 days og googling i come to know that I have to use mediaPlayer and MediaController classes.I had use different differend combination of codes found on internet but not succeed.Can anybody guide me what to do for streaming audio/video playing. What about the UI if we use MediaPlayer or Controller class. is there any thing to related these in xml file of layout.if not then even please tell me what may be the code for that.please help me.
My favorite TV and FM stations all have links on there websites for live streaming vidoe/audio. They all have Quicktime or Windows Media links but my Evo will not plahy them. I've tried several Radio apps on the Market but no luck with them either. Is this a planned fix or do I have to go back to to a I-phone or a windows based phone?
In my music app, i would like to play live streaming like radio broadcasting with mediaplayer as Mediaplayer mp = new Mediaplayer(); mp.setDataSource(LiveStreamingURL); mp.prepare(); mp.start(); but after playing for few seconds it is stopped. I dont know how to overcome it. Give me your suggestions for this.
Recently I just create an app (that is using mediaplayer) to play the RTSP Streaming. At the beginning,I use the SIM card to connect to the internet. I try to let the app play for many times. But it was only success once. Many times the app could not play and the buffer always shows 0%. While I use the WiFi to connect the internet, the rtsp could be played but when I use the another WiFi to connect to the internet, to my surprise it failed. Both the SIM card and WiFi, it all could play the http Streaming. The RTSP Streaming is very strange, I can not understand. I guess there is maybe something wrong with Wireless.
I've got my HTC Desire and i got to listen to my favorite radio station. To do that i got to have an media player that can use url's like win amp or windows media player from windows for example. I've tried most of the e-radio software like tune wiki last. FM etc but it does not help.
I am trying to figure out how to set the default player for streaming video on my EVO. I know there is a player on it from HTC called "Streaming Media Player" but it doesn't seem to be the default and I would like it to be. When I am using the Engadget app, and the article has a button to click for a video they have created, my phone seems to use the You Tube player and on occasion it just errors, but if I go to the actual article on the engadget web site and click the video, it opens in the HTC player and works fine. I don't get an option to choose which player I want to use when I click on videos, can I change any of this?
I'm wondering what the current state of streaming online audio through bluetooth stereo is, post cupcake. I think the consensus is that it's not currently possible, but I feel like it should be. In fact, it does ALMOST work. Using StreamFurious or Dizzler, it will start to play and stutter a few seconds, then cut out totally. I can hear a song begin to play, but the audio is choppy and then goes out. So, bluetooth seems to be making, but not maintaining a connection to the audio stream. How to remedy this? I want my streaming SOMAFM.COM.
i have a very simple test app (see below), that simply tries to play a streamed audio file below over and over. after running for about half an hour (the file itself is only like 3.5 minutes or so), I get the following error:
I am on the brink of buying my first Android phone (HTC Desire) and have just stumbled across some postings about Vodafone's restrictions on streaming audio and video. I have read a few articles on this now, but I really don't understand exactly what the blocks apply to. It seems to apply to "RTSP" streaming, but I'm not clear about what this is and whether this just applies to live streaming, or also to recorded video such as clips on the BBC News site.Does this apply only to Vodafone, or also to other networks? I was thinking of getting a new contract with Vodafone because the coverage with my current provider Orange in my area is very poor, and because Vodafone have the best price for the Desire. However if this streaming problem applies to all video on Vodafone, I may well pay a little more and go for O2. I don't know whether this would make any difference, but I will be going for an unbranded and unlocked phone through CPW.
I'm a subscriber to a show which I listen to on the PC while I work. I'd like to be able to listen to it on my new Droid X.There are three links on the site. The first one streams to windows media player. The second link streams to real audio. The third link downloads a podcast in mp3 format. So far I haven't figured out how to get any of them to work.The windows media link brings up a video player that says the file can not be displayed or played.The RA link downloads an .ra file. Selecting the file brings up the stock music player, which says it can't play the file. (I do have the RA beta installed but it doesn't appear to be associated with .ra files and I don't know how to fix that. Are there mime types in android?)The mp3 link gives the error "Cannot download. The content is not supported on this phone." Now that's just wrong. It's an MP3 file. The stock player should be able to play it.I'm not greedy -- I'd be happy if any one of these three possibilities worked.
Within Windows Media Player 12 (Win 7 x64), I have checked "Stream > Automatically allow devices to play my media" Unfortunately, when I open up Media Share on the Droid X, and continue to the music folder, it doesn't show anything - instead it lists "no files found" Open Media Share -> Computer -> Play -> Next -> Next (DLNA) -> Next (allow remote playback stuff) -> Next (confirming we're connected to the same network) -> Then I go tot he All Music folder, and the Droid X says "No files to display"
I am working on a application that would allow users to play remote files. My question is how do I open those remote files to be played in the default android player?but this does not give me control of what is happening!
I guess no one cares to listen to their favorite music in the order the artist intended? we now listen to timeless classic Opera in whatever order? makes no difference? Classic Rock albums out of order? Pink Floyd "Dark Side of the Moon"?
My application gets playlist from a XML file, requests URL of mp3 file from server, downloads and plays it. It was able to download mp3 file but unable to play it. When I used emulator with Android 2.1, it was displayed in LogCat:
I would like to find an media player that plays videos but when I minimize or multitask to another app I want the videos audio to keep playing like pandora does. The reason for this is bcuz I rip videos off of youtube to mainly listen to the music.
I am looking for a media player - to play all kind of music formats, mp3, wav, etc. Also it would be good to have a player that have a simple search through folders capability to go to navigate to phone's internal memory. The player that comes with Incredible has the capability to search through folders in the internal memory, but I don't think it plays all formats. On the other hand I see that "market" place is full of different players, but all that I downloaded only search on SD card and does not have capability to navigate to internal storage. I know one of the simplest solutions would be to put all music on SD card, but heck we have 8Gb of internal storage why not to use it?
Just got my G1 9 days ago. Sweet! I'm assuming that in the near future, almost everything imaginable will be available to install. I miss my "Pocket Player" for WM6, as I used it to access a radio station on the phone. Here is the url: http://www.957theride.com/listen/links/wxrc30.asx
I have looked in the "market" on the phone and a number of programs purport to play some form of "streaming audio", but they all seem to connect to someone's server that has a playlist of songs that someone else likes. Does anyone know of, or have the sense that someone will actually develop an app that allows one to put in a url such as the one above, and actually be able to listen to the radio station as you would on a radio or on a PC?
I really want to know why I can not hear any sound whatsoever simply because the video uses 5.1ch aac instead of 2ch aac. The video part of mp4 plays perfectly, encoded to h.264. I would really like to know if there is any media player able to play these videos correctly without having to resort to any kind of re-encoding (a waste of time when the original encodes should play fine) or having to use special 5.1ch headphones (bulky and not practical to keep on hand all the time). Also, does anyone know if this might be corrected with Froyo 2.2? And last, all my videos that have 2ch audio play as they should, sound and all. Same codec settings were used.
I'm still trying to get to grips with the folder/filing system of the Desire's SD card. I have yet to put any of my own MP3's onto the phone but have put on a few short audio clips which I created at work. These were on the phone mainly so I could transport them home but I also occasionally play them from the phone. However I don't want them cropping up amongst music in the music player app/widget, but it seems no matter where I put them on the SD card they appear. The only exception is if I put them in media => ringtones which isn't ideal. Are there any other places where i can put them where they won't be found by the media player?
I create a "mplayer" to play the rtsp on the emulator. When the "mplayer" play the http ,it is ok. MediaPlayer mplayer = new MediaPlayer(); mplayer.setDataSource("rtsp://test.intra.3g.sina.com.cn/streaming/ 20090313/wenjiabao1.mp4"); mplayer.prepare(); mplayer.start(); but when it play the rtsp, it doesn't work. The Wireshark shows UDP Checksum Incorrect.