Turn your webcam into a living 8-bit VHS tape.
PixCam is a real-time Python application that processes your webcam feed to mimic the aesthetic of early 90s digital hardware. It combines pixel quantization, color crushing, CRT scanlines, and chromatic aberration glitches into a live video feed.
- Real-time Pixelation: Adjustable downsampling for that crunchy low-res look.
- Color Quantization: Reduces millions of colors down to a retro palette (8 colors).
- CRT Scanlines: Simulates the horizontal raster lines of old monitors.
- VHS Glitch: Random (and manual) chromatic aberration effects (RGB channel splitting).
- GIF Recorder: Built-in tool to record and save retro loops directly from the app.
- Smart Saving: Automatically organizes all screenshots and clips into an
output/folder.
-
Clone the repository
git clone https://github.com/thanyow/PixCam.git cd PixCam -
Install dependencies
pip install -r requirements.txt
-
Run the app
python pixcam.py
| Key | Action |
|---|---|
Q |
Quit the application |
S |
Screenshot (Saved to output/ folder) |
G |
Glitch (Hold down to force the broken VHS effect) |
R |
Record GIF (Press once to start, press again to save) |
PixCam uses OpenCV and NumPy to manipulate image arrays in real-time:
- Downscale & Upscale: Uses
INTER_LINEARto shrink andINTER_NEARESTto stretch back up, preserving hard pixel edges. - Bitwise Math: Colors are crushed using integer division to create "steps" in the gradient.
- Channel Splitting: The "Glitch" effect physically separates the Blue and Red channels of the image array and shifts them horizontally.
- GIF Engine: Uses Pillow to stack frames in memory and export them as an animated GIF when you stop recording.
To keep your project clean, PixCam automatically creates an output/ folder.
- Screenshots are saved as:
output/pixcam_shot_YYYYMMDD_HHMMSS.png - GIFs are saved as:
output/pixcam_clip_YYYYMMDD_HHMMSS.gif
Feel free to fork this project and add:
- Different color palettes (GameBoy Green, Sepia, etc.)
- Face tracking (using MediaPipe) to pixelate only the background!
Free to use for whatever retro coolness you create.