
Long Exposures – Creating Average Frames from Movies - edent
https://shkspr.mobi/blog/2017/05/long-exposures-creating-average-frames-from-movies/
======
flashman
I did something similar by piping ffmpeg into a numpy array, with each frame
updating the average RGB value of each pixel in the array.

Here's a three-second clip from 'Logan' of a scene where Hugh Jackman's
character is leaping through the air from right to left:
[http://i.imgur.com/EIp56LX.jpg](http://i.imgur.com/EIp56LX.jpg)

I like the results better for short sequences, but here's the entirety of
'Logan' (not sure what's causing the dark line down the middle):
[http://i.imgur.com/3QW6zPj.jpg](http://i.imgur.com/3QW6zPj.jpg)

~~~
bananasbandanas
Would you mind sharing the code? I find the second example oddly satisfying to
look at and would like to experiment with other movies at different
resolutions.

~~~
flashman
Here's my code:
[https://gist.github.com/timbennett/9c1614281797ce620c6069476...](https://gist.github.com/timbennett/9c1614281797ce620c6069476d39c7b8)

You'll need to experiment to find the right value for the variable 'alpha' in
the script. This controls each frame's opacity: too high and it will be
overexposed, too low and it will be dark. It's roughly in the range 5/n to
40/n where n is the number of frames in the video, but depends on the film's
overall moodiness too.

If you're going to run it on a feature film length video, I suggest making a
low-resolution version (e.g. 144p) and fine-tuning alpha on that, since it
will be significantly less frustrating.

~~~
bananasbandanas
Thanks!

------
ghaff
Different but related. Color of movies by frame: Corrected:

[http://thecolorsofmotion.com/films](http://thecolorsofmotion.com/films)

~~~
flashman
If you're interested in creating your own: [http://timbennett.github.io/movie-
barcodes/](http://timbennett.github.io/movie-barcodes/) (I wrote this, it's
not fantastic but it's functional)

------
stcredzero
I wonder how a moving average of a movie would look? I think the trick would
be in choosing the right length for the moving average window, so that the
viewer could still see the "chapter" transitions.

------
mccoyspace
Related work: The artist Jason Salavon is well-known for making work using a
software-driven frame averaging technique.
[https://en.wikipedia.org/wiki/Jason_Salavon](https://en.wikipedia.org/wiki/Jason_Salavon)

Using analog techniques there is a famous set of photographs of films playing
in movie theaters by Japanese artist Hiroshi Sugimoto. In this work a long
duration time-lapse photo of the film renders the screen glowing white with a
pale outline of the theatre around it. [https://www.sugimotohiroshi.com/new-
page-7](https://www.sugimotohiroshi.com/new-page-7)

------
lsh
Also different but related: slit scan photography.

wikipedia: [https://en.wikipedia.org/wiki/Slit-
scan_photography](https://en.wikipedia.org/wiki/Slit-scan_photography)

with video:
[https://www.youtube.com/watch?v=NSesvu_uqLo](https://www.youtube.com/watch?v=NSesvu_uqLo)

------
md224
Awesome! Here's a similar project in the audio domain:

[http://rlukedubois.bandcamp.com/album/timelapse](http://rlukedubois.bandcamp.com/album/timelapse)

------
SuperPaintMan
Cool! I tried something similar using Go + ffmpeg. Eventually wanted to find a
way to select the most "continuous" pixel from all available data and spider
out, but never got that far. Instead I played around with gifs and space.

[1]
[https://goo.gl/photos/se5pBWh399JJ945T6](https://goo.gl/photos/se5pBWh399JJ945T6)
[2] [https://theblackbox.ca/blog/vector-
video/](https://theblackbox.ca/blog/vector-video/)

------
y04nn
With VLC you can add motion blur to your videos in "Video Effects(⌘+E) > Color
> Motion Blur", if you push the factor high you get some nice effects.

------
drcongo
I have one of Brendan Dawes' CinemaRedux prints on my wall at home.
[http://www.brendandawes.com/projects/cinemaredux](http://www.brendandawes.com/projects/cinemaredux)

------
rotexo
you can also do some fun stuff with image averaging in ImageJ. here is a
python script for ImageJ I wrote a while back that takes the standard
deviation of several frames at a time and averages them onto a background
([https://pastebin.com/09wPkwhN](https://pastebin.com/09wPkwhN) nb: I am a
terrible programmer and this was when I was just starting to learn) that
produced this: [http://imgur.com/a/eaLEO](http://imgur.com/a/eaLEO)

------
RcouF1uZ4gsC
At the beginning of the article, there is a set of a 2 rows x 3 column set of
images by Jason Schulman. The last imahlge on the first row, looks kind of
like a blurry Albert Einstein.

