CircuitPython Fast and Slow


This image was deleted by MailChimp when they shut down TinyLetter.
As of this morning CircuitPython EVE now supports video playback.

It's quite simple to use -- you make a MoviePlayer and call its play method. The implementation does all the work of copying the video stream off the SD card and to the EVE's "media fifo." This just a block of memory that the MCU writes the "avi" file contents into -- the EVE reads this fifo and decodes it as video.

So from Python or CircuitPython you can now do:

with open("/sd/fish.avi", "rb") as f:
    mp = eve.MoviePlayer(gd, f)
    mp.play()

And the video just plays. It's running now on the Metro M4 Express I use for testing, and is silky smooth.

The Arduino is just fast enough to play low-res video. Copying the data from the SD card into the EVE was quite painfully slow. But the CircuitPython boards have advantages. They have a faster CPU and faster SPI. It's true that CircuitPython is slower than the C++ of the Ardunio, but the heavy lifting of the video transfer is being done in optimized C++ inner loops. All the CircuitPython is doing is copying 2 Kbyte blocks of bytes from microSD to EVE.

The changes are in the bteve repository right now, and will hit the "official" CircuitPython/EVE repo in a day or so.

Thanks for reading.