ESP32 Composite Video Library outputs PAL, SECAM and NTSC, supports LVGL

It’s been possible to use the I2S for video output on ESP8266 and ESP32 chips for years, but aquaticus’ ESP32 Composite Video Library is may simplify the task of outputting PAL, NTSC, or SECAM video signals from any Tensilica-based ESP32 platforms.

The library does not require any external hardware, and you can just connect an RCA connector to GPIO25 (I2S data) and GND, plus integration with the LVGL library makes it easy to create graphical user interfaces as showcased with the captures below.

 

ESP32 video composite library

The library supports grayscale video output (no color at this stage), multiple resolutions from 384×288 to 720×288 at up to 25 or 30 Hz, six different pixel clocks for PAL/SECAM and NTSC, as well as six framebuffer formats with namely RGB565, RGB332, Grey 8 bits/pixel, Grey 4 bits/pixel, Monochrome 1 bit/pixel, and LVGL monochrome 1 byte/pixel.

You’ll find the source code for the ESP32 Video Composite Library, released under a GPL v3 license, in Github, together with the instructions to get started, and the API documentation. The “hello world” sample displays a Philips PM5544 pattern in PAL 384×288 resolution or NTSC 320×240 resolution:


PAL Philips PM5544 patternThe example above is for PAL/SECAM, simply use the function video_test_ntsc for NTSC output instead.

It requires the ESP32-IDF framework (version 4.4 used for testing) with -O2 CFLAGS, and optionally the LVGL graphics library (version 8.3 tested). The library appears to have been tested on one of the Wemos D1 mini board. Some of the applications listed for the library include infotainment systems, emulators,8-bit style game consoles, and video diagnostic.

Via Hackaday

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
2 Comments
oldest
newest
Neorej
Neorej
2 years ago

Would be handy to have this integrated into esphome

Jeroen
Jeroen
2 years ago

Its a nice hack, but you don’t want to use esp for video in my opinion.

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...