Play black-and-white video on ESP32 with SSD1306 OLED displays.
Original Project: Based on ESP32_BadApple by Hackerspace-FFM
- ESP32 development board
- SSD1306 OLED display (128x32 or 128x64)
- I2C connection: SDA to GPIO 21, SCL to GPIO 22
ESP32 OLED
3.3V -> VCC
GND -> GND
GPIO21 -> SDA
GPIO22 -> SCL
- Arduino IDE or PlatformIO
- ESP32 Arduino core
- Adafruit SSD1306 library
- Python 3
- OpenCV (
opencv-python)
IMPORTANT: Videos must be black and white (monochrome) because the OLED is monochrome.
Recommended: keep source videos low resolution and short duration to reduce output .bin size.
- Upload the main sketch
- Upload data folder via "Tools" → "ESP32 Sketch Data Upload"
- install python requirements:
pip install -r requirements.txt - setup platformio and install required libraries in platformio.ini
Use the converter script directly with arguments:
python compress.py --video "./videos/your_video.mp4"Default run (no --size) generates both OLED formats:
./data/video_128x32.bin./data/video_128x64.bin
Generate only one format:
python compress.py --video "./videos/your_video.mp4" --size 128x64 --output ./data/video.binGenerate multiple formats with custom base output name:
python compress.py --video "./videos/your_video.mp4" --size 128x32 --size 128x64 --output ./data/video.binWhen multiple sizes are requested, output files are auto-suffixed:
video_128x32.binvideo_128x64.bin
- Upload the main sketch
- Upload data via "Tools" → "ESP32 Sketch Data Upload"
platformio run --target uploadfs --environment esp32doit-devkit-v1
platformio run --target uploadfs --environment esp32doit-devkit-v1-newMake sure the firmware reads the same .bin filename you generated.
Based on ESP32_BadApple by Hackerspace-FFM
MIT License
