We’ve mentioned Planet In Action‘s Paul van Dinther on GEB quite a few times in the past. From his games like “Ships” and “Drive the A-Team Van” to his amazing projects like the A-tour, he always has something great in the works.
If you follow him on Google+, you may have seen his recent posts about creating super high-resolution videos using Google Earth imagery. Here’s how he did it, in his words:
Google Earth, for me by far the coolest software around because it brings the world data along with a pretty decent rendering engine. Lately I am involved in several exhibit designs where Google Earth features. Although initial plans were to use interactive Google Earth applications, I now focus on the use of Google Earth based video. There are several reasons for that.
- Computers fail. If one computer fails once a year, then chances are that with 20 computers the risk of failure is 20 times larger.
- Software maintenance. Think about Windows updates, Google Earth updates etc etc.
- Software stability. Although Google Earth is pretty good for private use, it is not stable enough to be used unsupervised in a public space.
- Broadband availability. If the internet is slow or unavailable the exhibit is dead.
- Longlevity. Permanent public exhibits also need to run longer then the Google Earth deprecation term of two years. In other words. When Google decides to turn off the Google Earth servers, all interactive exhibits die. Not good.
- Solid performance. Public exhibits must be robust, run reliably and must be easy to turn on and off without needing an IT guy for trouble shooting
But, there are also softer issues with interactivity. Everyone will want to travel to their house of course which is interesting only to you while the erratic motions are severely nauseating to everyone else. Exhibits typically tell a story. Camera angles, camera motion and location are carefully scripted to support the story. Allowing visitors to drive the view would be akin to letting you steer the camera during Spiderman 17 at your local cinema.
Video doesn’t have any of the above issues. However, the question is, how do you generate the perfect video from Google Earth data. The free version of Google Earth doesn’t do video recording however Google Earth Pro has a feature called Moviemaker which allows you to turn a kml tour into a video file. Although Moviemaker finally reached a quality level that it has become useful, it is still wrought with many issues. So I decided to re-invent the whole video making process.
First a warning for anyone contemplating the use of Google Earth video for uses other then private. The Google Earth license agreement does not allow you to use the video footage for uses other then private. There are also strict attribution guidelines from Google and for public use special permission must be obtained from Google. For TV and film a broadcast license needs to be applied for. You can put your video on Youtube but you may not monetize it.
Back to issues with Google Earth Pro Moviemaker. I used that software extensively over the years and during that time pointed out many issues some that have since been fixed. In fact right now Moviemaker actually looks pretty decent. But there are two major issues with it. First of all, Moviemaker has limited options in terms of video frame size and orientation. It assumes always landscape and the maximum size is 1080p.
Secondly, I am on a quest to create the perfect smooth ultra high resolution (20 thousand pixels wide) Google Earth ride. Unfortunately, despite all the care taken for the kml tour, some slight hesitation artifacts can still be observed in the video footage. I suspect this is due to Moviemaker applying its own path smoothing. Besides, Google Earth Pro pricey for private users with an annual license fee of $399 USD
So, I am going to take you on a tech journey to see how perfect video can be done. Let’s first step back a bit and look at the free version of Google Earth 7. Sorry Apple users, most of the tools used only exist on windows but maybe you can find replacements for OSX. It is very easy to create a placemark with associated view and take an image snapshot at the same resolution as shown on your screen using CTRL + ALT + C.
This feature copies the Google Earth image and keeps it in your windows clipboard. From here you could simply open a bitmap editor like MSPaint or the excellent Paint dot net and paste the snapshot in order to save it as a bitmap. It be a long painful process to do this for a 60 fps video as you need 60 images for every second of video. But there are macro tools that come to the rescue. A macro is a program that allows you to define actions you normally perform with keyboard and mouse in a script which is perfect for actions that are repeated over and over. I tried several tools but AutoIt script proved to be very powerful. Not only is it able to automate user actions. It turns out it is also capable to directly store the clipboard image to a file without the need to use a bitmap editor. But, now you need to start doing some programming.
Not only can we store the bitmap directly to file but we can also number each image file sequentially. This will be important later on. Now we can automatically capture image frames from Google Earth and store them to a sequentially numbered image file but how do we advance our camera in Google Earth? Mickey already wrote about Tourmaker before which is a browser based tool to create mathematically perfect camera animations. It would be a small job to make it output a kml file with numbered placemarks for each frame. I could load these in Google Earth and get get the Autoit macro advance the selected placemark before each frame is captured. A bit like this:
But it all seems a bit painful and it requires the sidebar to be toggled in and out of view as it takes up valuable screen space. But there is another way to control the view in Google Earth. Liquid Galaxy This feature allows me to remote control Google Earth views via the network using UDP messages. By all means check it out. You can play with Liquid galaxy if you have two computers each with Google Earth on it. But guess what! Any program can control Google Earth using a network provided it talks the right language. Liquid Galaxy uses UDP message strings I wondered if the powerful Autoit script was able to send UDP data and…. YESSSS
Don’t worry about the scary programming. It is just here as “proof” . So here we are, I am now able to animate the camera in Google Earth and produce numbered image files for each frame all automatically. However, there is a problem. Google Earth streams data in as you advance through the landscape and we have no way to see when Google Earth has completed loading all the data. In an ideal world I would love to be able to read when the loading is complete.
Load progress can only be obtained in the Google Earth plugin which we can’t use for other reasons. So we are limited to simply wait for a bit before we capture each snapshot. In my Autoit script I wait 3 seconds for each frame. But because I rendered the same sequence several times this data is all in the Google Earth cache. The Google Earth cache is an invisible data storage where Google Earth keeps the last 2 gigabyte locally stored on your hard-drive. Frank Taylor uses this feature extensively on his travels when he needs Google Earth data but has no internet. So far the 2 gigabyte cache has not been an issue but if it becomes an issue there is the possibility to create a much bigger local storage using a proxy server called squid.
Since autoit script is doing so much of the heavy work I might as well push it some more. I expanded my Autoit script to automatically launch Google Earth and set it to the exact size I wanted. Since the Google Earth snapshot feature (CTRL + ALT + C) captures an image at the size it is displayed on the screen it stands to reason that the image size can be adjusted by adjusting the Google Earth Window. Now you are dependent to the size of your monitor or more correctly, the size of your desktop. On my system I run 3 1080p monitors that together form my desktop.
I can re-arrange my displays in Windows. Line them up vertically or horizontally in either landscape or portrait. The Autoit script can easily adjust the Google Earth window size to exactly where you want it. While in portrait orientation take care of your neck. Mine still hurts.
In the above example I moved the top of the Google Earth window to -1920 and made the window 1080 pixels wide and 5760 pixels tall. This doesn’t mean your images come out at that size because we lose the window border and menu areas. Make sure to turn off as much as you can. Here is an image frame captured in that configuration.
So, now we are in control of our image frame size but all we have now is a bunch of image frames. We have yet to turn this into a video. I use Adobe CS6 creative suite which is excellent value on subscription basis but there is also a free solution. FFmpeg is a powerful free command-line video compiler that can compile your sequentially numbered images into video. There is a bit of a learning curve here as the command-line parameters depend on what video output you desire.
But once the video has been compiled you get something like this, this or this Sadly Youtube really kills the ultra smooth effect obtained from 60 fps playback and re-compression make it much less detailed then it really is. Download a high quality video here (11MB). I thought it be fun to share some of the video journey I have been on. Maybe it will entice some of you to experiment and discover new ideas. At some stage I might release a limited version of Tourmaker and a GEMovie program that will work together with Tourmaker so that you don’t need to know any of the above stuff. You can simply focus on video making. But till then you are left to experiment and figure it out yourself based on the above. Have fun.