Use this simple example:I directed the camera's output to a local IP server and opened it using VLC. While streaming I could view the measured FPS in terminal.
Code:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script> <link rel="stylesheet" href="global.css"> <script> let video;function setup() { frameRate(15); createCanvas(500, 500); video = createCapture(VIDEO); video.size(width, height); video.hide(); }function draw() { background(0); image(video, 0, 0, width, height); } </script></head><body></body></html>
Statistics: Posted by krommefanger — Sun Jan 21, 2024 3:40 pm