Warning: Make sure you have the board model ESP32-2432S028 with the ILI9341 Display controller - not the ST7789 (parallel) controller, which is not supported by the graphic library GFX Library for Arduino
This project turns the ESP32-2432S028 "Cheap Yellow Display" (2.8" or 2.4") with the ILI9341 controller into a standalone SD-card video player. The sketch scans a /mjpeg folder on the SD card, loads Motion JPEG (.mjpeg) files, and plays them back full-screen on the built-in 240x320 display. It is designed for simple offline playback with minimal setup: copy converted MJPEG files to the card, power the board, and the videos play in sequence on a loop.
- Plays
.mjpegvideos directly from the SD card on the ESP32-2432S028 - Automatically scans the
/mjpegfolder and builds a playlist from the files it finds - Loops through all detected videos continuously
- Lets the user skip to the next video with the onboard
BOOTbutton - Uses the Arduino GFX and JPEGDEC libraries for MJPEG decoding and display output
- Initializes the display and SD card independently for reliable playback on the CYD hardware
- Prints playback statistics to the Serial Monitor, including frame count, average FPS, timing breakdown, and detected video size
- Includes sample SD card content and a simple Video Conversion Studio workflow for preparing compatible video files
DISPLAY_SPI_SPEED: switch between80000000Land40000000Lif your display is unstable at 80 MHzBL_PIN: change the display backlight pin for board variants that use a different backlight connectionBOOT_PINandBOOT_BUTTON_DEBOUCE_TIME: remap or adjust the skip button behaviorSD_CS,SD_MISO,SD_MOSI,SD_SCK, andSD_SPI_SPEED: adapt SD card wiring or bus speed if neededMJPEG_FOLDER: point the sketch to a different folder name on the SD cardMAX_FILES: increase or decrease the maximum number of videos loaded into the playlistgfx->setRotation(0): change screen orientation to match your enclosure or video layoutgfx->invertDisplay(true): enable inversion for CYD variants that require it- Video settings such as orientation, resolution, quality, frame rate, and brightness can be adjusted in Video Conversion Studio before copying files to the SD card
Some model of Cheap Yellow Display works only at speed of 40Mhz, change the DISPLAY_SPI_SPEED to 40000000L:
#define DISPLAY_SPI_SPEED 40000000L // 40MHzFFmpeg is no longer necessary. There are no complex commands to learn. Just use Video Conversion Studio to prepare MJPEG files for this player.
