Saturday 10 November 2012

Exporting video from ArcGIS to Lightworks


In the past I have used Microsoft Movie Maker for video editing. Like many Microsoft products it was relatively easy to use, but quite limited functionality. It also had an unfortunate tendency to crash and refused to load when I tried to install it on my current laptop. Rather than deal with the installation problem I decided to try the free Lightworks video editing suite instead. Much of my contents comes from ArcGIS animations, so how do you go get high-definition video out of ArcGIS and into Lightworks?

Lightworks currently only supports some free and open video codecs. Codecs are implementations of video storage and compression algorithms. Video 'formats' such as AVI (.avi) and MOV (.mov) are wrappers around these codecs. To play or edit video files an appropriate codec must be installed and the software support the format. Other issues, such a frame rates may also be important as I discovered.

How I export HD video from ArcGIS to Lightworks:
  • In ArcGIS:
    1. Make you animation 20% longer than you want it to be as the conversion process will speed up the video by 20%.
    2. From the Animation Toolbar, Export animation.
    3. In the Export animation dialog, open the Options... dialog. Check Use custom extents under Video Resolution, then set the Horizontal resolution to 1440 and Vertical Resolution to 1080. These are the dimensions required by the to render the video using the MPEG-2 I-frame HD codec in 1440×1080i/p format. Codec resolution information is on page 2 in Using the Matrox VFW Software Codecs. Also set Frame based video export to the full range of frames.
    4. Export, then in the Video Compression dialog select the Matrox MPEG-2 I-frame HD codec.
    5. Click OK to export.

ArcGIS Video Export Options dialog

There is however a problem. Despite being in a format and codec supported by Lightworks, Lightworks only supports video with a frame rate of at least 25fps. ESRI help indicates that the frame rate can be set from 1 -100, but I have been unable to change from the default 20 fps. Instead, I use VirtualDub 1.9.11 to change the frame rate.

    1. Open VirthualDub.
    2. From the File menu, Open video file.
    3. From the Video menu, Frame Rate. Set Source rate adjustment to Change frame rate to (fps) to your desired rate; 25 in this case. Also set Frame rate conversion to the desired rate. I suspect the first is not really need.
    4. From the Video menu, select Compression and select the within the dialog select the Matrox MPEG-2 I-frame HD codec.
    5. From the File menu, Save as AVI.

VirtualDub Frame Rate Control
VirtualDub Compression
  • Open Lightworks
    1. Create a project with your frame rate. 25 fps in this case.
    2. Click on the Project Name to open the Project settings menu. Select the Video tab and set the Format to 1080i 25fps.
    3. You can now import you video.
    4. It will however be 20% quicker than the time set in ArcGIS.