New Project: Random Frame (The Killing)

  • Post category:Art

A year and a half ago I had an idea for a video that would take a movie—key movies that were important to me, especially when I was younger—and would scramble the frames, playing back the movie now with the film jumping all around at 24 frames per second.

The idea was an extension of my Shock and Awe project where I converted thousands of still images, taken off the television screen during Operation Desert Storm, into a rapid slideshow. You’d think that watching so many frames go by, out of order, would be a confusing mess but the result instead was strangely transfixing. The brain was trying to make sense of what it was seeing and in there somewhere something magical happened.

Random Frame, my new project, would attempt a similar result.

There are two broad ways to approach a project like this. You might write a computer program that started with a digital file of the movie and then jumped around that file, displaying frames randomly but without actually changing the file in any way. Or you might consider converting that movie file into still images, resorting those still frames in a random way, then recombining the stills back into a movie.

I did both, but it was all unsatisfactory. The computer program did not play the final movie smoothly enough for me—it would slow ever so slightly and then rush ahead, again and again. I have no idea why. The second approach, dividing the film into stills and then recombining, worked very well and had the advantage that I could distribute the result—the viewer did not have to have Python installed on their machine to view the work. But, on my 2016 MacBook Pro, pulling the stills out of the movie—about 200,000 jpegs per film—and then recombining them took far too long. It took days and days, it took weeks, and all the while my main computer was more or less unusable, its fans whirring like jet turbos.

When I purchased (finally) a new MacBook Pro last month I thought I would try again. It’s a whole new world. Instead of weeks, processes were taking six hours. Other processes which took a day or so on the old laptop were finished in forty-five minutes.

So I (re)wrote the computer program (still choppy) and I converted the films off the discs, created millions of jpegs, randomized them, and made new movies. I had ten Random Frame movies done in less than a week. That’s Moore’s Law in action—if you need more computing power Moore will give you more, eventually.

As I said, the frames are displayed in a random order—but is it really random? In a word….no.

First, the frames aren’t really randomly displayed since a “random’ selection would just keep picking a frame at random, opening the possibility—all but guaranteed, really—that some frames will display more than once before each frame has been displayed at least once. I haven’t done the math but I would guess it would take a period of time longer than the existence of the universe to run a Random Frame film enough times to get a run where each frame is displayed only once. That’s too long.

What I do instead is shuffle the frames in a random order, in spirit just like shuffling a deck of playing cards. Each frame (or card) is shown once and then the next frame is taken (at random) from only the remaining cards. Each frame is displayed just once. Nice and neat.

Only, this randomness isn’t truly random. Generally speaking, computers can’t produce a random number and so no code that I can write will select a movie frame at random. The problem is that—outside of research efforts, perhaps—random numbers are generated in a computer by mathematical formulas that, just like other mathematical formulas, produce the same result each time you calculate it as long as you input the same initial numbers. Computer programs only pretend to calculate random numbers and they do so by inputting arbitrary starting points for that mathematical formula—say, the exact time, down to the millisecond. Each time you run your code you get a different answer and the answers don’t seem to form any pattern (importantly, you don’t get these weird situations where real random number generators will give you the same result for many runs in a row—seems counterintuitive but flip a coin enough times and you see runs of six, ten, twenty “heads” in a row).

So my video implementation wasn’t truly random—play the video again and you will get the same video as before—and my computer programming implementation wasn’t random (though it sure looks like it). At some philosophical level that makes me sad.

Here is the first of these videos, Random Frame (The Killing). Click the Fullscreen button in the bottom right corner.