Ex Machina: Averaged Key-Frames



Presented above is an averaged amalgamation of all key-frames from a h264 video [Blu-ray source] of the feature film, Ex Machina (2015). It was a achieved using the "-evaluate-sequence mean" filter for "convert" in the ImageMagick software suite. To reduce memory load, the final image was created from 13 previously averaged images, each of which, averaged 50 frames. These images are included below, in the full post #.

Fundamental code snippets:
# To extract keyframes from a video using FFmpeg
ffmpeg -i video.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr frame-%08d.png

# To merge images together with ImageMagick
convert *.png -evaluate-sequence mean output.png

Ex Machina: Pixel Array



The image is a concatenation of pixels, where each pixel represents a frame from the film, Ex-Machina (2015). Every frame in the film was extracted, and down-scaled to 1x1 resolution, effectively getting an average colour for the scene in that frame. They are bounded inside a 640x242 PNG file, and are in the sequential order that they appear in the film.

The procedure involved taking a Blu-ray source, encoding it to a more manageable h264 stream, and then processing the frames. This processing was completed using FFmpeg, and the code is given below:

UPDATE 2015-08-11: Ver.2
# A trimmed down version, using only one instance of FFmpeg.
# The disadvantage with this is the lack of progress display.
ffmpeg -i input.vid -frames 1 -vf "scale=1:1,tile=640x220" output.png

Ver. 1 (piping)
# First instance of FFmpeg traverses the frames, the second concatenates them.
ffmpeg -y -i video.mkv -vf "scale=1:1" -c:v png -f image2pipe pipe:1 |\ 
ffmpeg -y -i pipe:0 -vf "tile=640x242" output.png 2> /dev/null

imdb: http://www.imdb.com/title/tt0470752/
ffmpeg: https://www.ffmpeg.org/

GimpMask: encrypting all or part of an image.





related: http://oioiiooixiii.blogspot.com/2015/05/creating-two-images-from-one-set-of.html
source code: http://registry.gimp.org/node/24496

Google Photos



A quick test of the "new" Google Photos service, and its claimed "imperceivable" compression. Original is a 15MP 9.2MB file. The Google version keeps the resolution but shrinks it down to 3.2MB.

There is noticeable grain reduction in the compressed image, but it is acceptable given the level of file size. The image on the right shows the pixel differences between the two files (levels adjusted for clarity).

original: https://www.flickr.com/photos/joehigham/17234028631/in/album-72157652105733412/
via: http://midletonrared.com/2015/04/23/109961/