ViDeO Player

Compiled video player with an example VDO:

VideoPlayer.zip (5.2 MB)

Online Converter

You can convert your own MP4 videos into VDOs by dragging-and-dropping them into the online converter:
https://felipemanga.github.io/ViDeO/

FemtoIDE project with sourcecode and encoder:

Video.zip (53.7 KB)

It is possible to run the encoder from inside the IDE, but it’s much slower than using the online converter. Just use that instead.

How It Works

Encoder:

The encoder goes through each frame and breaks it into 22 chunks of 8 rows each. Each chunk is compressed with LZ4.
Every frame includes 512 bytes of audio data. Audio is played back at 9216hz, resulting in 18 FPS.
Every fourth frame includes a 256-color palette. Calculating the ideal palette and reducing the amount of colors in each frame is the painfully slow part of the conversion process.

Player:

The video player puts the sound buffers in SRAM1, freeing up SRAM2.
Chunks of image data are read into memory using the new File API, then decompressed into SRAM2 and flushLine sends it all to the LCD.

With this memory configuration it is possible to use video in games.
MegaRace, anyone?

9 Likes

Nice . . . .

3 Likes

Added an online converter, for those who don’t want to use FemtoIDE to convert VDOs:
https://felipemanga.github.io/ViDeO/

3 Likes

Couple of questions that I’m sure everyone wants to know…

  1. Is it screen mode independent?
  2. Does it support lower (110x88) resolutions? (for higher frame rate/smaller size)
1 Like

Yes.

Not yet, but it wouldn’t be too hard to add. It would also be good to support videos without audio.
I just wanted to get this out there quickly, otherwise I’d forget about it with all the TAS/IDE/Jam stuff I have to do.

3 Likes

LZ4. I think I’ve read that before… :sunglasses:

2 Likes

Hi @manuelsagra … How is the car racer coming along?

Developing was paused some days ago when COVID-19 started to spread here in Spain. Having the kids at home leave me very little free time…

I’m trying to solve some little issues and I hope to release a beta version soon.

5 Likes