Thanks for helping. But I still do not see any Video :( I was using application created using VideoView for playing the RTSP stream. Now I use a application created using MediaPlayer, and have onVideoSizeChangedListener() implemented. Logs show that onVideoSizeChangedListener() gets called.
I captured the SDP that is sent by the RTSP server to my application. When I am using MPEG4 Video the response shows that video stream is MP4V-ES: =================================================================== 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;indexdeltalength=3; config=1210 a=control:streamid=0 m=video 0 RTP/AVP 96 b=AS:64 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=1; config=000001B001000001B58913000001000000012000C48D8800550604121463000001B24C61766335322E37392E31 a=control:streamid=1 =================================================================== I have also tried using H.263 and H.264 video streams. In case of H. 263, no error is shown but no video is rendered on the screen. and the logs show "AudioTrack(554): obtainBuffer timed out (is the CPU pegged?)" multiple times In case of MPEG4 and H.264, the following error is seen on Android 1.6 =================================================================== 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) =================================================================== Could you please advice what is going wrong in this? Do I need to modify the player or something needs to be fixed at the RTSP streamer side? Regards, Yadnesh On Jul 21, 3:19 am, Indicator Veritatis <[email protected]> wrote: > Then again, Googling 'android "PV SW DECODER is used forMPEG4"' > suggests your problem is completely different from what I just > suggested in another post: it suggests that you need to provide an > onVideoSizeChangedListener() as > inhttp://developer.android.com/guide/samples/ApiDemos/src/com/example/a.... > > Have you done this? Or are you using the built in media player in the > emulator? > > Please recall: you did say you were using the emulator, but you did > not say which program you were using for playback. > > On Jul 19, 10:44 pm, Yadnesh <[email protected]> wrote: > > > > > I have transcoded media using ffmpeg to MP4 file, and these play well > > on Android. But I want to playback streaming media over RTSP. > > > Format of MP4 file that plays on android: (as shown by ffprobe) > > =========================================================================== > > ============ > > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': > > Metadata: > > major_brand : isom > > minor_version : 0 > > compatible_brands: mp41 > > encoder : vlc 1.0.1 stream output > > encoder-eng : vlc 1.0.1 stream output > > Duration: 00:00:09.80, start: 0.000000, bitrate: 456 kb/s > > Stream #0.0(eng): Audio: aac, 44100 Hz, mono, s16, 18 kb/s > > Stream #0.1(eng): Video:mpeg4, yuv420p, 192x144 [PAR 3:4 DAR > > 1:1], 432 kb/s, 14.99 fps, 25 tbr, 1001 tbn, 25 tbc > > =========================================================================== > > ============ > > > The only difference that I am making is sending the audio and video > > streams over RTP using RTSP. Now that refuses to play. > > > Regards, > > Yadnesh > > > On Jul 20, 10:34 am, Yadnesh <[email protected]> wrote: > > > > I am new to the media domain. I am streaming using ffmpeg and > > > ffserver. > > > In ffserver configuration I choose format as RTP and video codec as > > >mpeg4so I thought thatmpeg4is the codec that I am using. > > > > My aim is to get the Audio/Video playback on Android when reading the > > > stream from RTSP. So referring to the Android supported Media formats > > > (http://developer.android.com/guide/appendix/media-formats.html), I am > > > streaming AAC audio andMPEG4video in RTP format ffmpeg and > > > ffserver. The FFServer configuration provides access to the stream > > > over RTSP connection. > > > > I am not able to hear any audio (I am struggling to find solution, but > > > currently focusing on the Video only). When streaming only video it > > > seems to work fine on Android 2.2. But shows error on Android 1.6. > > > > I am testing only with Emulator. > > > > Any suggestions/questions? What audio/video codecs should I encode > > > the stream for smooth playback on Android 1.6 or later? > > > > Regards, > > > Yadnesh > > > > On Jul 20, 7:49 am, Indicator Veritatis <[email protected]> wrote: > > > > > First suggestion: tell us more than 'MPEG4', which is only a container > > > > format. We need to know what is in the container, e.g., if the audio/ > > > > video codecs are supported by your phone, too. The LogCat extract does > > > > not tell us. > > > > > On Jul 18, 10:30 pm, Yadnesh <[email protected]> wrote: > > > > > > Anybody any ideas or questions/suggestions? > > > > > > Regards, > > > > > Yadnesh > > > > > > On Jul 16, 3:30 pm, Yadnesh <[email protected]> wrote:> Hi, > > > > > > > I am sending aMPEG4 videostreamin RTP format over RTSP to > > > > > > myandroidemulator using ffmpeg and ffserver. I use theAndroid > > > > > > VideoView toplaythe RTSPstream. I do not see thevideo. The error > > > > > > in LogCat is pasted below. Is there some specific that I need to > > > > > > do? > > > > > > > If I use theAndroid2.2 to run the same code, thevideoplays fine. > > > > > > > I also tried codingvideousing H263, but thatstreamdoes > > > > > > notplayin1.6/2.2 emulator > > > > > > =========================================================================== > > > > > > ======== > > > > > > 07-16 15:50:46.073: DEBUG/PlayerDriver(554): buffering (6) > > > > > > 07-16 15:50:46.273: DEBUG/PlayerDriver(554): buffering (6) > > > > > > 07-16 15:50:46.474: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:46.683: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:46.884: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:47.092: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:47.293: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:47.492: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:47.703: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:47.902: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:48.113: DEBUG/PlayerDriver(554): buffering (73) > > > > > > 07-16 15:50:48.123: DEBUG/PlayerDriver(554): buffering (100) > > > > > > 07-16 15:50:48.162: ERROR/SW_DEC(554): PV SW DECODER is used > > > > > > forMPEG4 > > > > > > 07-16 15:50:48.223: INFO/MP(807): onPrepared called > > > > > > 07-16 15:50:48.223: INFO/MP(807): vv start > > > > > > 07-16 15:50:48.252: INFO/mediaDuration3(807): -1 > > > > > > 07-16 15:50:48.384: ERROR/PlayerDriver(554): HandleErrorEvent: > > > > > > PVMFErrCorrupt > > > > > > 07-16 15:50:48.652: WARN/PlayerDriver(554): > > > > > > PVMFInfoErrorHandlingComplete > > > > > > 07-16 15:50:48.652: ERROR/MediaPlayer(807): error (1, -10) > > > > > > 07-16 15:50:48.652: ERROR/MediaPlayer(807): Attempt to call > > > > > > getDuration without a valid mediaplayer > > > > > > 07-16 15:50:48.652: ERROR/MediaPlayer(807): error (-38, 0) > > > > > > 07-16 15:50:48.794: ERROR/MediaPlayer(807): Error (1,-10) > > > > > > 07-16 15:50:48.794: DEBUG/VideoView(807): Error: 1,-10 > > > > > > 07-16 15:50:48.794: INFO/MP(807): onError called > > > > > > 07-16 15:50:49.063: ERROR/MediaPlayer(807): Error (-38,0) > > > > > > 07-16 15:50:49.072: DEBUG/VideoView(807): Error: -38,0 > > > > > > 07-16 15:50:49.072: INFO/MP(807): onError called > > > > > > =========================================================================== > > > > > > ======== > > > > > > > Regards, > > > > > > Yadnesh -- 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

