Hi,
I am working on developing an app in which one of its features includes receiving a video stream from a webcam and displaying it through a videoView. I've been able to stream video before using VLC, but can't seem to get it working with my Android App.
In VLC, after choosing my webcam as the video source to stream, I choose http stream, and for transcoding I choose MP4 for encapsulation and H-264 as the video codec. (I believe these are the formats supported by Android) the generated stream output string is as follows:
:sout=#transcode{vcodec=h264,vb=800,scale=1,acodec =none}:http{mux=ffmpeg{mux=flv},dst=:8080/} :sout-keep
now on the android side, inside the onCreate method, my code looks like this:
mVideo = (VideoView) findViewById(R.id.videoView1);
MediaController mc = new MediaController(this);
mc.setMediaPlayer(mVideo);
mVideo.setMediaController(mc);
mVideo.setVideoPath("my_ipaddress:8080");
mVideo.requestFocus();
mVideo.start();
I am able to go on a different computer and capture the stream using VLC, but when I run the app on my Android device, I get a message that tells me the video can't be played. Not sure where the issue is, and I've been able to find a few similar post on here and on other forums, but still haven't found a solution that works for me. Any help would be greatly appreciated. Thanks!
I am working on developing an app in which one of its features includes receiving a video stream from a webcam and displaying it through a videoView. I've been able to stream video before using VLC, but can't seem to get it working with my Android App.
In VLC, after choosing my webcam as the video source to stream, I choose http stream, and for transcoding I choose MP4 for encapsulation and H-264 as the video codec. (I believe these are the formats supported by Android) the generated stream output string is as follows:
:sout=#transcode{vcodec=h264,vb=800,scale=1,acodec =none}:http{mux=ffmpeg{mux=flv},dst=:8080/} :sout-keep
now on the android side, inside the onCreate method, my code looks like this:
mVideo = (VideoView) findViewById(R.id.videoView1);
MediaController mc = new MediaController(this);
mc.setMediaPlayer(mVideo);
mVideo.setMediaController(mc);
mVideo.setVideoPath("my_ipaddress:8080");
mVideo.requestFocus();
mVideo.start();
I am able to go on a different computer and capture the stream using VLC, but when I run the app on my Android device, I get a message that tells me the video can't be played. Not sure where the issue is, and I've been able to find a few similar post on here and on other forums, but still haven't found a solution that works for me. Any help would be greatly appreciated. Thanks!