Logic Machine Forum
camera url, how to give username and password directly in url - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: camera url, how to give username and password directly in url (/showthread.php?tid=1073)



camera url, how to give username and password directly in url - gjniewenhuijse - 01.11.2017

Hello,

In my visualisation (HL 2.0.1) i added a camera and added the following url:
http://user:password@1.1.1.1/mjpg/video.mjpg

Url and user and password are 100% right.

But my camera image is never displayed.

When i remove the user and password in my url my visualisation popup a login dialog and after entering the same user and password is give me the display.

How can i pass my username and password directly in the url?


RE: camera url, how to give username and password directly in url - Thomas - 01.11.2017

Hi
I'm afraid this URL syntax is no longer supported by browsers for security reasons. You can try to use https instead of http but I think you're out of luck.
I use Vivotek cameras and I have the same issue. I'm thinking about HTML5 RTSP player because RTSP can be set without logon credentials in Vivotek.


RE: camera url, how to give username and password directly in url - Erwin van der Zwart - 01.11.2017

Hi,

The controller uses a img element in the cam container to avoid scrollbars etc, but this type of element has not the same function as a iframe, so you can’t pass credentials in the URL.

What you can do is make a widget with a iframe to your cam, this way can pass credentials, but there might be some css needed to avoid scrollbars.

Or make a hidden frame, check persist box, and when iframe logs in to URL the img container is also logged on by same source policy. I have on most sites good results, but sometimes its hard to bypass.

BR,

Erwin


RE: camera url, how to give username and password directly in url - buuuudzik - 01.11.2017

(01.11.2017, 13:25)gjniewenhuijse Wrote: Hello,

In my visualisation (HL 2.0.1) i added a camera and added the following url:
http://user:password@1.1.1.1/mjpg/video.mjpg

Url and user and password are 100% right.

But my camera image is never displayed.

When i remove the user and password in my url my visualisation popup a login dialog and after entering the same user and password is give me the display.

How can i pass my username and password directly in the url?

You can try to find other URL. I had the same issue with BCS cameras with such URL but I found that BCS cameras accept also such URL which are still working:
http://IP_address/cgi-bin/snapshot.cgi?chn=1&u=admin&p=password

Maybe Vivotek cameras also support such URLs?


RE: camera url, how to give username and password directly in url - gjniewenhuijse - 02.11.2017

i use Axis cams, type M3004 and P3364.

I think its more related to firmware update or isn't that possible. After using 2.0.1 my customer complains about this problem, not before.

He used on IOS - safara, and Microsoft Edge as clients. Maybe he updated windows and ios also, but i don't think so.

Also entering the visualisation on IOS asked for a username and password, how to disable this?


RE: camera url, how to give username and password directly in url - Erwin van der Zwart - 02.11.2017

Hi,

No there aren't any changes done in the camera img element, the only thing the controller does is adding a img element with camera URL into the HTML stucture, and the rest is handled by browser. So if it stops working it can't be caused by FW versions if you ask me.

BR,

Erwin


RE: camera url, how to give username and password directly in url - gjniewenhuijse - 02.11.2017

(02.11.2017, 07:54)Erwin van der Zwart Wrote: Hi,

No there aren't any changes done in the camera img element, the only thing the controller does is adding a img element with camera URL into the HTML stucture, and the rest is handled by browser. So if it stops working it can't be caused by FW versions if you ask me.

BR,

Erwin

ok, thanks.

Then i remove the username and password from the url, so he can enter this settings when he opens the camera.


RE: camera url, how to give username and password directly in url - Thomas - 02.11.2017

(01.11.2017, 19:46)Erwin van der Zwart Wrote: Hi,

The controller uses a img element in the cam container to avoid scrollbars etc, but this type of element has not the same function as a iframe, so you can’t pass credentials in the URL.

What you can do is make a widget with a iframe to your cam, this way can pass credentials, but there might be some css needed to avoid scrollbars.

Or make a hidden frame, check persist box, and when iframe logs in to URL the img container is also logged on by same source policy. I have on most sites good results, but sometimes its hard to bypass.

BR,

Erwin
Hi
I tried it but neither my MS browsers support http://username:password@url syntax. They simply ignore the whole frame.

(01.11.2017, 20:03)buuuudzik Wrote:
(01.11.2017, 13:25)gjniewenhuijse Wrote: Hello,

In my visualisation (HL 2.0.1) i added a camera and added the following url:
http://user:password@1.1.1.1/mjpg/video.mjpg

Url and user and password are 100% right.

But my camera image is never displayed.

When i remove the user and password in my url my visualisation popup a login dialog and after entering the same user and password is give me the display.

How can i pass my username and password directly in the url?

You can try to find other URL. I had the same issue with BCS cameras with such URL but I found that BCS cameras accept also such URL which are still working:
http://IP_address/cgi-bin/snapshot.cgi?chn=1&u=admin&p=password

Maybe Vivotek cameras also support such URLs?

Good point! Syntax http://URL/video3.mjpg?user=uuuu&pw=pppp works well!
Thank you for the idea.


RE: camera url, how to give username and password directly in url - buuuudzik - 02.11.2017

NiceSmile


RE: camera url, how to give username and password directly in url - gjniewenhuijse - 03.11.2017

Maybe anyone a idea how to do this with a Axis M3004?


RE: camera url, how to give username and password directly in url - buuuudzik - 03.11.2017

(03.11.2017, 06:41)gjniewenhuijse Wrote: Maybe anyone a idea how to do this with a Axis M3004?

You should find apropriate parameters user/password to your camera. Sometimes are user=admin&password=pass sometimes u=admin&p=password or user=admin&pwd=password. If there is no such parameters in your camera url now you should add these parameters like below:


before: http://IPADDRESS/videostream.asf?resolution=[WIDTH]*[HEIGHT]

after: http://IPADDRESS/videostream.asf?resolution=[WIDTH]*[HEIGHT]&user=[USERNAME]&pwd=[PASSWORD]


BCS has in some points same software like axis because some URLs are compatible. If these addresses which I showed above is not working check also below:
http://IPADDRESS/cgi-bin/snapshot.cgi?chn=[CHANNEL]&u=[USERNAME]&p=[PASSWORD]
http://IPADDRESS/cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]
http://IPADDRESS/videostream.asf?user=[USERNAME]&pwd=[PASSWORD]&resolution=[WIDTH]*[HEIGHT]


You can check addresses from these sites:
https://www.ispyconnect.com/man.aspx?n=BCS
http://www.camera-sdk.com/p_146-how-to-connect-to-your-axis-ip-camera-onvif.html