# ipCapture in p5

**URL:** https://discourse.processing.org/t/ipcapture-in-p5/2307
**Category:** p5.js
**Created:** [August 2, 2018, 1:49pm UTC](https://discourse.processing.org/t/ipcapture-in-p5/2307 "2018-08-02T13:49:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TTG](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ttg/32/983_2.png) [@TTG](https://discourse.processing.org/u/TTG)
#### Post date: [August 2, 2018, 1:49pm UTC](https://discourse.processing.org/t/ipcapture-in-p5/2307/1 "2018-08-02T13:49:56Z")

</div>

Dear team, i have an issue connecting my IP camera to the p5 environment.  
p5 works with " capture = createCapture(VIDEO);" in order to access a webcam

Processing 3 has the function ipcapture which allows me to access the IPcamera stream as follows

```auto
import ipcapture.*;

IPCapture cam;

void setup() {
  size(1640,1480);
// cam = new IPCapture(this, "http://192.168.0.18:88", "login", "pasword");

```

I looked in

> [Media type and format guide: image, audio, and video content - Web media technologies | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats)

but i seem not able to make it work. Some advice that leads me in the correct direction would be of great help

---

<div class="post-metadata">

### Author: ![TTG](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ttg/32/983_2.png) [@TTG](https://discourse.processing.org/u/TTG)
#### Post date: [August 4, 2018, 7:47pm UTC](https://discourse.processing.org/t/ipcapture-in-p5/2307/2 "2018-08-04T19:47:22Z")

</div>

any advice on this matter would be of real help and appreciated.

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [August 4, 2018, 8:07pm UTC](https://discourse.processing.org/t/ipcapture-in-p5/2307/3 "2018-08-04T20:07:13Z")

</div>

Processing 3’s IPCapture abilities are not a “function”. They come from a library! Specifically, the ipcapture library.

This library won’t “just work” when you switch to using P5.js. Thankfully, the source for that library is available, here:

> **[singintime/ipcapture](https://github.com/singintime/ipcapture/tree/master/src/ipcapture)**
>
> Automatically exported from code.google.com/p/ipcapture - singintime/ipcapture

So you could - in theory - not use the library, but make use of its source code to do the same thing (connect to a camera at an IP address). Of course you would have to find the JavaScript equivalent for a java Authenticator, but that’s a different story…

* * *

Or you could JFGI for “javascript how to connect to ip camera”.

This looks helpful: [http://how-to.wikia.com/wiki/How\_to\_embed\_IP\_Camera\_in\_web\_page\_and\_website](http://how-to.wikia.com/wiki/How_to_embed_IP_Camera_in_web_page_and_website)

This looks promising: [http://foscam.us/forum/a-how-to-embed-any-foscam-ip-camera-in-webpage-using-1-line-t9113.html](http://foscam.us/forum/a-how-to-embed-any-foscam-ip-camera-in-webpage-using-1-line-t9113.html)

---

<div class="post-metadata">

### Author: ![TTG](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ttg/32/983_2.png) [@TTG](https://discourse.processing.org/u/TTG)
#### Post date: [August 4, 2018, 8:12pm UTC](https://discourse.processing.org/t/ipcapture-in-p5/2307/4 "2018-08-04T20:12:23Z")

</div>

TfGuy44,

Thank you so much for providing a variety of options i can work with.  
I will try and come back once all implemented correctly for others that might have the same issue.

(and yes i knew when calling IPCapture a “function” i knew a person that understands better will have a “sigh” 🙂 Thank you for taking the effort to explain TfGuy44
