128x64 Noir: Converting Hollywood Hits for a Tiny OLED Screen

This story starts with a small portible TV, at this point I don't even remember where I found it. I might have even been gifted to me. I'd like to think that good friends are always looking out for you and in this case it might have been a TV. It wouldn't be the last.

You can probably tell from the thumbnail that this tiny monochrome TV has been modified in one way or another. This particular project involved stuffing a Raspberry Pi A into the battery compartment and connecting the video and audio outputs to the line in points that I found on the TV circuit board, conspicuously close to the high voltage circuitry for the CRT. I would remember the shock of touch the bad part of the board, so I must have done it safely. There's some buttons and rotary encoders wired into the RPI to control the looping video player. You can control playback and reset the device with the controls.

Maybe by the time that I finish writing this I'll remember what my original inspiration was, but at the moment nothing comes to mind. I do remember thinking that there must be a free and easy way to fill it with movies, and I quickly thereafter discovered what are called Public Domain films. These films are what you get when intellectual property rights expire. In fact there is even a "Public Domain Day" on our calendar, not to celebrate this, but to act as the legal expiration of the 95 year rule for movies published by corporations. You can dig into this more elsewhere, but I discovered that many pre 1978 films fell into a public domain trap.

I simply found sources of Public Domain movies, copied them to an USB stick and soon amassed a collection of 50 plus films.

Then I built even more film players

TV Collection

I enjoyed the process of converting the small monochrome and color TVs that I found into movie players, so I built 6 more. For some of TVs I created my own short films using AI. I'm not as happy with those, they're ok.

I even developed my own 2D/3D movie format

The format takes advantage of the "Peppers Ghost" effect and a second mirror behind it to create a psuedo 3D effect. It's not entirely obvious from this video but when viewed from the front of the player it appears that objects in the foreground are closer to the viewer. The effect is easy to reproduce:

  1. Have an AI segmentation model split all the individual movie frames into foreground and background images.
  2. Use python and ffmpeg to reassemble the video, stacking the foreground on top of the background on a new file twice as tall as the original.
  3. Play the movie on screen that is portrait oriented has a mirror for the background and a piece of lexan mounted at 45 degrees for the foreground.

1 Bit theater.

I've got a set of plastic drawers where loosely organized I keep all of the many LCD, TFT and OLEDs that I have collected over time. Many of them are from protoboard experiments, or just something I ordered to fullfil an order for something that I only thought about building. Maybe I was dreaming, or something but I was inspired to think about how I could get an animated movie to play on one of These screens. I think the first experiment was to use a 128x64 2.4" OLED to show an animation. At some point in connecting the OLED I powered up and it stayed dark, but smelled a little funny. It was obvious to me at that time that I had swapped the poles for power and fried something. But I flipped them, powered it on again and it worked. Just a lot darker than before. OLEDs don't have backlights as far as I know, so I am not sure what I did to the thing.

Experimentation

I could use the collection of Public Domain movies I collect to get an animation on the screen but first I needed to figure out a few things first.

  1. How to convert a color video to 1 bit.
  2. Connect whatever MCU I chose to an SD card and read files.
  3. Find or create a file format that the device can read and then stream to the OLED as fast as possible.
  4. Decide what conversion algorithm to use for the process. Dithering, value crossing or something else?
  5. Find a library that could do this with limited on device ram.

In some of the code that I had seen for animating the OLED there was something called XBM, it's basically text that defines a static array of hex values. This worked, but the files needed to be incluede in the code and I couldn't fit a library of movies onto the device. I looked at RLE in plaintext, but found that this could make the player framerate unsteady as it struggled to keep up with decompression. The best approach seemed to be to just create a binary file with the raw pixel data as bytes and then have the device read it 128 bits at a time while it passed it on to the screen buffer. This worked great, simple and efficient. The uncompressed files are a little bit big, but it doesn't matter when the resolution is this low and your working with 8GB of disk space.

Film to 1Bit

Converting the films to 1bit I used ffmpeg and a cv2 (OpenCV) threshold filter

The Cabinet of Dr. Caligari

Here's a sample of the first video I converted, and watched over and over again while I worked on the device.

If you hover over the video and click the icon at the top right, you can watch these full-screen.

Watch Memphis Belle

Here's another one that I like. Try clicking the fullscreen button, it will look great on your 4K monitor.

Watch Night of the Living Dead

Finally, watch out this Zombie film as George Romero never intended. If you have the patience for it.

Wiring it up

The circuit for this project really depends on the board / display combo, but you can wire it up based on the pin definitions in the Arduino code. It's that simple. Look at this image below, there are hardly any wires and this was the most complicated device. Mostly because I used the parallel connection on the display.

TV WIP

Just a little code

I think this one is for a Seeduino XIAO and a 4 pin SPI SSD1306 Compatible OLED. This combo is tiny and works great.

And a tiny movie

This is produced by the preceding code. This was filmed through a magnifying lens, I didn't have a macro handy.

Modeling, Soldering, 3d Printing and hot glue

I designed a couple oddly shaped player bodies, one bloblike and the other tombstone shaped.

Printed, Soldered and Assembled

Chubby MovieCoffin Movie

Watch the last man on Earth with Vincent Price in PixelVision

-This one has sound!

I had the patience to film this one and then add back in and sync the audio. The framerate on the device is a little inconsistent, so lining them up was a bit of work. One the other hand it's fun to see the flickr and watch the movie through this convoluted filter.

Then I put a magnifying glass to it

and asked myself "Could I use this to make the worst AR headset in the world?"

OLEDFusion360Arduino3D printingSoldering