5 ms·
Show HN: Dithering a real-time video media stream
- detaro 5y agodoesn't show anything in the demo
- rikroots 5y agoDid the browser ask for your permission to use your device's web cam?
- detaro 5y agono, this device also doesn't have one, but nothing indicated that would be needed.
- rikroots 5y agoMany thanks for the feedback. I've added a warning note to the demo so others who stumble across it will be aware it uses the device camera, and needs user permission before anything shows on the canvas.
- detaro 5y agoIt's obviously not as clearly "proof" that it is live, but maybe you could add a fallback video that's processed if the user doesn't have a camera or doesn't grant access to it.
- rikroots 5y agoOP: Given that I'm doing this in a 2D canvas - with no help from web workers, webgl, wasm, etc - I'm quite impressed to get a 10fps output on my local machine. The reduce-palette filter is good for black-white and grayscale dithering, and can also calculate a commonest colors palette (based on euclidean distance) in the LAB color space. Edit: I've tested on chrome on desktop. Interested to hear on which devices it doesn't work.