I am trying to fetch mjpeg live video stream from server to android.I read this answer.it is very helpful to me.It works with this demo url.But, In my video stream it asking for username and password.
To set url into MjpegView:
setContentView(mv);
mv.setSource(MjpegInputStream.read(URL));
MjpegInputStream:
public static MjpegInputStream read(String url) {
HttpResponse res;
DefaultHttpClient httpclient = new DefaultHttpClient();
try {
res = httpclient.execute(new HttpGet(URI.create(url)));
return new MjpegInputStream(res.getEntity().getContent());
} catch (ClientProtocolException e) {
} catch (IOException e) {}
return null;
}
As in web browser whenever i open my server link..it asking for 'password' & 'username'.so where to put params in this read() ? and also want to know if my live video is in H.264 format. then how can i convert it into MJPEG format?Also its speed is very slow and not smooth.how to improve it?
Thanks in Advance!!