Building a Very Slow Movie Player

Inspired by Bryan Boyer and Tom Whitwell, I am building a Very Slow Movie Player (VSMP).

With VSMP,

  • Kiki’s Delivery Service (running time 1h42m): takes 7 days to play (with 1 frame per 20 seconds, as in above demo)
  • Laputa: Castle in the Sky (running time 2h4m): takes 2 months to play (with 1 frame per 120 seconds, as default setting)

1. Hardware

All can be assembled together easily.

Front view

Zoom in details

The back

2. Installation

2.1 Raspberry Pi Zero

Install standard Raspberry OS. I am using the 32bit bulleyes with desktop version, but someone suggested to use lite version for Raspberry Pi Zero. Read more here.

For install pi with headless wifi, read how-to here.

1
2
touch /Volumes/boot/ssh
touch /Volumes/boot/wpa_supplicant.conf

Content of wpa_supplicant.conf
1
2
3
4
5
6
7
8
9
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
scan_ssid=1
ssid="your_wifi_ssid"
psk="your_wifi_password"
}

Note: It is a good practice to disable the default user “Pi”, but VSMP installation script from Tom Whitwell is using hard-coded “Pi” home path, so to keep it simple, keep “Pi” user but DEFINITELY update the default password. I also run it in a guest wifi that it has no access to rest of my network devices.

2.2 Install VSMP files

There are many implementations of VSMP:

Note: You can test your e-ink by running omni-epd-test. In my case, I do the following

1
omni-epd-test -e waveshare_epd.epd7in5_V2

The omni-epd is a part of the installation.

3. Prepare the movie

3.1 If you need convert mkv to mp4

1
2
# assume you have ffmpeg installed on your mac
for f in *.mkv; do ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"; done

Read more examples at here.

3.2 Remove sound track for reducing the file size

1
2
# assume you have ffmpeg installed on your mac
for f in *.mp4; do ffmpeg -i "$f" -c copy -an "${f%.mp4}-nosound.mp4"; done

Read more about “-an” parameter at here.

3.3 Copy files to Pi

1
2
# from movie folder
scp *.mp4 pi@YOUR_PI_HOST_NAME:/home/pi/SlowMovie/Videos/

4. Play

4.1 VSMP as a service

By default VSMP is enabled as a service.

Edit the slowmovie.conf file to specify parameters such as video locations and start frame

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Edit the config file
vi slowmovie.conf

## Content of slowmovie.conf ##
random-frames = False
delay = 120
increment = 4
contrast = 2.0
epd = waveshare_epd.epd7in5_V2
directory = /home/pi/SlowMovie/Videos
timecode = False
## End of content ##

## Restart the service
sudo systemctl restart slowmovie
sudo systemctl enable slowmovie

4.2 Manually run

If you want to manually run command, REMEMBER to disable the service.

If you run it manually, considering use tmux to ensure the session continues after you log off.

Example:

1
2
3
4
5
6
7
8
9
10
# Stop services
sudo systemctl stop slowmovie
sudo systemctl disable slowmovie

# enter tmux session
tmux

# Manual run in tmux session window
cd SlowMovie
python3 slowmovie.py -f ./Videos/Kiki.mp4 -d 20 -s 19970 #delay 20 sec, start from 19970 frame

5. Bonus content

5.1 What to play

Wondering what to play? Read Content reviews: What makes a good slow movie. I am a big fan of Studio Ghibli so that is my choice.

Also you might want to re-encode the videos as here.

5.2 Shoot a video for your VSMP

You can use iphone time-lapse to record your VSMP to see how it works. However, iphone time-lapse will sometimes capture some e-paper refresh, when the screen is all white or black. To remove these bad frames from your video, do following (ref #1, #2)

1
2
3
4
5
6
7
8
9
10
11
12
# extract all frames from iphone time-lapse video
mkdir img
ffmpeg -i time-lapse.MOV -qscale:v 2 -r 30/1 img/img%03d.jpg #iphone time-lapse video is 30 fps, second best output img quality

# remove bad frames
# manual or using ML such as Amazon Lookout For Vision

# regenerate the video from frames
ffmpeg -framerate 30 -pattern_type glob -i 'img/*.jpg' output.mov

# slow it down if needed
ffmpeg -i output.mov -filter:v "setpts=1.3*PTS" output_slow.mov

Example of using Amazon Lookout for Vision for detecting bad frames, but that is another story.

6. Slightly longer demo

Share Comments