Image for post
Image for post
My Very Slow Movie Player in an IKEA frame playing Alfred Hitchcock’s Psycho

How to build a Very Slow Movie Player for £120 in 2020

Ambient home cinema was the perfect lockdown project

Tom Whitwell
Aug 16 · 8 min read

In December 2018, Bryan Boyer published Creating a Very Slow Movie Player. It’s a wonderful essay about light and Brasília and architecture. Bryan describes building an ePaper display that shows films at 24 frames per hour, rather than 24 frames per second. So it would take about a year to play the 142 minutes of 2001.

Image for post
Image for post
Bryan Boyer’s original VSMP (link)

Every few months since 2018, I’ve thought about Bryan’s essay and visited the e-paper department at Waveshare, a Shenzhen-based electronics retailer.

They now sell a $58 7.5 inch e-paper screen that comes with all the connections for a Raspberry Pi. So I finally bought one, and got it working over a couple of days.

It’s been playing Psycho in the corner of our dining room for the last two months. I set it to run slightly faster than Brian’s — it refreshes every two minutes, and jumps forward four frames each time. That’s about 2 minutes of screen time per 24 hours, a little under three months for a 110 minute film.

Psycho is full of visual treats, which reveal themselves very gradually. Some images — Janet Leigh driving— stuck around for weeks, while the shower scene was over in a day and a half.

Image for post
Image for post

If you want to build yourself a VSMP, there are four things to do:

  1. Get the Raspberry Pi working in headless mode without a monitor, so you can upload files and run code

This is a relatively straightforward project. There’s no soldering and no hardcore coding. If you’re at all comfortable using a command line, and you’ve seen Python script before then you’ll be fine.

The e-paper screen, Pi, SD Card and IKEA frame cost me about £120 in total.

NB: Everything I know about this subject is in this post, so I can’t help you beyond what is written here. If you ask questions on GitHub others may be able to help.

Image for post
Image for post

Get started with Raspberry Pi

There are numerous how to guides that explain how to set up a Raspberry Pi. I bought 2GB Raspberry Pi 4, a power supply and a NOOBS 64gb SD Card from Pimoroni. NOOBS includes almost all the libraries we’ll use, so it makes life a lot easier. (This guide is useful if you don’t want to buy a NOOBS card.)

To work without a traditional screen, the two main tools are: ssh to control the device through the command line (I used Mac OS Terminal) and sftp to upload files (I used Filezilla).

Once you have ssh running —it can be a faff, instructions are here — you’re in control of the Pi over your home wifi network. You can move through folders, run applications, edit files and so on. You’ll need to know basic terminal commands but I don’t think I used much beyond ls (list files), cd (change directory) and nano (a basic text editor, that takes a bit of getting used to).

I also used sftp to do the heavy lifting — transferring big movie files onto the Pi, and uploading the code I’d written before polishing it with nano.

Image for post
Image for post
The Raspberry Pi and the ePaper Hat hot glued to the back of an IKEA picture frame. The power comes in through the USB-C connector on the bottom left of the Pi.

Connecting the display

The display is shockingly thin, and comes with a flexible PCB cable and a breakout board that plugs straight into the Raspberry Pi. There is a plastic sheet over the screen that you can remove.

  • Physically connecting the ePaper display to the Raspberry Pi is simple — just plug it in to the GPIO pins. This is the biggest change since Bryan Boyer’s experience in 2018.

Next, you need to download and install the driver software and my code onto the Pi.

This assumes you’re using a Pi with NOOBS — otherwise you may have to install or update more tools (Git, Pip, Pil, ffmpeg) yourself.

Use ssh to connect to the Pi then run these commands (start in your home folder) one by one: (NB: you do need the quotes in line 2)

sudo raspi-config  <--- Don't forget to turn on SPI git clone https://github.com/TomWhitwell/SlowMovie/cd 'SlowMovie/e-paper/RaspberryPi&JetsonNano/python'sudo python setup.py install

Now, if everything has worked, you should be able to run this command to see the ePaper display come to life:

python examples/epd_7in5_V2_test.py
Image for post
Image for post
Waveshare’s version of Hello World

If this doesn’t work, check that a) you turned on SPI earlier and b) your ePaper display is a 7.5 inch V2.

When SPI isn’t turned on, you get very unhelpful messages like:

IOError: [Errno 2] No such file or directory

When I first tried this, it didn’t work, then worked, then didn’t work. I became convinced there was a hardware problem, that I’d somehow damaged the fragile ribbon cable connecting the display. It was not hardware. It was just that I forgot to turn on SPI, then ran the wrong demo code.

There are switches on the Hat that connects to the screen. Mine are in this position: Display Config: B: Other. Interface Config: 0: 4-Line SPI.

Image for post
Image for post
My version of hello world shows random frames from a 2 second snippet of Psycho

Hello World

Now that the screen is connected and working, Navigate back to the SlowMovie folder:

cd ~/SlowMovie

My version of the Slow Movie Player software uses Python with three libraries:

  • Ffmpeg is a Swiss Army Knife for video and audio files.

If you used NOOBs, then ffmpeg and PIL are already installed. Ffmpeg is slightly fiddly to install, but there are plenty of tutorials out there. If you struggle, use NOOBS.

To install ffmpeg-python:

sudo pip install ffmpeg-python

Now everything should be in place, so you can run this hello world file (ensure you’re in the SlowMovie folder)

python helloworld.py

This picks a random .mp4 video (there’s a short test.mp4 clip already there). It extracts a random frame, resizes and dithers it, and puts it on the screen. The full code is here, the more interesting bits are here:


# Use ffmpeg to extract a single frame from the .mp4 file, resize it, letterbox it and save it locally
def generate_frame(in_filename, out_filename, time, width):
(
ffmpeg
.input(in_filename, ss=time)
.filter('scale', width, height, force_original_aspect_ratio=1)
.filter('pad',width,height,-1,-1)
.output(out_filename, vframes=1)
.overwrite_output()
.run(capture_stdout=True, capture_stderr=True)
)
# Import, initialise and clear the display
from waveshare_epd import epd7in5_V2
epd = epd7in5_V2.EPD()
epd.init()
epd.Clear()
# Check how many frames are in the movie
frameCount = int(ffmpeg.probe(inputVid)['streams'][0]['nb_frames'])
# Pick a random frame
frame = random.randint(0,frameCount)
# Convert that frame count to Timecode used by ffmpeg
msTimecode = "%dms"%(frame*41.666666)

# Open the saved frame in PIL
pil_im = Image.open("grab.jpg")

# Convert the image to a 1 bit bitmap (Just zeros and ones)
# using Floyd Steinberg dithering
pil_im = pil_im.convert(mode='1',dither=Image.FLOYDSTEINBERG)
# display the image
epd.display(epd.getbuffer(pil_im))

The Very Slow Movie Player

Once you have helloworld.py working, you can transfer more videos onto the device using sftp. Simply drop .mp4 files into the /Videos folder.

Keep an eye on the storage capacity — if you have half-downloaded video files or a completely full SD card you’ll get weird errors.

My rather hacky SlowMovie player is

python slowmovie.py 

Which saves progress through videos so you can turn off power and continue where you left off.

It has various options which you can see by typing

python slowmovie.py -h

For example:

python slowmovie.py -f 2001.mp4 -d 150 -i 1 

Will play 2001.mp4, updating the screen every 150 seconds, and showing every single frame — 24 frames per hour, instead of 24 frames per second.

The display will update as long as the program is running, and will stop once the ssh session finishes. To start slowmovie.py automatically every time the device is powered up: Instructions are here, but essentially you need edit the user profile:

sudo nano /etc/profile

At the bottom of that file, add these lines, with whatever options you want, save and exit.

cd SlowMovie 
sudo python slowmovie.py

Finishing off

The screen is so thin that it can be mounted in a normal IKEA picture frame. I used a frame bought years ago, but it looks like a RIBBA . I threw away the glass and spraypainted the frame and mounting card black to make the screen stand out better. I hot-glued the Pi to the back of the frame, which really doesn’t work very well. Next, I’m going to take the whole thing to a picture framer to have them do it properly.

Image for post
Image for post
Algorithmic art inspired by Georg Nees

Next steps

Tom Whitwell is Managing Consultant at Fluxx. He also designs electronics as Music Thing Modular Human Sized Musical Interfaces and writes lists like 52 Things I Learned in 2019.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store