# Use a live video stream (from WebRTC) in P5?

**URL:** <https://discourse.processing.org/t/use-a-live-video-stream-from-webrtc-in-p5/23018>\
**Category:** Coding Questions\
**Created:** [August 3, 2020, 4:22pm UTC](https://discourse.processing.org/t/use-a-live-video-stream-from-webrtc-in-p5/23018 "2020-08-03T16:22:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![banggeul](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@banggeul](https://discourse.processing.org/u/banggeul)\
**Post date:** [August 3, 2020, 4:22pm UTC](https://discourse.processing.org/t/use-a-live-video-stream-from-webrtc-in-p5/23018/1 "2020-08-03T16:22:51Z")

</div>

Hello, I’d like to run this WebRTC example ([https://github.com/webrtc/apprtc](https://github.com/webrtc/apprtc)) and manipulate the videos (local as well as remote) using P5. How do I work with the live stream video that’s not created by createCapture()? I thought I could just select the video element and manipulate in P5 but that’s not working.

---

<div class="post-metadata">

**Author:** ![AbrarShahriar](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@AbrarShahriar](https://discourse.processing.org/u/AbrarShahriar)\
**Post date:** [August 4, 2020, 4:47pm UTC](https://discourse.processing.org/t/use-a-live-video-stream-from-webrtc-in-p5/23018/2 "2020-08-04T16:47:46Z")

</div>

> <https://stackoverflow.com/questions/42437971/exporting-a-video-in-p5-js>

  
This should give you a pretty good idea about how to work with webRTC. Specially check kaiido’s answer.

---

<div class="post-metadata">

**Author:** ![vanevery](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vanevery](https://discourse.processing.org/u/vanevery)\
**Post date:** [December 1, 2020, 3:22am UTC](https://discourse.processing.org/t/use-a-live-video-stream-from-webrtc-in-p5/23018/3 "2020-12-01T03:22:29Z")

</div>

Wondering if this library might help:

> **[vanevery/p5LiveMedia](https://github.com/vanevery/p5LiveMedia)**
>
> Simple P5 WebRTC. Contribute to vanevery/p5LiveMedia development by creating an account on GitHub.
