atomic14 / esp32-tv

ESP32 - Sound and Vision - Video Streaming to the ESP32
167 stars 32 forks source link

Build Firmware

ESP32 Video Streaming!

Yes - it actually works! Streaming video with audio over WiFi to an ESP32!

WiFi Streaming

And - playing video from an SD Card!

SD Card Video

There's two projects in this repo - one for the ESP32 firmware and another for the server.

The README files in each project have more details.

How Does It Work?

The server is pretty simple, it has a few endpoints:

The ESP32 firmware connects to the server and requests the channel info. The video playback is locked to the audio sample playback. The audio is played back using the I2S peripheral and we use that to know how much time has elapsed to request the correct frames. This way the video and audio are always in sync.

You can get around 15 frames per second at 280x240 resolution, the main limitation is WiFi bandwidth and decoding the JPEGs.

Support for SD Cards

In the README file for the firmware there are instructions on how to convert a video file to a MJPEG AVI file - if you've got a device with an SD Card you can use this instead of WiFi streaming.