How to stream video with Android Emulator

Discussion in 'Android Hacks and Help' started by ngubk, Oct 22, 2011.

  1. ngubk
    Offline

    ngubk New Member

    Joined:
    Oct 22, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Nice to meet you all!!! I'm still new to Android. I try to write a simple program to stream video but the returned message is always::Sorry, this video cannot be played". Here's the code:
    Code:
    public class Video_testActivity extends Activity {    public static VideoView mVideoView;
        public static MediaController mediaController;
    
        public static String path_uri = "rtsp://localhost:554/sample_100kbit.mp4";
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            mVideoView = (VideoView) findViewById(R.id.VideoView);
    
            mediaController = new MediaController(this);
            mediaController.setAnchorView(mVideoView);
    
             Uri video = Uri.parse(path_uri);
      
             mVideoView.setMediaController(mediaController);
             mVideoView.setVideoURI(video);
             //videoView.setVideoPath(path);
             mVideoView.start();
        }
    }
    "rtsp://localhost:554/sample_100kbit.mp4" is the address of the streamed video. I can view it just fine using vlc
     
Search tags for this page
android emulator streaming
,
android emulator streaming video
,

android videoview emulator

,
how to play video from localhost in android
,
how to play video from localhost to android
,

stream android emulator

,
stream video from android code
,
streaming videoview in android emulator