通过使用 createVideo() 和 image() 函数,你可以将视频上传到画布中。由于视频捕捉是通过 image() 构造函数传递的,你可以使用 filter() 方法给视频捕捉添加滤镜。要在本地运行这个示例,你需要一个正在运行的 本地服务器。如果想要构建一个不在画布内嵌入的视频,请参见 视频 示例。
画布上的视频: Revised by Kasey Lichtlyter. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: 2023 code, pre-2023 code. You can suggest improvements by contributing to the current website!