Hacker News new | ask | show | jobs
by bitbank 515 days ago
The pl_mpeg project is a single .H file MPEG-1 player (video+audio) written in generic C. It wasn't written for speed, but to be a simple working project that can be compiled on any system. I decided to use my experience with code optimization to bring it to 32-bit MCUs. My changes so far have sped it up about 230% (on my Mac M1). The ESP32 and Cortex-M7 are the natural targets because they have enough speed and memory (with PSRAM) to run decent sized videos. MPEG-1 isn't the best video codec, but it's patent-free and simple enough to do in a few thousand lines of C code. It requires a lot more RAM compared to a Motion-JPEG player, but the compressed data is 5 to 10 times smaller and the per-frame effort is much lower. I will publish an Arduino example shortly which will play full speed video+audio on an inexpensive ESP32-S3 PCB.