Overview

--

Digital photo frames were all the rage in the mid-2000s. They seemed to have fallen out of favor now that there is much smarter, more-multipurpose tech. Due to their ubiquity, they seem to be a dime a dozen now. I frequently comb through the computer/tech sections of thrift stores to see what oddities I can find for projects. At almost any thrift store, you can easily find these digital photo frames for just a few bucks.

I decided to use these photo frames to display stills from movies. I wrote code to split movies into individual frames and show the frames at a very slow rate. The goal is not to watch the movie at a slow speed, but to have beautiful static images that change every 5-10 seconds. It's interesting to walk by the photo frame and see a unique point in a movie. The ever-changing photo frame has the knack of pulling you into the moment as you realize the change and reminisce on the scene in the movie.

This idea was inspired by Douglas Gordon's art installation "24-Hour Psycho" that I read about in Don Delillo's Point Omega. Douglas Gordon slowed down Hitchcock's Psycho to have a run time of 24 hours and projected it onto a translucent screen.

The code was made to run in Google Colaboratory to allow for quicker video editing. The vid2frame Colab Notebook can be found at the following link: https://colab.research.google.com/drive/1YG-Y6ejeqiEQlD2plnu6FP96pQEvQg3Q?usp=sharing

Step 1: Vid2frame Overview

Intro to Colab

Google Colaboratory is a Python development environment using Jupyter Notebooks that allows you to connect to Google’s powerful cloud computing resources and run Python code. It allows you to maintain a runtime environment where you can install packages, access data online, navigate a file system, and store/reuse data.

The vid2frame program relies on a lot of video/image processing which can be rather intensive. Using the free cloud-computing resource will help you avoid burdening your own processor.

Executing Code in Colab

There are two different types of cells: code & text. Text cells are used to describe what's going on. Code cells can be executed one at a time by clicking the play button.

vid2frame Overview

vid2frame Google Colab Notebook: https://colab.research.google.com/drive/1YG-Y6ejeqiEQlD2plnu6FP96pQEvQg3Q?usp=sharing

This program will take a video file from Google Drive, Google Colab, or directly from YouTube as its source. It will then output a series of images compressed into a zip file. The Colab notebook is broken up into the following steps:

0. Set Parameters

1. Install Dependencies

2. Mount Google Drive

3. Download YouTube Video

4. Split Video into Frames

5. Frame Editing Parameters

6. Reorganize files

7. Zip Images

8. Download Output

Step 2: Set Parameters / Install Dependencies

Set Parameters

You need to configure the settings for your specific configuration based on the input and output format. First, you need to select your input source: Google Drive, Google Colab, or YouTube. If you uploaded the file to Google Drive or Google Colab, you will need to specify the filename. If you selected YouTube, you will need to enter the URL. Finally, you will need to specify the resolution of your digital photo frame in pixels.

Install Dependencies

Google Colab has a lot of common libraries and programs installed by default. The only dependency we will need to install is yt-dlp if you selected YouTube as your source. yt-dlp is a youtube-dl fork with additional features and fixes.

Step 3: Mount Google Drive or Download YouTube

Mount Google Drive

The Mount Google Drive cell only runs if you selected Google Drive as your input or output. Mounting Google Drive requires authentication. Once you run the cell, a series of windows will pop up asking...

Read more »