How to stream video with Android Emulator
This is a discussion on How to stream video with Android Emulator within the Droid Development forums, part of the Droid Hacking category; 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 ...
-
How to stream video with Android Emulator
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
Last edited by ngubk; 10-22-2011 at 10:25 AM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By XEURONIX in forum Android Roms
Replies: 3
Last Post: 02-15-2012, 10:07 PM
-
By wgormley in forum Droid X General Discussions
Replies: 2
Last Post: 04-10-2011, 10:32 PM
-
By xxpigxx in forum Droid Applications
Replies: 0
Last Post: 02-13-2011, 09:55 PM
-
By ppppowerbook in forum Droid Audio / Video
Replies: 8
Last Post: 07-28-2010, 07:51 PM
-
By cnmsales in forum Droid Applications
Replies: 8
Last Post: 05-30-2010, 03:04 AM
Search tags for this page
android how to stream video
,
how to stream movies to droid
,
how to stream video on android
,
how to stream video to android
,
how to stream video with mediacontroller in android code
,
how to stream videos in android/
,
how to stream videos on android
,
rtsp android x2
,
rtsp on droid razr
,
stream a video on network android
,
stream video on android
,
streaming to emulator android
,
streaming url rtsp on emulator android
,
video in android emulator
,
videoview emulator
Click on a term to search our site for related topics.