A real-time webcam feed converter that transforms your camera input into ASCII art. Built with Next.js, React, and TypeScript.
Check it out https://webcam2ascii.vercel.app/
- Real-time webcam capture
- Dynamic ASCII art conversion
- Responsive design
- Dark mode support
- Monospace font optimization
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- react-webcam
- Clone the repository:
git clone https://github.com/fac3m4n/webcam2ascii.git
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000
to see the app in action.
The application captures frames from your webcam in real-time and processes them through the following steps:
- Captures video frames using react-webcam
- Converts each frame to a canvas element
- Processes the image data to calculate brightness values
- Maps brightness values to ASCII characters
- Renders the ASCII art on the canvas
The ASCII conversion uses a character set from darkest to lightest: .:-=+*#%@
You can customize the ASCII output by modifying the following parameters in the WebcamAscii component:
- Character set for ASCII conversion
- Character width and height
- Font size and style
The application requires:
- A modern browser with WebRTC support
- Camera/webcam access permissions
- JavaScript enabled
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.