Hi All,

For quiet some time now I am trying to stream over RTP files on my machine
to my Android device.  I am using FFMpeg to do the task of reading media
files and do the RTP packetization.  I am using the FFServer to work as RTSP
server for my stream.

The stream Video is in H.264 format and Audio is in AAC format.  See below
the SDP that is returned by FFServer.    H.264 and AAC are Android supported
media formats.  But I am getting error (see below) when trying to play the
RTSP stream using application developed using MediaPlayer class.

Is streaming of video and audio in separate streams packetized using RTP
format supported in Android 1.6?  If RTP live is supported by MediaPlayer,
Can anyone please give tips about which encoder variation does Android 1.6
expects to have been used?  Within H.246/AAC there are many variations,
probably Android does not like the encoder that I am using :)

I have already gone through a relevant post Playing live stream (RTP) in
MediaPlayer:
http://groups.google.com/group/android-developers/browse_thread/thread/ebb4ca5b298a8d92/b4e94e9855cf2ff5?lnk=gst&q=RTP#.


But the details there added to my confusion:
I can see a post quoting that RTSP is broken on 1.6:

    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).

Also  I see another message that says it should work:

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).


Could anyone knowing Android internals or experienced with RTSP help resolve
the confusion?

SDP sent by RTSP server
=====================================
o=- 0 0 IN IP4 127.0.0.1
s=No Title
c=IN IP4 0.0.0.0
t=0 0
a=tool:libavformat 52.73.0
m=audio 0 RTP/AVP 97
b=AS:16
a=rtpmap:97 MPEG4-GENERIC/44100/2
a=fmtp:97
profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdelta
length=3; config=1210
a=control:streamid=0
m=video 0 RTP/AVP 96
b=AS:64
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;
sprop-parameter-sets=Z0LAC/QYJ0IAAAMAAgAAAwAoHih VQA==,aM48gA==
a=control:streamid=1
=====================================


Player error in logcat
=====================================
07-21 19:41:09.751: DEBUG/PlayerDriver(1501): buffering (0)
07-21 19:41:09.962: DEBUG/PlayerDriver(1501): buffering (0)
07-21 19:41:09.992: DEBUG/PlayerDriver(1501): buffering (100)
07-21 19:41:11.653: DEBUG/AudioSink(1501): bufferCount (4) is too small and
increased to 12
07-21 19:41:11.653: ERROR/AudioMIO(1501): latency could NOT be set !! set it
later
07-21 19:41:11.713: ERROR/PlayerDriver(1501): HandleErrorEvent:
PVMFErrCorrupt
07-21 19:41:11.713: ERROR/MediaPlayer(1467): error (1, -10)
07-21 19:41:11.713: ERROR/MediaPlayer(1467): Error (1,-10)
07-21 19:41:11.713: INFO/Media Player(1467): Unspecified media player error
-10
07-21 19:41:11.872: INFO/SV(1467): surfaceChanged W=192 H=144
07-21 19:41:12.152: WARN/PlayerDriver(1501): PVMFInfoErrorHandlingComplete
=====================================

Regards,
Yadnesh
-- 

----------------------------------------------------------------------
Christopher Morley - There is only one success - to be able to spend your
life in your own way.

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

Reply via email to