[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-24 Thread Yadnesh
This might not be the right forum for this question, but I am
struggling for some days to get the right combination in
ffserver.conf
Could you please share the ffserver configuration file that you used?

I have tried using ffserver on Ubuntu 8.04 and get a sedmentation
fault

Using ffserver on the adb shell shows following Could not open output
feed file '/tmp/feed1.ffm.ffm' error.

All suggestions to resolve/work around this error are welcome :)

Regards,
Yadnesh

On Jun 22, 7:02 am, Andy Savage a...@bluewire.net.nz wrote:
 *Hi Everyone,*

 This problem is *really* bugging me. It's a lot bigger than a few of us not
 being able to receive RTP.

 It's the fact that Android currently *does not support incoming real time
 streaming*! This is a *huge* problem for a new platform that wants to really
 become the device people buy. Real time video streaming is a huge
 industry... what a big oversight??!! I've posted a bug
 reporthttp://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=...
 but
 I don't expect it to get fixed anytime soon as nobody has posted any
 comments or even starred it.

 However, there is an upside many people say that the beauty about
 open-source is that you can fix it yourself. Sadly I'm not a C-coder and
 would spend months just learning it. So, is anybody able to help me with the
 required patches to OpenCore? I am sure for somebody with some experience
 then it shouldn't be a big deal (I see that RTP is supported using RTSP so
 to pass in a native RTP stream or to support SDP's from SIP shouldn't be too
 hard I guess).

 In the meantime I have been working to overcome this problem, I've attempted
 a solution running FFMpeg  FFServer on the phone itself to stream out RTSP
 (no transcoding just streaming).

 My plan was to use this to stream to the video to the local MediaPlayer...
 Unfortunately the RTSP playing code is very picky on Android. It wouldn't
 play the stream.  However I have successfully gotten VLC to play the stream
 from the phone (although this doesn't help me so much), so I know it works.
 I'm a bit stuck on what to try next!

 Any ideas would be appreciated.

 Kind regards,
 Andy Savage

 --
 The greatest challenge to any thinker is stating the problem in a way that
 will allow a solution
 - Bertrand Russell

 Andy Savage
 Cell Phone:+852 936 34341begin_of_the_skype_highlighting  +852 
 936 34341  end_of_the_skype_highlighting
 Skype ID: andy_savage
 Linked In:http://www.linkedin.com/in/andysavage

 On Thu, Jun 17, 2010 at 3:21 PM, Jez jeremy.a.co...@baesystems.com wrote:
  Thanks,

  I'll give this a try on the 2.1 (Desire) and see if it'll work - as
  I'm slightly suspiscious that
  it may have problems with TRUE live video (aka from an encoder) but
  will post here with what I find.

  Hoping always

  On Jun 9, 9:00 am, Andy Savage a...@bluewire.net.nz wrote:
   On the subject of this thread I have submitted a bug report... For those
   interested you may want to star it or add any useful comments:
 http://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=...

   I hope we can get this resolved. I'm not really a skilled enough coder to
   fix this issue myself (in the C sources). But anybody who could help
  would
   be much appreciated.

   --
   The greatest challenge to any thinker is stating the problem in a way
  that
   will allow a solution
   - Bertrand Russell

   Andy Savage
   Cell Phone: +852 936 34341
   Skype ID: andy_savage
   Linked In:http://www.linkedin.com/in/andysavage

   On Wed, Jun 9, 2010 at 3:58 PM, Andy Savage a...@bluewire.net.nz
  wrote:
You simply pass the RTSP url to MediaPlayer (although I think this
functionality was somewhat broken before 2.1 so I can't be certain that
  it
will work in 1.6-2.0).

You can play it in the same way that you would play a file (but instead
  of
passing the file descriptor pass the URL as a string).

--
The greatest challenge to any thinker is stating the problem in a way
  that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In:http://www.linkedin.com/in/andysavage

On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com
  wrote:

I'm confused by RTSP streaming - I've been trying to stream a LIVE
video to Android (2.1)
and not sure from the discussion here and previous posts that I've
seen if Android can actually receive and play
a LIVE video stream? I don't need any control of the video at all so
just need to stream it.

Jez

On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
 In my example I am using SIP, so the SDP information is actually
exchanged
 this way.

 The RTSP is simply for receiving as a hack to Android's built in
(arbitrary)
 limitations. So the idea is to take the SDP for receiving and wrap
  it
over
 RTSP.

 --
 The greatest challenge to any 

Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-21 Thread Andy Savage
*Hi Everyone,*

This problem is *really* bugging me. It's a lot bigger than a few of us not
being able to receive RTP.

It's the fact that Android currently *does not support incoming real time
streaming*! This is a *huge* problem for a new platform that wants to really
become the device people buy. Real time video streaming is a huge
industry... what a big oversight??!! I've posted a bug
reporthttp://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars
but
I don't expect it to get fixed anytime soon as nobody has posted any
comments or even starred it.

However, there is an upside many people say that the beauty about
open-source is that you can fix it yourself. Sadly I'm not a C-coder and
would spend months just learning it. So, is anybody able to help me with the
required patches to OpenCore? I am sure for somebody with some experience
then it shouldn't be a big deal (I see that RTP is supported using RTSP so
to pass in a native RTP stream or to support SDP's from SIP shouldn't be too
hard I guess).

In the meantime I have been working to overcome this problem, I've attempted
a solution running FFMpeg  FFServer on the phone itself to stream out RTSP
(no transcoding just streaming).

My plan was to use this to stream to the video to the local MediaPlayer...
Unfortunately the RTSP playing code is very picky on Android. It wouldn't
play the stream.  However I have successfully gotten VLC to play the stream
from the phone (although this doesn't help me so much), so I know it works.
I'm a bit stuck on what to try next!

Any ideas would be appreciated.

Kind regards,
Andy Savage

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Thu, Jun 17, 2010 at 3:21 PM, Jez jeremy.a.co...@baesystems.com wrote:

 Thanks,

 I'll give this a try on the 2.1 (Desire) and see if it'll work - as
 I'm slightly suspiscious that
 it may have problems with TRUE live video (aka from an encoder) but
 will post here with what I find.


 Hoping always


 On Jun 9, 9:00 am, Andy Savage a...@bluewire.net.nz wrote:
  On the subject of this thread I have submitted a bug report... For those
  interested you may want to star it or add any useful comments:
 http://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=...
 
  I hope we can get this resolved. I'm not really a skilled enough coder to
  fix this issue myself (in the C sources). But anybody who could help
 would
  be much appreciated.
 
  --
  The greatest challenge to any thinker is stating the problem in a way
 that
  will allow a solution
  - Bertrand Russell
 
  Andy Savage
  Cell Phone: +852 936 34341
  Skype ID: andy_savage
  Linked In:http://www.linkedin.com/in/andysavage
 
 
 
  On Wed, Jun 9, 2010 at 3:58 PM, Andy Savage a...@bluewire.net.nz
 wrote:
   You simply pass the RTSP url to MediaPlayer (although I think this
   functionality was somewhat broken before 2.1 so I can't be certain that
 it
   will work in 1.6-2.0).
 
   You can play it in the same way that you would play a file (but instead
 of
   passing the file descriptor pass the URL as a string).
 
   --
   The greatest challenge to any thinker is stating the problem in a way
 that
   will allow a solution
   - Bertrand Russell
 
   Andy Savage
   Cell Phone: +852 936 34341
   Skype ID: andy_savage
   Linked In:http://www.linkedin.com/in/andysavage
 
   On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com
 wrote:
 
   I'm confused by RTSP streaming - I've been trying to stream a LIVE
   video to Android (2.1)
   and not sure from the discussion here and previous posts that I've
   seen if Android can actually receive and play
   a LIVE video stream? I don't need any control of the video at all so
   just need to stream it.
 
   Jez
 
   On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
In my example I am using SIP, so the SDP information is actually
   exchanged
this way.
 
The RTSP is simply for receiving as a hack to Android's built in
   (arbitrary)
limitations. So the idea is to take the SDP for receiving and wrap
 it
   over
RTSP.
 
--
The greatest challenge to any thinker is stating the problem in a
 way
   that
will allow a solution
- Bertrand Russell
 
Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In:http://www.linkedin.com/in/andysavage
 
On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com
 
   wrote:
 There is a technical limitation to what SDP can legally convey. A
 single SDP document can contain only one end of media
 conversation.
 Therefore it is technically impossible to setup streaming with
 just
 one SDP document there have to be an exchange. When using RTSP or
 SIP
 terminals exchange their SDP information and thus get 

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-17 Thread Jez
Thanks,

I'll give this a try on the 2.1 (Desire) and see if it'll work - as
I'm slightly suspiscious that
it may have problems with TRUE live video (aka from an encoder) but
will post here with what I find.


Hoping always


On Jun 9, 9:00 am, Andy Savage a...@bluewire.net.nz wrote:
 On the subject of this thread I have submitted a bug report... For those
 interested you may want to star it or add any useful 
 comments:http://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=...

 I hope we can get this resolved. I'm not really a skilled enough coder to
 fix this issue myself (in the C sources). But anybody who could help would
 be much appreciated.

 --
 The greatest challenge to any thinker is stating the problem in a way that
 will allow a solution
 - Bertrand Russell

 Andy Savage
 Cell Phone: +852 936 34341
 Skype ID: andy_savage
 Linked In:http://www.linkedin.com/in/andysavage



 On Wed, Jun 9, 2010 at 3:58 PM, Andy Savage a...@bluewire.net.nz wrote:
  You simply pass the RTSP url to MediaPlayer (although I think this
  functionality was somewhat broken before 2.1 so I can't be certain that it
  will work in 1.6-2.0).

  You can play it in the same way that you would play a file (but instead of
  passing the file descriptor pass the URL as a string).

  --
  The greatest challenge to any thinker is stating the problem in a way that
  will allow a solution
  - Bertrand Russell

  Andy Savage
  Cell Phone: +852 936 34341
  Skype ID: andy_savage
  Linked In:http://www.linkedin.com/in/andysavage

  On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com wrote:

  I'm confused by RTSP streaming - I've been trying to stream a LIVE
  video to Android (2.1)
  and not sure from the discussion here and previous posts that I've
  seen if Android can actually receive and play
  a LIVE video stream? I don't need any control of the video at all so
  just need to stream it.

  Jez

  On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
   In my example I am using SIP, so the SDP information is actually
  exchanged
   this way.

   The RTSP is simply for receiving as a hack to Android's built in
  (arbitrary)
   limitations. So the idea is to take the SDP for receiving and wrap it
  over
   RTSP.

   --
   The greatest challenge to any thinker is stating the problem in a way
  that
   will allow a solution
   - Bertrand Russell

   Andy Savage
   Cell Phone: +852 936 34341
   Skype ID: andy_savage
   Linked In:http://www.linkedin.com/in/andysavage

   On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com
  wrote:
There is a technical limitation to what SDP can legally convey. A
single SDP document can contain only one end of media conversation.
Therefore it is technically impossible to setup streaming with just
one SDP document there have to be an exchange. When using RTSP or SIP
terminals exchange their SDP information and thus get to know where to
stream to and from where to accept the stream.

MediaPlayer could accept just one SDP (i.e. streamer's), but then how
would streamer would know where to transmit? Both of them have to
exchange at least supported CODEC information and connection
information (port and IP).

Maybe I am just not aware of SDP format with two node's information.
Can someone share an example?

On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
 I agree with Andy's comment:

 On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:

  There seems to be a limitation that means that it will only accept
  SDP
  information with RTP streams inside if it gets them from the RTSP
stream
  (e.g. it gets this information from SETUP in the RTSP protocal).

 It is possible to play a stream by requesting it via a RTSP request
 (both audio and video are sent over RTP and the MediaPlayer is able
  to
 decode and play them).
 But it is not possible to play live RTP stream by requesting the SDP
 file directly (via an HTTP request). The RTP streams (audio and
  video)
 are sent to the device from the server. The MediaPlayer should
  just
 get the SDP file, listen on the proper ports and decode the streams.
 But it generates an error and do not play the streams.

 Jean

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en-Hide quoted
  text -

   - Show quoted text -

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 

Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-09 Thread Andy Savage
You simply pass the RTSP url to MediaPlayer (although I think this
functionality was somewhat broken before 2.1 so I can't be certain that it
will work in 1.6-2.0).

You can play it in the same way that you would play a file (but instead of
passing the file descriptor pass the URL as a string).

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com wrote:

 I'm confused by RTSP streaming - I've been trying to stream a LIVE
 video to Android (2.1)
 and not sure from the discussion here and previous posts that I've
 seen if Android can actually receive and play
 a LIVE video stream? I don't need any control of the video at all so
 just need to stream it.

 Jez


 On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
  In my example I am using SIP, so the SDP information is actually
 exchanged
  this way.
 
  The RTSP is simply for receiving as a hack to Android's built in
 (arbitrary)
  limitations. So the idea is to take the SDP for receiving and wrap it
 over
  RTSP.
 
  --
  The greatest challenge to any thinker is stating the problem in a way
 that
  will allow a solution
  - Bertrand Russell
 
  Andy Savage
  Cell Phone: +852 936 34341
  Skype ID: andy_savage
  Linked In:http://www.linkedin.com/in/andysavage
 
 
 
  On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com
 wrote:
   There is a technical limitation to what SDP can legally convey. A
   single SDP document can contain only one end of media conversation.
   Therefore it is technically impossible to setup streaming with just
   one SDP document there have to be an exchange. When using RTSP or SIP
   terminals exchange their SDP information and thus get to know where to
   stream to and from where to accept the stream.
 
   MediaPlayer could accept just one SDP (i.e. streamer's), but then how
   would streamer would know where to transmit? Both of them have to
   exchange at least supported CODEC information and connection
   information (port and IP).
 
   Maybe I am just not aware of SDP format with two node's information.
   Can someone share an example?
 
   On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
I agree with Andy's comment:
 
On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:
 
 There seems to be a limitation that means that it will only accept
 SDP
 information with RTP streams inside if it gets them from the RTSP
   stream
 (e.g. it gets this information from SETUP in the RTSP protocal).
 
It is possible to play a stream by requesting it via a RTSP request
(both audio and video are sent over RTP and the MediaPlayer is able
 to
decode and play them).
But it is not possible to play live RTP stream by requesting the SDP
file directly (via an HTTP request). The RTP streams (audio and
 video)
are sent to the device from the server. The MediaPlayer should just
get the SDP file, listen on the proper ports and decode the streams.
But it generates an error and do not play the streams.
 
Jean
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubs­cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en- Hide quoted
 text -
 
  - Show quoted text -

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-09 Thread Andy Savage
On the subject of this thread I have submitted a bug report... For those
interested you may want to star it or add any useful comments:
http://code.google.com/p/android/issues/detail?id=8959q=rtpcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars

I hope we can get this resolved. I'm not really a skilled enough coder to
fix this issue myself (in the C sources). But anybody who could help would
be much appreciated.

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Wed, Jun 9, 2010 at 3:58 PM, Andy Savage a...@bluewire.net.nz wrote:

 You simply pass the RTSP url to MediaPlayer (although I think this
 functionality was somewhat broken before 2.1 so I can't be certain that it
 will work in 1.6-2.0).

 You can play it in the same way that you would play a file (but instead of
 passing the file descriptor pass the URL as a string).

 --
 The greatest challenge to any thinker is stating the problem in a way that
 will allow a solution
 - Bertrand Russell

 Andy Savage
 Cell Phone: +852 936 34341
 Skype ID: andy_savage
 Linked In: http://www.linkedin.com/in/andysavage


 On Mon, Jun 7, 2010 at 5:35 PM, Jez jeremy.a.co...@baesystems.com wrote:

 I'm confused by RTSP streaming - I've been trying to stream a LIVE
 video to Android (2.1)
 and not sure from the discussion here and previous posts that I've
 seen if Android can actually receive and play
 a LIVE video stream? I don't need any control of the video at all so
 just need to stream it.

 Jez


 On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
  In my example I am using SIP, so the SDP information is actually
 exchanged
  this way.
 
  The RTSP is simply for receiving as a hack to Android's built in
 (arbitrary)
  limitations. So the idea is to take the SDP for receiving and wrap it
 over
  RTSP.
 
  --
  The greatest challenge to any thinker is stating the problem in a way
 that
  will allow a solution
  - Bertrand Russell
 
  Andy Savage
  Cell Phone: +852 936 34341
  Skype ID: andy_savage
  Linked In:http://www.linkedin.com/in/andysavage
 
 
 
  On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com
 wrote:
   There is a technical limitation to what SDP can legally convey. A
   single SDP document can contain only one end of media conversation.
   Therefore it is technically impossible to setup streaming with just
   one SDP document there have to be an exchange. When using RTSP or SIP
   terminals exchange their SDP information and thus get to know where to
   stream to and from where to accept the stream.
 
   MediaPlayer could accept just one SDP (i.e. streamer's), but then how
   would streamer would know where to transmit? Both of them have to
   exchange at least supported CODEC information and connection
   information (port and IP).
 
   Maybe I am just not aware of SDP format with two node's information.
   Can someone share an example?
 
   On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
I agree with Andy's comment:
 
On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:
 
 There seems to be a limitation that means that it will only accept
 SDP
 information with RTP streams inside if it gets them from the RTSP
   stream
 (e.g. it gets this information from SETUP in the RTSP protocal).
 
It is possible to play a stream by requesting it via a RTSP request
(both audio and video are sent over RTP and the MediaPlayer is able
 to
decode and play them).
But it is not possible to play live RTP stream by requesting the SDP
file directly (via an HTTP request). The RTP streams (audio and
 video)
are sent to the device from the server. The MediaPlayer should
 just
get the SDP file, listen on the proper ports and decode the streams.
But it generates an error and do not play the streams.
 
Jean
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubs­cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en- Hide quoted
 text -
 
  - Show quoted text -

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you 

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-06-07 Thread Jez
I'm confused by RTSP streaming - I've been trying to stream a LIVE
video to Android (2.1)
and not sure from the discussion here and previous posts that I've
seen if Android can actually receive and play
a LIVE video stream? I don't need any control of the video at all so
just need to stream it.

Jez


On Jun 1, 2:30 am, Andy Savage a...@bluewire.net.nz wrote:
 In my example I am using SIP, so the SDP information is actually exchanged
 this way.

 The RTSP is simply for receiving as a hack to Android's built in (arbitrary)
 limitations. So the idea is to take the SDP for receiving and wrap it over
 RTSP.

 --
 The greatest challenge to any thinker is stating the problem in a way that
 will allow a solution
 - Bertrand Russell

 Andy Savage
 Cell Phone: +852 936 34341
 Skype ID: andy_savage
 Linked In:http://www.linkedin.com/in/andysavage



 On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com wrote:
  There is a technical limitation to what SDP can legally convey. A
  single SDP document can contain only one end of media conversation.
  Therefore it is technically impossible to setup streaming with just
  one SDP document there have to be an exchange. When using RTSP or SIP
  terminals exchange their SDP information and thus get to know where to
  stream to and from where to accept the stream.

  MediaPlayer could accept just one SDP (i.e. streamer's), but then how
  would streamer would know where to transmit? Both of them have to
  exchange at least supported CODEC information and connection
  information (port and IP).

  Maybe I am just not aware of SDP format with two node's information.
  Can someone share an example?

  On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
   I agree with Andy's comment:

   On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:

There seems to be a limitation that means that it will only accept SDP
information with RTP streams inside if it gets them from the RTSP
  stream
(e.g. it gets this information from SETUP in the RTSP protocal).

   It is possible to play a stream by requesting it via a RTSP request
   (both audio and video are sent over RTP and the MediaPlayer is able to
   decode and play them).
   But it is not possible to play live RTP stream by requesting the SDP
   file directly (via an HTTP request). The RTP streams (audio and video)
   are sent to the device from the server. The MediaPlayer should just
   get the SDP file, listen on the proper ports and decode the streams.
   But it generates an error and do not play the streams.

   Jean

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-31 Thread Andy Savage
In my example I am using SIP, so the SDP information is actually exchanged
this way.

The RTSP is simply for receiving as a hack to Android's built in (arbitrary)
limitations. So the idea is to take the SDP for receiving and wrap it over
RTSP.

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Mon, May 31, 2010 at 9:26 AM, Ignas ignas.limanaus...@gmail.com wrote:

 There is a technical limitation to what SDP can legally convey. A
 single SDP document can contain only one end of media conversation.
 Therefore it is technically impossible to setup streaming with just
 one SDP document there have to be an exchange. When using RTSP or SIP
 terminals exchange their SDP information and thus get to know where to
 stream to and from where to accept the stream.

 MediaPlayer could accept just one SDP (i.e. streamer's), but then how
 would streamer would know where to transmit? Both of them have to
 exchange at least supported CODEC information and connection
 information (port and IP).

 Maybe I am just not aware of SDP format with two node's information.
 Can someone share an example?

 On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
  I agree with Andy's comment:
 
  On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:
 
   There seems to be a limitation that means that it will only accept SDP
   information with RTP streams inside if it gets them from the RTSP
 stream
   (e.g. it gets this information from SETUP in the RTSP protocal).
 
  It is possible to play a stream by requesting it via a RTSP request
  (both audio and video are sent over RTP and the MediaPlayer is able to
  decode and play them).
  But it is not possible to play live RTP stream by requesting the SDP
  file directly (via an HTTP request). The RTP streams (audio and video)
  are sent to the device from the server. The MediaPlayer should just
  get the SDP file, listen on the proper ports and decode the streams.
  But it generates an error and do not play the streams.
 
  Jean

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-30 Thread Ignas
There is a technical limitation to what SDP can legally convey. A
single SDP document can contain only one end of media conversation.
Therefore it is technically impossible to setup streaming with just
one SDP document there have to be an exchange. When using RTSP or SIP
terminals exchange their SDP information and thus get to know where to
stream to and from where to accept the stream.

MediaPlayer could accept just one SDP (i.e. streamer's), but then how
would streamer would know where to transmit? Both of them have to
exchange at least supported CODEC information and connection
information (port and IP).

Maybe I am just not aware of SDP format with two node's information.
Can someone share an example?

On May 27, 3:22 pm, debelyoo jean.ross...@gmail.com wrote:
 I agree with Andy's comment:

 On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:

  There seems to be a limitation that means that it will only accept SDP
  information with RTP streams inside if it gets them from the RTSP stream
  (e.g. it gets this information from SETUP in the RTSP protocal).

 It is possible to play a stream by requesting it via a RTSP request
 (both audio and video are sent over RTP and the MediaPlayer is able to
 decode and play them).
 But it is not possible to play live RTP stream by requesting the SDP
 file directly (via an HTTP request). The RTP streams (audio and video)
 are sent to the device from the server. The MediaPlayer should just
 get the SDP file, listen on the proper ports and decode the streams.
 But it generates an error and do not play the streams.

 Jean

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-27 Thread debelyoo
I agree with Andy's comment:

On May 25, 8:36 am, Andy Savage a...@bluewire.net.nz wrote:
 There seems to be a limitation that means that it will only accept SDP
 information with RTP streams inside if it gets them from the RTSP stream
 (e.g. it gets this information from SETUP in the RTSP protocal).

It is possible to play a stream by requesting it via a RTSP request
(both audio and video are sent over RTP and the MediaPlayer is able to
decode and play them).
But it is not possible to play live RTP stream by requesting the SDP
file directly (via an HTTP request). The RTP streams (audio and video)
are sent to the device from the server. The MediaPlayer should just
get the SDP file, listen on the proper ports and decode the streams.
But it generates an error and do not play the streams.

Jean

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-25 Thread debelyoo
Hi Andy,

Good to see that the problem is not only specific to my environment :)
And I hope we could find a solution, or at least one Android engineer
will take a look at this post.

I still stuck on it... I tried on Android 1.6 (G1) and Android 2.1
(HTC Desire). Both do not work.

I'm currently looking into the MediaPlayer sources, to see if I can
get more details about the error and maybe fix the bug myself.

Cheers
Jean

On May 24, 9:45 am, Andy Savage a...@bluewire.net.nz wrote:
 Hi there,

 Any answer to this question? It's bugging me too. Jean, can you tell
 us what version you are testing this on? Have you tried 2.1?

 Cheers,
 Andy

 On May 6, 3:32 pm, debelyoo jean.ross...@gmail.com wrote:



  Hi dillirao,

  I don't receive onPrepared callback.

  After requesting the live stream through the SDP file (http://
  server_ip/live.sdp) I receive the following callbacks:
  - onBufferingUpdate -- Buffering 100%
  - onErrorCallback -- Command PLAYER_INIT completed with an error or
  info PVMFErrCorrupt

  My file is encoded in MPEG-4 part 2, audio is AAC, file format
  is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
  should not be a problem since I'm on Wi-Fi.
  I can stream the same file with a RTSP request from the Darwin server.
  It works smoothly.

  Any idea why the device returns this error ? evn though it can play
  the same stream via RTSP ?

  Jean

  On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com wrote:

   did u received OnPrepared callback.
   Plz write a onErrorcallback and see, if you get error callback.

   whats video profile and audio profile you are using.

   use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
   internet ; if lan, bw is not issu
   for audio: use aac/ again try low bit rate encoding;... amr/ is ok...

   Thanks

   On Thu, Apr 29, 2010 at 6:32 PM, debelyoo jean.ross...@gmail.com wrote:
I try to play a live stream on my android phone using the MediaPlayer
object. But I definitely see a black screen. Does anybody have any
experience with streaming on Android ?

Here is what I'm doing:
I broadcast a stream with Darwin streaming server (via
PlaylistBroadcast) to my Android phone. The stream is sent over RTP to
the IP of my device (unicast). A .sdp file describes my stream.

In my app, I try to play the stream with the following code where url
is rtsp://server_ip/live.sdp

private void playVideo(String url) {
       try {
               //media.setEnabled(false);

               if (player==null) {
                       //System.out.println(create MediaPlayer);
                       player=new MediaPlayer();
                       player.setScreenOnWhilePlaying(true);
               } else {
                       player.stop();
                       player.reset();
               }

               player.setDataSource(url);
               //holder.setFixedSize(320, 240);
               player.setDisplay(holder);

               player.setAudioStreamType(AudioManager.STREAM_MUSIC);
               player.setOnPreparedListener(this);
               player.prepareAsync();
               player.setOnBufferingUpdateListener(this);
               player.setOnCompletionListener(this);
       } catch (Throwable t) {
               System.out.println(Exception in media prep:
+t.toString());
       }
   }

public void onPrepared(MediaPlayer mp) {
               //System.out.println(onPrepared);

               int width=player.getVideoWidth();
               int height=player.getVideoHeight();

               if (width!=0  height!=0) {
                        holder.setFixedSize(width, height);
                        player.start();
               }
}

I always have a black screen, buffering remains at 0%.
I checked that I can play this live stream on VLC and QT on a desktop,
and it works fine. If I request the same file via a direct RTSP
request (rtsp://server_IP/myVideo.mp4) the file plays correctly on my
android phone.

I also tried to request the .sdp file by an HTTP request (http://
server_IP/live.sdp) but the result is the same (black screen).

Does anybody have already succeeded in playing a live stream on an
android phone ?

Cheers
Jean

--
You received this message because you are subscribed to the Google
Groups Android Developers group.  To post to this group, send email 
to android-developers@googlegroups.com
To unsubscribe from this group, send email to  
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   Thank you,
   Dilli Rao. Mwww.arijasoft.com

   --
   You received this message because you are subscribed to the 

Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-25 Thread Andy Savage
In the interests of keeping things together here is the
linkhttp://groups.google.com/group/android-developers/browse_thread/thread/f963e8f7ac35b75bfor
my thread I started in the developers thread just a few days ago
related
to this.

I will file a bug request sometime soon unless anybody else can shed any
light (although I don't know if there will be much attention paid to it). It
is more a feature enhancement than a bug I think, but
it's definitely causing me difficulty.

The functionality to decode RTP streams is already built into OpenCore but
unfortunately you can't pass an SDP file to the MediaPlayer (OpenCore
Wrapper) unless it contains an RTSP stream link inside it. This is a bit
dumb really... what's the point in passing an SDP file in that case? but ah.

There seems to be a limitation that means that it will only accept SDP
information with RTP streams inside if it gets them from the RTSP stream
(e.g. it gets this information from SETUP in the RTSP protocal).

Thus far it seems the only solution is to dump the RTP packets to a file
(periodically close the file and write a new one) then periodically open
these files in mediaplayer. A pretty ugly hack really!

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Tue, May 25, 2010 at 2:19 PM, debelyoo jean.ross...@gmail.com wrote:

 Hi Andy,

 Good to see that the problem is not only specific to my environment :)
 And I hope we could find a solution, or at least one Android engineer
 will take a look at this post.

 I still stuck on it... I tried on Android 1.6 (G1) and Android 2.1
 (HTC Desire). Both do not work.

 I'm currently looking into the MediaPlayer sources, to see if I can
 get more details about the error and maybe fix the bug myself.

 Cheers
 Jean

 On May 24, 9:45 am, Andy Savage a...@bluewire.net.nz wrote:
  Hi there,
 
  Any answer to this question? It's bugging me too. Jean, can you tell
  us what version you are testing this on? Have you tried 2.1?
 
  Cheers,
  Andy
 
  On May 6, 3:32 pm, debelyoo jean.ross...@gmail.com wrote:
 
 
 
   Hi dillirao,
 
   I don't receive onPrepared callback.
 
   After requesting the live stream through the SDP file (http://
   server_ip/live.sdp) I receive the following callbacks:
   - onBufferingUpdate -- Buffering 100%
   - onErrorCallback -- Command PLAYER_INIT completed with an error or
   info PVMFErrCorrupt
 
   My file is encoded in MPEG-4 part 2, audio is AAC, file format
   is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
   should not be a problem since I'm on Wi-Fi.
   I can stream the same file with a RTSP request from the Darwin server.
   It works smoothly.
 
   Any idea why the device returns this error ? evn though it can play
   the same stream via RTSP ?
 
   Jean
 
   On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com wrote:
 
did u received OnPrepared callback.
Plz write a onErrorcallback and see, if you get error callback.
 
whats video profile and audio profile you are using.
 
use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
internet ; if lan, bw is not issu
for audio: use aac/ again try low bit rate encoding;... amr/ is ok...
 
Thanks
 
On Thu, Apr 29, 2010 at 6:32 PM, debelyoo jean.ross...@gmail.com
 wrote:
 I try to play a live stream on my android phone using the
 MediaPlayer
 object. But I definitely see a black screen. Does anybody have any
 experience with streaming on Android ?
 
 Here is what I'm doing:
 I broadcast a stream with Darwin streaming server (via
 PlaylistBroadcast) to my Android phone. The stream is sent over RTP
 to
 the IP of my device (unicast). A .sdp file describes my stream.
 
 In my app, I try to play the stream with the following code where
 url
 is rtsp://server_ip/live.sdp
 
 private void playVideo(String url) {
try {
//media.setEnabled(false);
 
if (player==null) {
//System.out.println(create MediaPlayer);
player=new MediaPlayer();
player.setScreenOnWhilePlaying(true);
} else {
player.stop();
player.reset();
}
 
player.setDataSource(url);
//holder.setFixedSize(320, 240);
player.setDisplay(holder);
 

  player.setAudioStreamType(AudioManager.STREAM_MUSIC);
player.setOnPreparedListener(this);
player.prepareAsync();
player.setOnBufferingUpdateListener(this);
player.setOnCompletionListener(this);
} catch (Throwable t) {
System.out.println(Exception 

Re: [android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-25 Thread mike

On 05/24/2010 11:36 PM, Andy Savage wrote:
In the interests of keeping things together here is the link 
http://groups.google.com/group/android-developers/browse_thread/thread/f963e8f7ac35b75b 
for my thread I started in the developers thread just a few days ago 
related to this.


I will file a bug request sometime soon unless anybody else can shed 
any light (although I don't know if there will be much attention paid 
to it). It is more a feature enhancement than a bug I think, but 
it's definitely causing me difficulty.


The functionality to decode RTP streams is already built into OpenCore 
but unfortunately you can't pass an SDP file to the MediaPlayer 
(OpenCore Wrapper) unless it contains an RTSP stream link inside it. 
This is a bit dumb really... what's the point in passing an SDP file 
in that case? but ah.


RTSP is not a stream. It's a command and control protocol. The SDP 
announcement(s)

is the payload describing the media to be streamed. SIP also uses SDP.

The flow is:
RTSP/PLAY-- client
RTSP/SDP  - client
RTP--- client

Where you just listen for the UDP RTP packets on the port the SDP
announcement told you listen on.

Mike



There seems to be a limitation that means that it will only accept SDP 
information with RTP streams inside if it gets them from the RTSP 
stream (e.g. it gets this information from SETUP in the RTSP protocal).


Thus far it seems the only solution is to dump the RTP packets to a 
file (periodically close the file and write a new one) then 
periodically open these files in mediaplayer. A pretty ugly hack really!


--
The greatest challenge to any thinker is stating the problem in a way 
that will allow a solution

- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Tue, May 25, 2010 at 2:19 PM, debelyoo jean.ross...@gmail.com 
mailto:jean.ross...@gmail.com wrote:


Hi Andy,

Good to see that the problem is not only specific to my environment :)
And I hope we could find a solution, or at least one Android engineer
will take a look at this post.

I still stuck on it... I tried on Android 1.6 (G1) and Android 2.1
(HTC Desire). Both do not work.

I'm currently looking into the MediaPlayer sources, to see if I can
get more details about the error and maybe fix the bug myself.

Cheers
Jean

On May 24, 9:45 am, Andy Savage a...@bluewire.net.nz
mailto:a...@bluewire.net.nz wrote:
 Hi there,

 Any answer to this question? It's bugging me too. Jean, can you tell
 us what version you are testing this on? Have you tried 2.1?

 Cheers,
 Andy

 On May 6, 3:32 pm, debelyoo jean.ross...@gmail.com
mailto:jean.ross...@gmail.com wrote:



  Hi dillirao,

  I don't receive onPrepared callback.

  After requesting the live stream through the SDP file (http://
  server_ip/live.sdp) I receive the following callbacks:
  - onBufferingUpdate -- Buffering 100%
  - onErrorCallback -- Command PLAYER_INIT completed with an
error or
  info PVMFErrCorrupt

  My file is encoded in MPEG-4 part 2, audio is AAC, file format
  is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
  should not be a problem since I'm on Wi-Fi.
  I can stream the same file with a RTSP request from the Darwin
server.
  It works smoothly.

  Any idea why the device returns this error ? evn though it can
play
  the same stream via RTSP ?

  Jean

  On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com
mailto:dillir...@arijasoft.com wrote:

   did u received OnPrepared callback.
   Plz write a onErrorcallback and see, if you get error callback.

   whats video profile and audio profile you are using.

   use : h263/h264 15fps; 176x144 or 320x240  and use low bit
rate , on
   internet ; if lan, bw is not issu
   for audio: use aac/ again try low bit rate encoding;... amr/
is ok...

   Thanks

   On Thu, Apr 29, 2010 at 6:32 PM, debelyoo
jean.ross...@gmail.com mailto:jean.ross...@gmail.com wrote:
I try to play a live stream on my android phone using the
MediaPlayer
object. But I definitely see a black screen. Does anybody
have any
experience with streaming on Android ?

Here is what I'm doing:
I broadcast a stream with Darwin streaming server (via
PlaylistBroadcast) to my Android phone. The stream is sent
over RTP to
the IP of my device (unicast). A .sdp file describes my
stream.

In my app, I try to play the stream with the following
code where url
is rtsp://server_ip/live.sdp

private void playVideo(String url) {
   try {
   //media.setEnabled(false);

   if (player==null) {
 

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-24 Thread Andy Savage
Hi there,

Any answer to this question? It's bugging me too. Jean, can you tell
us what version you are testing this on? Have you tried 2.1?

Cheers,
Andy

On May 6, 3:32 pm, debelyoo jean.ross...@gmail.com wrote:
 Hi dillirao,

 I don't receive onPrepared callback.

 After requesting the live stream through the SDP file (http://
 server_ip/live.sdp) I receive the following callbacks:
 - onBufferingUpdate -- Buffering 100%
 - onErrorCallback -- Command PLAYER_INIT completed with an error or
 info PVMFErrCorrupt

 My file is encoded in MPEG-4 part 2, audio is AAC, file format
 is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
 should not be a problem since I'm on Wi-Fi.
 I can stream the same file with a RTSP request from the Darwin server.
 It works smoothly.

 Any idea why the device returns this error ? evn though it can play
 the same stream via RTSP ?

 Jean

 On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com wrote:





  did u received OnPrepared callback.
  Plz write a onErrorcallback and see, if you get error callback.

  whats video profile and audio profile you are using.

  use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
  internet ; if lan, bw is not issu
  for audio: use aac/ again try low bit rate encoding;... amr/ is ok...

  Thanks

  On Thu, Apr 29, 2010 at 6:32 PM, debelyoo jean.ross...@gmail.com wrote:
   I try to play a live stream on my android phone using the MediaPlayer
   object. But I definitely see a black screen. Does anybody have any
   experience with streaming on Android ?

   Here is what I'm doing:
   I broadcast a stream with Darwin streaming server (via
   PlaylistBroadcast) to my Android phone. The stream is sent over RTP to
   the IP of my device (unicast). A .sdp file describes my stream.

   In my app, I try to play the stream with the following code where url
   is rtsp://server_ip/live.sdp

   private void playVideo(String url) {
          try {
                  //media.setEnabled(false);

                  if (player==null) {
                          //System.out.println(create MediaPlayer);
                          player=new MediaPlayer();
                          player.setScreenOnWhilePlaying(true);
                  } else {
                          player.stop();
                          player.reset();
                  }

                  player.setDataSource(url);
                  //holder.setFixedSize(320, 240);
                  player.setDisplay(holder);

                  player.setAudioStreamType(AudioManager.STREAM_MUSIC);
                  player.setOnPreparedListener(this);
                  player.prepareAsync();
                  player.setOnBufferingUpdateListener(this);
                  player.setOnCompletionListener(this);
          } catch (Throwable t) {
                  System.out.println(Exception in media prep:
   +t.toString());
          }
      }

   public void onPrepared(MediaPlayer mp) {
                  //System.out.println(onPrepared);

                  int width=player.getVideoWidth();
                  int height=player.getVideoHeight();

                  if (width!=0  height!=0) {
                           holder.setFixedSize(width, height);
                           player.start();
                  }
   }

   I always have a black screen, buffering remains at 0%.
   I checked that I can play this live stream on VLC and QT on a desktop,
   and it works fine. If I request the same file via a direct RTSP
   request (rtsp://server_IP/myVideo.mp4) the file plays correctly on my
   android phone.

   I also tried to request the .sdp file by an HTTP request (http://
   server_IP/live.sdp) but the result is the same (black screen).

   Does anybody have already succeeded in playing a live stream on an
   android phone ?

   Cheers
   Jean

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.  To post to this group, send email 
   to android-developers@googlegroups.com
   To unsubscribe from this group, send email to  
   android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Thank you,
  Dilli Rao. Mwww.arijasoft.com

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group. To post to this group, send email to 
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group 
  athttp://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email 
 

[android-developers] Re: Playing live stream (RTP) in MediaPlayer

2010-05-06 Thread debelyoo
Hi dillirao,

I don't receive onPrepared callback.

After requesting the live stream through the SDP file (http://
server_ip/live.sdp) I receive the following callbacks:
- onBufferingUpdate -- Buffering 100%
- onErrorCallback -- Command PLAYER_INIT completed with an error or
info PVMFErrCorrupt

My file is encoded in MPEG-4 part 2, audio is AAC, file format
is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
should not be a problem since I'm on Wi-Fi.
I can stream the same file with a RTSP request from the Darwin server.
It works smoothly.

Any idea why the device returns this error ? evn though it can play
the same stream via RTSP ?

Jean

On May 5, 3:06 pm, dillirao malipeddi dillir...@arijasoft.com wrote:
 did u received OnPrepared callback.
 Plz write a onErrorcallback and see, if you get error callback.

 whats video profile and audio profile you are using.

 use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
 internet ; if lan, bw is not issu
 for audio: use aac/ again try low bit rate encoding;... amr/ is ok...

 Thanks



 On Thu, Apr 29, 2010 at 6:32 PM, debelyoo jean.ross...@gmail.com wrote:
  I try to play a live stream on my android phone using the MediaPlayer
  object. But I definitely see a black screen. Does anybody have any
  experience with streaming on Android ?

  Here is what I'm doing:
  I broadcast a stream with Darwin streaming server (via
  PlaylistBroadcast) to my Android phone. The stream is sent over RTP to
  the IP of my device (unicast). A .sdp file describes my stream.

  In my app, I try to play the stream with the following code where url
  is rtsp://server_ip/live.sdp

  private void playVideo(String url) {
         try {
                 //media.setEnabled(false);

                 if (player==null) {
                         //System.out.println(create MediaPlayer);
                         player=new MediaPlayer();
                         player.setScreenOnWhilePlaying(true);
                 } else {
                         player.stop();
                         player.reset();
                 }

                 player.setDataSource(url);
                 //holder.setFixedSize(320, 240);
                 player.setDisplay(holder);

                 player.setAudioStreamType(AudioManager.STREAM_MUSIC);
                 player.setOnPreparedListener(this);
                 player.prepareAsync();
                 player.setOnBufferingUpdateListener(this);
                 player.setOnCompletionListener(this);
         } catch (Throwable t) {
                 System.out.println(Exception in media prep:
  +t.toString());
         }
     }

  public void onPrepared(MediaPlayer mp) {
                 //System.out.println(onPrepared);

                 int width=player.getVideoWidth();
                 int height=player.getVideoHeight();

                 if (width!=0  height!=0) {
                          holder.setFixedSize(width, height);
                          player.start();
                 }
  }

  I always have a black screen, buffering remains at 0%.
  I checked that I can play this live stream on VLC and QT on a desktop,
  and it works fine. If I request the same file via a direct RTSP
  request (rtsp://server_IP/myVideo.mp4) the file plays correctly on my
  android phone.

  I also tried to request the .sdp file by an HTTP request (http://
  server_IP/live.sdp) but the result is the same (black screen).

  Does anybody have already succeeded in playing a live stream on an
  android phone ?

  Cheers
  Jean

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Thank you,
 Dilli Rao. Mwww.arijasoft.com

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en