01-29-2009 09:55 PM
We are having some trouble streaming audio files. Our code is working perfectly for streaming video 3gp files but we are using the same code for audio file, mp3s.
url = "rtsp://stream.almipa.com/addictivetech.ca/amo/Oas
player = javax.microedition.media.Manager.createPlayer(url)
When we do player.start();
We can see the data exchange icon on the simulator, but the media doesnt play.
We can see this output on the JDE 4.6 console, when we do player.start() (not sure if this is useful):
AUDIOMANAGER: Stream 1799 callback==null and state==2
SMPtreaming session aquired id=1799
MN: load 3
MN: unload0(3010200)=2 pauseHandle=7fffffff
We are using Blackberry Bold 9000 simulator.
We would greatly appreciate any help in this matter.
01-31-2009 02:54 PM
I don't believe that mp3 stream servers support rtsp. At least I've never seen that in non-phone environments. I think there are other posts and/or documentation that describe how to "stream" mp3 audio. If I recall, your application has to read in chunks of the audio, then pass it along to an mp3 decoder for output.
When you develop a solution, let me know. What I really want to figure out is how to stream windows media audio.
02-03-2009 04:25 AM
I have given the url above in my post:
Try this out in your browser, if you have the real player install you should be able to hear the song.
02-03-2009 09:43 AM
You are correct that the RealPlayer will play the stream, but it is actually using http, not rtsp.
Here's what happens:
1. Browser sees that the protocol is rtsp and passes the address to the relevant application (RealPlayer) rather than trying to open the address itself.
2. RealPlayer tries to start streaming using the address but fails -- RTSP 404 error
3. RealPlayer replaces rtsp with http and tries again -- Success!
02-09-2009 12:20 PM
There are a bunch of open source utilities for debugging or even streaming and conversion.
I've got some on my non-functional linux partition as I recall some of the best only ran there.
In any case, all of these things come down to TCP or UDP packets and it shouldn't be
hard to reflect or intercept working and non-working exchanges for comparison. It may be easiest
to run a packet capture or even netstat while streaming to your desktop and see what
it is really talking to. And, again there are transcoders available IIRC but there were some
patent or other issues getting codecs for some formats.
02-09-2009 01:23 PM
I think you'll have more luck studying the section "Streaming data from a remote source to the media application"
I'm pretty certain that you cannot use rtsp for mp3 streaming. Neither the Blackberry or the content servers support that.
02-09-2009 11:41 PM
I tried settingup a RTSP server and placed a sample mp3 file on it and i can play that mp3 using the default Media plaer on BB.
05-07-2009 09:19 AM
We are trying to play mp3 file using rtsp streaming on blackberry curve. The Player shows as started but no sound comes across.
Any idea why???
Below is the code we used to play the sound. The file plays fine from real player on the PC.
String url = "rtsp://220.127.116.11:554/xyz.mp3";
player = Manager.createPlayer(url);