Creating a fly over movie from a GPS track using Google Earth Pro

I have been tracking my motorcycle rides using my Android phone. What I wanted was to see the track in Google Earth and have a movie from track.

Google Earth Pro

Google Earth Pro (from here Google Earth) can be downloaded for free from Google. The first thing is to download the desktop software and install it as the installer will say how to get done.

When Google Earth is installed, open the software and choose File -> Open. Find the GPS track file, that need to be a KML file format. When choosing the file, Google Earth will show the track in Google Earth.

When the track is loaded, in the menu on the right side, expand the tree and select the track at the lowest level. Then there is a preview button that can play the track and that gives a control in the bottom left corner of the map. Click the floppy disk icon and choose a location and file name for your movie. End the filename with the extension .mp4.

In the menubar, choose Tools and Movie maker. Then select the track that you want to record and the location to save the file. Then choose the movie resolution and file type. In the end, press create movie. This will take some time so just wait until the movie is finished rendered.

Compressing the video and changing video codec

The video from my track was a 51 minutes video and had a size of 41GB. That was a bit too big to handle. The video file could not be preview on my MacBook Pro 2019 i9 computer, but I could see the video fine using VLC video player. Because of that I think that there is something with the video codec that is not compatible with my Mac by default. When creating a video with Google Earth Pro, I rendered the video as a MP4 file. The encoding that was used was MJPEG.

I have been using FFMPEG to compress and change codec at projects before and that is what I want to use this time as well. The easiest way to install ffmpeg on a Mac is by using the brew software.

$ brew install ffmpeg

After ffmpeg is install, it is rady to use and I just want to change the video codec and compress the video. That can be done with a command like this.

$ ffmpeg -i /Volumnes/Movies/inputmovie.mp4 -vcodec libx265 /Volumnes/Movies/inputmobie.compressed.mp4

The -i argument is the source file (the video file from Google Earth Pro). The vcodec is where I specify the video codec that I want to use. Since I have a video from Google Earth Pro, I do not have any audio in my video file, but by adding acodec I could been setting the audio codec as well. In the end, I specify where I want the video to be saved. I save it in the same location, but adding "compressed" in the filename.

After running the video through ffmpeg, the filesize went from 41GB to about 5GB. That is a much nicer file size and a lot easier to handle. Now I can use the video in iMovie without iMovie crashing as well.

Teis Lindemark

Read more posts by this author.