# IP camera viewer problem

**URL:** <https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165>\
**Category:** Ignition\
**Created:** [April 5, 2013, 9:07am UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165 "2013-04-05T09:07:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 5, 2013, 9:07am UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/1 "2013-04-05T09:07:35Z")

</div>

Hello.

I’m testing the IP camera viewer with Foscam FI8904W camera. In the camera documentation is stated that camera supports 4 simultaneous connections to stream video. Ok, I tried that with 4 browsers open and I can see all 4 video streams.

When I use IP camera viewer in Igniton with url of the camera, the picture/videostream is showing. Ok. When I run the Ignition/Vision client, the camera picture/stream is showing.  
But… when I run second client, or third, or fourth client, these clients don’t show the live video.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a7edc9cd83f4a19c649e3f581d878f70281cdddd.jpg)  
  
When I look in Ignition console:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ef287c86973f3207a2f513f9449a21ed4fef2269.jpg)  
  
When I look in the browser, I get:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/16768639038905464f7a8fd2ade84776c89a2eff.jpg)  
  
It seems, that IP camera viewer is using more than one connection… or not?

The second thing is, that when I run Ignition client from another site, like my office, the IP camera viewer will not connect to the camera, because my office network is different, than the plant network  
[http://www.inductiveautomation.com/forum/viewtopic.php?f=72&t=5744](http://www.inductiveautomation.com/forum/viewtopic.php?f=72&t=5744). I used urlproxy, like Carl suggested in that post, but the I get:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/84f9d649489e6775ec8c6556f6e30caf790529c4.jpg)  
  
Also in browser I get:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a96044229c7a9a2652564887e6ed4c49ae16eb71.jpg)  
  
I know that is happening, because there is no user and password in the url and camera requires one. But How can I pass parameter inside the parameter? When I do this:

[94.140.94.210:8088/main/system/u … pwd=user12](http://94.140.94.210:8088/main/system/urlproxy?url=http://192.168.13.138:3214/videostream.cgi?user=user12&pwd=user12)

I get the same unauthorised message:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a96044229c7a9a2652564887e6ed4c49ae16eb71.jpg)  

Any ideas?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 5, 2013, 4:09pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/2 "2013-04-05T16:09:25Z")

</div>

That URL is not a MJPG stream url. We only support MJPG stream or JPG stills. Usually the url has something like this:

[192.168.13.138/mjpg](http://192.168.13.138/mjpg)

or something like that.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 5, 2013, 7:20pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/3 "2013-04-05T19:20:46Z")

</div>

Ok, now I’m confused… 😕

What you mean by ‘That URL is not a MJPG stream url’?

If it’s not, how that I can see video in first client that runs? Every client that runs later, they can’t see it.  
This camera has only mjpeg…

I put camera online, so you can test it. Our upload is not so good, so framerates are low.  
If you open four browsers (or four tabs, I’m testing this in Chrome and Safari, in Opera, Firefox and IE doesn’t work) with this links, you can see all four streams.

But when you run four Ignition clients, only the first one will get the video, and other don’t…

[http://bl0610.myfoscam.org:3214/video.cgi?user=user12&pwd=user12](http://bl0610.myfoscam.org:3214/video.cgi?user=user12&pwd=user12)  
[http://bl0610.myfoscam.org:3214/videostream.cgi?user=user12&pwd=user12](http://bl0610.myfoscam.org:3214/videostream.cgi?user=user12&pwd=user12)  
[http://bl0610.myfoscam.org:3214/snapshot.cgi?user=user12&pwd=user12](http://bl0610.myfoscam.org:3214/snapshot.cgi?user=user12&pwd=user12)

Because here is night time, you can’t really see nothing usable. I made a mistake and put the camera behind the window in my office at work, and all you can see is reflection of IR LED in the glass, because there is a strong light outside the front entrance of our offices.

You can also try this link in browser and see the page source: [http://bl0610.myfoscam.org:3214/live.htm](http://bl0610.myfoscam.org:3214/live.htm) with user12 as user and password…

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 5, 2013, 8:51pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/4 "2013-04-05T20:51:35Z")

</div>

Sorry I didn’t realize you could see the first one. I read a little to quick. 😉 I see what is going on now. Can you open the first client with the IP camera viewer and inspect the camera to see how many opened connections there are? We should only open up one connection.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 5, 2013, 9:27pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/5 "2013-04-05T21:27:51Z")

</div>

You might try the latest 7.5.7 beta… Carl just fixed a bug where multiple connection attempts to the camera were being made unnecessarily.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 6, 2013, 9:01am UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/6 "2013-04-06T09:01:56Z")

</div>

I just tried 7.5.7 beta and now it’s working. 😃  
I can run 4 clients and all four are seeing the video stream.  
Thank you @Kevin.Herron. ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

Now, about my second issue:  
If I run clients from the same network where the camera is, then I can see video. But if I run client from from my office (which is in another country), I can’t see the video.  
I tried the urlproxy but I always get unauthorized (last three pictures in my first post), because I can’t (or I don’t know how) pass user and pwd with proxy url…  
To put the camera online (on the internet, outside the factory) isn’t the option. Only Ignition gateway can be accessible from the internet.

Anybody…

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [April 6, 2013, 9:51am UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/7 "2013-04-06T09:51:24Z")

</div>

Hi,

you have to URL-Encode the parameters.

With

```auto
http://94.140.94.210:8088/main/system/urlproxy?url=http://192.168.13.138:3214/videostream.cgi%3Fuser=user12%26pwd=user12
```

i can see a nice picture from your cam (your fence looks a bit damaged 😉 ).

A side node: I recommend to change your gateways admin password before publishing the ip in a forum 😈

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 6, 2013, 10:31am UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/8 "2013-04-06T10:31:59Z")

</div>

Thank you @Chi. ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")  
It’s working. ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

At first I’ve put this string to URL property of IP Camera viewer:

[94.140.94.210:8088/main/system/u … pwd=user12](http://94.140.94.210:8088/main/system/urlproxy?url=http://192.168.13.138:3214/videostream.cgi%3Fuser=user12%26pwd=user12)

and disabled Use Authentication? property of IP Camera viewer. I don’t need it if I pass user and pwd in url, right?  
And I got ‘IOException: Stream is not an MJPEG stream’. No video in the IP Camera viewer.

Then I enabled Use Authentication? property of IP Camera viewer and leave the URL string the same and … voila… camera viewer is showing the video.  
Now I don’t really understand, why must Use Authentication? property of IP Camera viewer be enabled, if I pass the user and pwd with URL string, but… it’s working. 😕

What I’ve noticed is, that now camera viewer is not showing the video every time, when I open the window with viewer on it. I must open another window in client then open the camera window again and it’ll show the video. Sometimes it takes just one try, sometimes I have to do it more times…

I think it would be useful, if the IP Camera viewer would have the possibility to Refresh the connection (or something similar)…  
Or maybe it have, but I didn’t found it yet? 😊

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [April 18, 2013, 9:17pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/9 "2013-04-18T21:17:24Z")

</div>

I believe you can "refresh" the ip camera through scripting by setting the URL first to empty string and then setting it back to the actual URL. Try that and see if it gives you the results you want.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [May 1, 2013, 12:47pm UTC](https://forum.inductiveautomation.com/t/ip-camera-viewer-problem/6165/10 "2013-05-01T12:47:28Z")

</div>

Thank you, Dave, it’s working. I’m satisfied for now… 🙂
