# Spout for P5.js?

**URL:** <https://discourse.processing.org/t/spout-for-p5-js/3550>\
**Category:** Project Guidance\
**Created:** [September 15, 2018, 9:54am UTC](https://discourse.processing.org/t/spout-for-p5-js/3550 "2018-09-15T09:54:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luxurianttuber](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@luxurianttuber](https://discourse.processing.org/u/luxurianttuber)\
**Post date:** [September 15, 2018, 9:54am UTC](https://discourse.processing.org/t/spout-for-p5-js/3550/1 "2018-09-15T09:54:15Z")

</div>

I every one.  
I began to learn Processing few weeks ago, Quickly I discover there is something called P5.js.  
I want to develop tools for interactive and procedural VJing. I would like to know if there is something like Spout, or a protocol, to work with video stream.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![julian2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/julian2/32/1551_2.png) [@julian2](https://discourse.processing.org/u/julian2)\
**Post date:** [September 16, 2018, 12:19pm UTC](https://discourse.processing.org/t/spout-for-p5-js/3550/2 "2018-09-16T12:19:34Z")

</div>

not sure if there’s an easy way to get video (from a stream / source?), if it’s from file there’s the `createVideo()` [https://p5js.org/reference/#/p5/createVideo](https://p5js.org/reference/#/p5/createVideo), you might have some luck looking into [https://p5js.org/reference/#/p5/createCapture](https://p5js.org/reference/#/p5/createCapture), that should let you grab a videostream from a webcam.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 12:28pm UTC](https://discourse.processing.org/t/spout-for-p5-js/3550/3 "2018-09-16T12:28:25Z")

</div>

Spout shares GPU textures between applications (or at least tries to 😄 ). I doubt you’ll find anything for P5.js that does that. But you might be able to send via webrtc?

---

<div class="post-metadata">

**Author:** ![luxurianttuber](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@luxurianttuber](https://discourse.processing.org/u/luxurianttuber)\
**Post date:** [September 16, 2018, 10:17pm UTC](https://discourse.processing.org/t/spout-for-p5-js/3550/4 "2018-09-16T22:17:54Z")

</div>

Thanks for your answer…maybe webrtc could be a solution.  
Don’t think createVideo(); is the tool to properly send the canvas to another software such as resolume.
