How To Start a RTSP connection

by Jona » Wed, 10 Dec 2008 04:42:24 GMT


Sponsored Links
 Could someone help me figure out how to initialize the MediaPlayer to
play an RTSP link?  The link is only audio there is no video... would
this matter?

Thanksin Advance!!!

Jona
--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by Dave Sparks » Wed, 10 Dec 2008 16:33:44 GMT


 MediaPlayer m = new MediaPlayer();

m.setDataSource("rtsp://rtsp.yourserver.com/stream.mp3");
m.prepare();
m.start();

You probably want to call the prepare() statement from something other
than your UI thread, because it may take awhile. Alternatively, you
can call prepareAsync() and call start() from the onPreparedListener.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How To Start a RTSP connection

by Jona » Thu, 18 Dec 2008 22:35:57 GMT


 Hi Dave,
I have tried opening the link using the Live555 Media Server to
broadcast the mp3 track.  This broadcast is accessible anywere on the
internet and as well my local network.  I tried accessing via my
wireless connection and using WireShark to record communication and I
could see the first two messages from the MediaPlayer.  OPTIONS, and
DESCRIBE.

My server replied back but a SETUP message was never returned any
ideas? Here is my log.

C->S:
OPTIONS rtsp://76.117.125.33:554/one.mp3 RTSP/1.0
CSeq: 0
User-Agent: PVCore/05.02.00.00 PVPlayer/6.18 (Linux; Android; NJ)
ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
PlayerStarttime: [28/03/2003:22:50:23 00:00]
CompanyID: KnKV4M4I/B2FjJ1TToLycw==
GUID: 00000000-0000-0000-0000-000000000000

C->S:
DESCRIBE rtsp://76.117.125.33:554/one.mp3 RTSP/1.0
CSeq: 1
User-Agent: PVCore/05.02.00.00 PVPlayer/6.18 (Linux; Android; NJ)
Accept: application/sdp
Accept-Encoding:

S->C:
RTSP/1.0 200 OK
CSeq: 0
Date: Mon, Dec 08 2008 01:09:10 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE

S->C:
RTSP/1.0 200 OK
CSeq: 1
Date: Mon, Dec 08 2008 01:09:10 GMT
Content-Base: rtsp://192.168.0.101/one.mp3/
Content-Type: application/sdp
Content-Length: 377

v=0
o=- 520052821747 1 IN IP4 192.168.0.101
s=MPEG-1 or 2 Audio, streamed by the LIVE555 Media Server
i=one.mp3
t=0 0
a=tool:LIVE555 Streaming Media v2008.02.08
a=type:broadcast
a=control:*
a=range:npt=0-194.374
a=x-qt-text-nam:MPEG-1 or 2 Audio, streamed by the LIVE555 Media
Server
a=x-qt-text-inf:one.mp3
m=audio 0 RTP/AVP 14
c=IN IP4 0.0.0.0
a=control:track1

--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by Dave Sparks » Fri, 19 Dec 2008 04:03:48 GMT


 I can only guess that the RTSP client in OpenCore didn't like
something it found the DESCRIBE response. I'm not sure that it can
handle broadcast mode. Maybe someone from PV will be able to provide
some insight.

Did you get an error message back from the MediaPlayer through
onErrorListener?



--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by kamil » Sat, 20 Dec 2008 03:37:28 GMT


 Hi,
I've encountered the very same error as described above. I'm using VLC
as MP3/RTSP streaming server, and this looks exactly like Android
didn't like something he got in DESCRIBE SDP response.

SDP looks like:

v=0
o=- 2819777490 2 IN IP4 192.168.100.108
c=IN IP4 0.0.0.0
t=0 0
a=tool:vlc 0.9.8a
a=range:npt=0-176.091
m=audio 0 RTP/AVP 14
a=rtpmap:14 MPA/90000
a=control:rtsp://192.168.100.108:5554/Test/trackID=0

VLC is streaming single MP3 file.

Debug shows MediaPlayer's error (-1,0) and I haven't manage to find
any explanation of this message.

Does anyone have any idea?

Thanks in advance
Kamil
--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by krzysiek » Sat, 20 Dec 2008 10:52:16 GMT


 Hi,
I have the same problem. I'm streaming media with VLC (it uses
live555) and the log is practically the same. The error code which i
get in the onErrorListner is -1, extra code is 0.

--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by krzysiek » Sat, 20 Dec 2008 10:52:17 GMT


 Hi,
Exactly the same thing is happening with my application. I use VLC to
stream the media(also uses Live555), the logs are the same. The error
code i get from onErrorListner is -1, extra code is 0.

Regards,
Krzysiek

--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by kamil » Sat, 20 Dec 2008 21:14:26 GMT


 Hi,
maybe someone could post here URL of some RTSP stream which is known
to work with G1?
It would really help a lot in finding out why SDP answer is being
rejected.

I believe there must be at least one person which has been testing
Android's RTSP stack ;) Or maybe I'm the only one who leaves testing
to the customer ;D

thanks
Kamil
--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by lucky » Thu, 25 Dec 2008 15:30:39 GMT


 Kamil,

Do you do such RTSP streaming test on emulator or G1 phone?
Or is it possible to test it on emulator?

BRs
wjjsun



--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by Jason » Sat, 03 Jan 2009 04:03:34 GMT


 According to this thread: 



How To Start a RTSP connection

by Paranoia » Sat, 03 Jan 2009 21:34:02 GMT


 exactlypencore dose not support mp3 rtp playback, whatever it's
rfc3119 or rfc2250.



--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by Ravi Yenduri » Sat, 03 Jan 2009 21:45:24 GMT


  http://code.google.com/p/android/issues/detail?id=1513 




--~--~---------~--~----~------------~-------~--~----~



How To Start a RTSP connection

by Paranoia » Sat, 03 Jan 2009 22:08:41 GMT


 thanks. you mean pv will not support mp3 rtp in opencore. right? or it
is some value-add feature?
i heard that it's not opencore in G1, but core.





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. app can't run in full screen mode with avd 800*480 (skin wvga800)

Any chance you declared something like this in your manifest?

<supports-screens android:largeScreens = "false" />

the described outcome of such a setting is something like what you
describe, with your app displayed as a postage stamp with black
borders on sides and bottom (but not top?)

On Jun 13, 1:43am, "xuxiake2...@gmail.com" <xuxiake2...@gmail.com>



-- 

2. get IP and MAC address

How to get IP address and MAC address.

 

Thanks

shakeel

-- 

3. Activity within TabActivity: onResume not always called when tab selected?

4. Upgrade AmonRa di Dream [WTA] Cara update Recovery ROM

5. Finalizing a Cursor that has not been deactivated or closed non-fatal error

6. GLES/IntBuffer/?? Mis-placed verts?

7. Make entire screen disabled