0

I have a problem with playing video stream on Android device. I am using Raspberry PI Camera Board.

On RaspberryPI I run RTSP server:

uv4l --driver raspicam --auto-video_nr --framerate 12     
cvlc v4l2:///dev/video0 --v4l2-width 176--v4l2-height 144 --v4l2-chroma h264 --sout '#rtp{sdp=rtsp://:8554/}'

and I try play it on Android by code:

 String uri = "rtsp://localhost:8554/test";
        VideoView v = (VideoView) findViewById( R.id.videoView );
        v.setVideoURI( Uri.parse(uri) );
        v.setMediaController( new MediaController( this ) );
        v.requestFocus();
        v.start();

Android gets me error that video cannot be played.
VLC Player in MS Windows works fine.
How can I configure raspicam / cvlc to play video on Android?
Thanks, LK

luke
  • 13
  • 4

1 Answers1

0

It seems that VideoView has problems with rtsp live streaming. If the length of the stream is unknown,it says "Can't play video". I also want to know the solution for this problem. Vlc for android works fine, but I don't know how to integrate it within my application.

android_dev
  • 3,886
  • 1
  • 33
  • 52