An ESP32-S3 plays 15 fps video with sound by decoding MJPEG from an SD card
Playing video on a microcontroller is usually dismissed as impossible. H.264 cannot be decoded in software at useful resolution, and there is not enough memory. An open-source project built on a 2.4-inch ESP32-S3 board takes a different path: it stores video as a sequence of JPEG frames on a microSD card and plays them back at 15 to 20 frames per second with sound, inside a 3D-printed miniature television case.
The project is hosted in the TechTalkies Youtube-2 repository, created in October 2026 under an Apache-2.0 license. The hardware is the Makerfabs MaTouch Lite, a board built around the ESP32-S3 with 16 MB of Flash and 8 MB of PSRAM. This article reports the design as the repository documents it; we did not build or benchmark the player ourselves.
Why MJPEG instead of MP4
H.264 compresses by referencing neighbouring frames, so decoding any one frame means reconstructing the ones around it. The S3 has no hardware video decoder and struggles with software decoding even at 320 by 240. MJPEG stores each frame as an independent JPEG. If the decoder cannot keep up, it drops a frame instead of breaking the sequence. The cost is poor compression and large files, which is acceptable for a microcontroller.
The board and the parts on it
The MaTouch Lite carries a 2.4-inch ST7789V2 IPS panel at 320 by 240 over SPI, with an NS2009 resistive touch controller over I2C. On the back are a microSD socket and two USB-C ports, one for the chip's native USB and one through a CH340K USB-to-serial converter. Two 1.25 mm JST sockets break out GPIO4 and GPIO5 and GPIO6 and GPIO7.
Audio comes from an external MAX98357A I2S mono class-D amplifier driving a 2 W speaker. Its GAIN pin is tied to ground, fixing the gain. The wiring uses BCLK on GPIO4, LRCK on GPIO5 and DIN on GPIO6. The display and touch use the board's existing ribbon connectors.
The 3D-printed enclosure is three parts: a body, a front and four legs. The display, speaker and a USB-C panel connector fit inside, and the assembly is held with screws.
The data path is what matters
The ESP32-S3's dual LX7 cores, 512 KB of SRAM, LCD interface, I2S and SD/MMC host are all on the chip. The project leans on three stages in particular: reading from the SD card, decoding JPEG and pushing pixels to the display over SPI.
The repository bundles an FFmpeg batch script that converts mp4, mov and mkv files to 320 by 240, 15 fps, MJPEG video with 16-bit mono PCM audio at 16 kHz in an AVI container. The file goes in the root of the SD card, and the firmware scans for it, queuing up to 20 files.
The memory arithmetic explains the design. One 320 by 240 RGB565 frame is about 150 KB. At 15 frames per second that is 2.2 MB/s, while the S3 has only 512 KB of internal SRAM. The author keeps all buffers in internal SRAM and DMA and deliberately avoids the 8 MB of external PSRAM. PSRAM sits behind an external SPI bus, so each DMA fetch takes an extra trip that the display cannot afford to wait for.
Software choices
The firmware uses ESP-IDF v6.x with no UI framework such as LVGL. Touch polling runs in its own FreeRTOS task so it does not compete with screen refresh, and I2S uses four DMA descriptors of 512 frames each to keep audio and video aligned. The screen has no physical buttons. Instead it uses invisible touch zones: lower centre for play and pause, upper centre for a ten-second skip, the left and right edges for previous and next file, and a vertical swipe for volume, which is applied as a software multiplier and removes the need for a potentiometer. Flashing needs no toolchain install; Chrome or Edge can write the firmware over WebSerial.
Screen tearing is a known problem with SPI displays that have no dedicated framebuffer. Pixels are pushed in blocks, and if the next frame has already been written into the same buffer, the result is an old top half and a new bottom half. The author separates refresh and decoding into different tasks and keeps the buffers in internal DMA memory so neither task touches the block the other is using. The write-up does not detail the exact buffer rotation, only the result: 15 to 20 frames per second without tearing and with audio in sync.
Touch is handled by the NS2009, a single-point resistive controller with modest accuracy, which is enough for divided screen zones. In landscape, the left edge, right edge, upper centre and lower centre each form a zone, and a horizontal swipe of some distance counts as a volume gesture. There are no buttons or icons, so the first few minutes involve guessing, but the mapping is easy to learn.
What this is and is not
This is a working demonstration of a specific pipeline on a specific board, not a general video player for the S3. It depends on the MaTouch Lite pinout, the FFmpeg conversion preset and the choice to keep every buffer in internal memory. Moving it to another S3 board or a larger panel would mean revisiting the timing assumptions. Still, it shows a practical way to get moving video and sound out of a microcontroller that has no video hardware at all.