0

I am trying to decode my ip camera snapshot.cgi files to stream video. I am trying to implement this behavior Android ICS and MJPEG using AsyncTask.

My problem is, that my link is http://xxx.xxx.xx.xx:100/snapshot.cgi?&loginuse=xxxx&loginpas=xxx. (with authentication). And I can't get it work properly. I can't remove authentication from camera. Can anyone suggest way to authenticate and then get snapshot.cgi?

I tried this: Black screen while trying to stream IP camera in android

DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getCredentialsProvider().setCredentials(new AuthScope(host, AuthScope.ANY_PORT), new UsernamePasswordCredentials(username, password));
res = httpclient.execute(new HttpGet(URI.create(url)));

Overall I am starting to think, maybe it is not an authentication issue? Because I get first snapshot view and then screen is blinking on the same view and does not generate view change. Also if I rotate screen it refreshes the image.

Community
  • 1
  • 1
sanevys
  • 559
  • 1
  • 7
  • 27

1 Answers1

0

The solution was to use videostream.cgi instead of snapshot.cgi

apaul
  • 16,092
  • 8
  • 47
  • 82
sanevys
  • 559
  • 1
  • 7
  • 27
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. – MrUpsidown Aug 03 '14 at 19:47
  • I found answer, but don't know how to express it more clearly. Main thing, what I did, was to change snapshot.cgi direction to videostream.cgi. then youse authentication in url GET from. – sanevys Aug 03 '14 at 20:08