# Embed webcam in Pluto

**URL:** <https://discourse.julialang.org/t/embed-webcam-in-pluto/45989>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [September 3, 2020, 6:20am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989 "2020-09-03T06:20:33Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![evad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evad/32/15756_2.png) [@evad](https://discourse.julialang.org/u/evad)\
**Post date:** [September 3, 2020, 6:20am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/1 "2020-09-03T06:20:34Z")

</div>

It was so cool to see a webcam embedded in a Pluto notebook. But as I tried out the codes shown in the screenshot, I got an error saying `camera_input` not defined. So what is missing here to achieve the same?🤔🤔🤔

 ![Screenshot_20200903_141713_org.mozilla.firefox](https://global.discourse-cdn.com/julialang/original/3X/f/3/f329855d2d76970352e1646528a48c604cc20a5f.jpeg)

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 3, 2020, 7:01am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/2 "2020-09-03T07:01:59Z")

</div>

Which OS are you using? i assume a camera capture application such as Cheese on Linux or Webcam on windows shows the image from your camera OK?

---

<div class="post-metadata">

**Author:** ![evad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evad/32/15756_2.png) [@evad](https://discourse.julialang.org/u/evad)\
**Post date:** [September 3, 2020, 7:08am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/3 "2020-09-03T07:08:42Z")

</div>

MacOS. the function `camera_input` call must be from certain package? tried VideoIO, Images, PlutoUI not them…

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 3, 2020, 7:34am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/4 "2020-09-03T07:34:33Z")

</div>

Have a look here please [Pluto.jl webcam available?](https://discourse.julialang.org/t/pluto-jl-webcam-available/44077)  
And here  
[https://github.com/lukavdplas/pluto-notebooks/blob/master/svd.jl](https://github.com/lukavdplas/pluto-notebooks/blob/master/svd.jl)

I may be making a fool of myself, but it uses Javascript.  
Maybe your browser has some settings which disable image capture for a security reason?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [September 3, 2020, 11:55am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/5 "2020-09-03T11:55:54Z")

</div>

is it meant to work? I just did `using Pluto`

But doesn’t seem to work

---

<div class="post-metadata">

**Author:** ![evad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evad/32/15756_2.png) [@evad](https://discourse.julialang.org/u/evad)\
**Post date:** [September 3, 2020, 12:29pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/6 "2020-09-03T12:29:31Z")

</div>

I guess some customized javascript plays the magic… I will close this.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [September 3, 2020, 12:50pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/7 "2020-09-03T12:50:46Z")

</div>

The notebook Grant was using contains the Javascript code for the live webcam.  
We are intending to make a version of this notebook available.

---

<div class="post-metadata">

**Author:** ![fonsp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fonsp/32/222349_2.png) [@fonsp](https://discourse.julialang.org/u/fonsp)\
**Post date:** [September 3, 2020, 12:58pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/8 "2020-09-03T12:58:26Z")

</div>

It’s defined somewhere else in Grant’s notebook - you need to load the whole notebook for it to work

[https://github.com/mitmath/18S191/blob/master/lecture\_notebooks/Lecture%201%20-%20Images.jl](https://github.com/mitmath/18S191/blob/master/lecture_notebooks/Lecture%201%20-%20Images.jl)

---

<div class="post-metadata">

**Author:** ![evad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evad/32/15756_2.png) [@evad](https://discourse.julialang.org/u/evad)\
**Post date:** [September 3, 2020, 1:18pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/9 "2020-09-03T13:18:14Z")

</div>

have you quitted ] mode?

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 3, 2020, 1:22pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/10 "2020-09-03T13:22:05Z")

</div>

Does this page work for you

> **[Accessing Your Webcam in HTML5](https://www.kirupa.com/html5/accessing_your_webcam_in_html5.htm)**
>
> Learn how the video element combined with the getUserMedia function can help you display your webcam's video stream in the browser.

---

<div class="post-metadata">

**Author:** ![evad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evad/32/15756_2.png) [@evad](https://discourse.julialang.org/u/evad)\
**Post date:** [September 3, 2020, 1:24pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/11 "2020-09-03T13:24:36Z")

</div>

yes, and the notebook itself contains a detailed definition of `camera_input` as @fonsp has pointed out.

Thank you all for the help!

---

<div class="post-metadata">

**Author:** ![fonsp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fonsp/32/222349_2.png) [@fonsp](https://discourse.julialang.org/u/fonsp)\
**Post date:** [September 3, 2020, 1:38pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/12 "2020-09-03T13:38:41Z")

</div>

@xiaodai You need to run Pluto, and inside the main menu, paste the link to that notebook

`using Pluto` is never used inside a notebook - it’s used inside the REPL to launch the notebook server

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [September 3, 2020, 2:05pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/13 "2020-09-03T14:05:58Z")

</div>

> [@johnh](#):
>
> Does this page work for you

I think the other pages help. With this, I need to know how to bind it with Pluto.jl so this needs to be read in conjuction with a Pluto.jl guide.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [September 3, 2020, 3:43pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/14 "2020-09-03T15:43:00Z")

</div>

The [kiripa.com](http://kiripa.com) link was intended as an independent test that the webcam is functioning and that an image can be read from it. Sorry - I did not make that clear.

---

<div class="post-metadata">

**Author:** ![cpschmidt2](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@cpschmidt2](https://discourse.julialang.org/u/cpschmidt2)\
**Post date:** [November 8, 2020, 2:08pm UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/15 "2020-11-08T14:08:09Z")

</div>

I’m also having problems with the webcam in Pluto. I’m running Windows 10, and have checked that my chrome browser has JavaScript enabled. The webcam works fine in Accessing Your Webcam in HTML5.  
I’m working on HW1 downloaded from GitHub and all I get for an image is the Enable Webcam image.

---

<div class="post-metadata">

**Author:** ![cpschmidt2](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@cpschmidt2](https://discourse.julialang.org/u/cpschmidt2)\
**Post date:** [November 9, 2020, 2:04am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/16 "2020-11-09T02:04:21Z")

</div>

I see now that there has been a fix in the last two days on GitHub:  
[https://github.com/mitmath/18S191/commit/f54733249deadb5ebed71831f4ed23f7b1d82a7d](https://github.com/mitmath/18S191/commit/f54733249deadb5ebed71831f4ed23f7b1d82a7d)

---

<div class="post-metadata">

**Author:** ![Ashwani\_Rathee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ashwani_rathee/32/49551_2.png) [@Ashwani\_Rathee](https://discourse.julialang.org/u/Ashwani_Rathee)\
**Post date:** [December 20, 2021, 7:30am UTC](https://discourse.julialang.org/t/embed-webcam-in-pluto/45989/17 "2021-12-20T07:30:29Z")

</div>

How do I get past the enable webcam image part? I have given the camera permission but grant seems to be using keyboard keys to enable it somehow
