1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

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:
    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 videoview emulator

,
how to play video from localhost to android
,

stream android emulator

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