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. How to correctly organize layouts for different screen type?

I just got a hold of an HTC Evo and well my app really looked bad... :
(  What a shame my part...  But the app looked great on another device
I got Xperia X10.

The differences:
Evo: 480x800
X10: 480x854

Currently I have only 2 layouts that need special attention.  My
questions... What is the best way to properly handle screens
resolution/sizes/types?

I thought I would create the following resource folders:
res/layout
res/layout-800x480
res/layout-854x480

Does anyone know if this is the best way to handle specific layouts
for specific screens?  Doing it by resolution size?

I read over and over this but still a bit confused... What do you guys
do in general?
http://developer.android.com/guide/practices/screens_support.html

Thanks,
Moto

-- 

2. Desire .NeoPhyTe ROM v1.4a Sense-FroY

berikut kla{*filter*} {*filter*}tara ROM Desire FroYo Sense UI
yang udh ane jajal....

1. NeoPhyTe ROM v1.4a Sense-FroYo
  - Quadrant 1510
  - Linpack  41.01 MFLOPS

2. Official Froyo HTC Sense ROM v1.0c | OpenDesire Team
  - Quadrant 1442
  - Linpack  41.01 MFLOPS

3. Pays-ROM Desire Froyo Sense v1.3 A2SD+ with Addon
  - Quadrant 1423
  - Linpack  41.01 MFLOPS

4. DJ DROID v1.1-R1 - with HTC Sense
  - Quadrant 1418
  - Linpack  41.01 MFLOPS

5. LeeDrOiD Mod V1.3
  - Quadrant 1396
  - Linpack  38.122 MFLOPS

selamat menikmati...

* sruput Kopi Ginseng + Tongkat Ali

-- 
"Indonesian Android Community [id-android]" 

Join:  http://www.***.com/ 
Moderator: id.andr...@gmail.com
ID Android Developer:  http://www.***.com/ 
ID Android Surabaya:  http://www.***.com/ 
ID Android on FB:  http://www.***.com/ 

3. View Help Please

4. LVL and Settings.Secure.ANDROID_ID - how secure?

5. Emulator 2.1 & 2.2 reverse geocoding not available

6. Fwd: View on Image

7. push notification and xml/json parsing