Wednesday, 3 September 2014

Technique: Animated GIF walk-throughs using Photoshop CC

I recently climbed Palerang and we took a 1.5 hours of video of the walk for various purposes.

I have been playing around with converting some of it into a record of the walk - which might be of interest to those planning to do it.

The size of the video files - totaling 9Gb - a little under 1Gb for each 10 minutes - poses immediate problems. The format used was 1920 * 1080 pixels @ 72 p/inch - with 30 frames per second.  How do we work with so much material?

This post looks at thoughts on how to use the material in a meaningful way using Photoshop CC (you may be able to use other video/image editing software for similar effect).

Option 1: Individual frames

If the goal here is a series of images showing aspects of the walk or key landscape items, individual frames might be taken from the footage.  These higher quality images might be useful as historical comparitors (eg, regeneration after a bushfire, drought or flood).

Technique
1.1  The simplest way of collecting the images you want is to simply take screen shots.  In Windows this involves holding down the ALT key and pressing the PRT SC (Print Screen) key - Windows will create a folder called Screenshots in your Library Folder Pictures and store the screenshots there. You can then use you photo editing program to clean up the shot. This is a hit and miss solution - you may not be able to choose the precise frame you want - pausing video feedback may help get you close.
1.2 Some video editing/playback allows you to select a particular frame for capture. Below, I was able to select the precise frame using Photoshop CC.



This is an example of a frame reduced to 640p width taken from the beginning of the walk with a size of 230Kb.



Option 2: YouTube degraded or timelapse

Converting you video into a YouTube video type presentation has some attractions.  Depending on the video editing program you use, a wide variety of outputs are possible - and an audio track might be added.

A YouTube video has a couple of significant problems. Even at low quality, it has limited capacity to present hard and detailed information in a concise form. It is brilliant at conveying mode and atmosphere - good at showing technique - useless in conveying detailed information in a concise manner.

Technique
There are plenty of guides already on the web for building YouTube videos - I will not repeat them here.

Option 3: Low quality time lapse series within the GIF format.


The GIF format is used to produce all those animated/moving pictures you see on G+.

The below series shows in real time the start of the walk, the first 50m - by way of a series of 36 images spaced out 1.5 seconds. The quality has been significantly reduced.  However, together, the combined 36 images have 1/10th the size of a single decompressed frame of the original video and 1/400th the total size of the original compressed video.


Note on this particular GIF This GIF runs once and stops (this is to prevent the image unnecessarily running in the background out in the bush, and wasting batteries).  If you are looking at it and it has an arrow in the center - you can start it by pressing the arrow.  If it has cycled through and the image has stopped, you can restart it, by clicking the frame once.  The image only loads once - you can then run it through as many times as you like without further download.

In terms of size/quality - the GIF is a shadow of the still image at the start of the post.  This breathtakingly beautiful environment is captured well by the original video.

However the GIF creates a dull and drab impression.  The GIF does provide an indication of the path and difficult of the (easy) first minutes of the scramble.  With an overall size of just 630 Kb (each frame averaging just 17.5 Kb) it is a fraction of the 240,000 Kb of the original.

In addition - it would be a relatively easy task to add an overlay to the image - perhaps in the form of a HUD - showing direction, location and time.  Instead of just the first couple minutes of the walk - the frames could then include key landmarks of the entire climb - each image displaying for 10 seconds - perhaps at slightly higher quality.

This is an interesting possibility - it produces a single image with a number of frames with reasonable information.  The format does not distract from the fun of the walk - but gives a feel for distance and effort (something missing in most walk guides) - as well as glimpses of landmarks and location.

Technique 1
To build the GIF, I used the File>Import>Video Frames to Layers feature of Photoshop CC 2014.

A common problem at this stage with Photoshop CC is that the video files you are trying to import into Photoshop CC may generate the error message:  "Could not complete the Video Frames to Layers command because the file could not be opened".  This is one of the least helpful error messages I have ever seen.

This message indicates that Photoshop does not have access to the resources necessary to open that file type.  You may be using an AVI file that plays fine in other software on your system - but that does not mean that Photoshop CC can use it in its original form.  AVI files (like some other video formats) are not all the same - unless Photoshop CC has the right resources to load the video, it will generate the error message.

The easiest work around is to use a third party program to convert the AVI format to a MP4 format.  I used Prism from NCH Software - but there are lots of other alternatives.

If you have lots of are worried about the conversion time, you might want to find a way of bundling the AVI package in a form the Photoshop CC understands or giving Photoshop CC the right resources for your particular package. If you search the error message on Google, you will come across a couple of useful technical guides to doing this. 

Photoshop accepted the converted MP4 video without further problem.  I then used the sliders to choose the part of the video I wanted to work with, and only imported ever 45th frame (if you want more control over which frames, perhaps to avoid blurred frames in low light or significant movement, choose a lower frame rate and manually exclude frames that are poorer quality).

To adjust size and quality I then chose Image>Image Size and reduced the size to 320p across and quality from 72 to 36 pixels/inch.

I then chose File>Save for Web and selected GIF, 32 colors, Dither 50 and Lossy 50.  You can play around with these settings depending on the size and output you want.

Technique 2
A simple alternative to loading video is to gather individual screen shots and add them as individual layers in a Photoshop image. You can use some older version of Photoshop Elements as well as Photoshop CC for this purpose.

When you have the layers, chose File>Save for Web as above.  Older versions of Photoshop lack some of the finer controls - but you can still get good results.   



I thank +Ann Pollak for her questions - which contributed to this post.




Peter Quinton
Palerang
September 2014


Post a Comment