Video effects and compositing with Natron

Natron [1] belongs to the genre of so-called compositing programs in which video effects and video compositing play the dominant role. Unlike video editing programs such as Kdenlive and OpenShot, Natron offers both video cutting and effects, all in little boxes. These little boxes are known as nodes , and they can be connected to each other by lines, thus making way for more complex compositions. As a consequence, it takes somewhat longer to get accustomed to working with Natron.

Nouvelle Vague

Natron originated in 2013 at the French research institute Inria [2]. The project leader Alexandre Gauthier Foichat even won a competition with the effects program, which in turn made it possible for him to work on it full time. Version 1.0.0 finally appeared at Christmas 2014. Before that time, several preliminary versions suitable for use had been released by the developers. Each version included multiple small modifications. The developers have continued to follow this pattern with changes in subsequent versions. Version 1.2.1, for example, contained corrections for errors, and also included a new effects node.

New versions appeared each month until the developers gave themselves six months off. In the fall of 2016, they again released numerous preliminary versions until Natron 2.0.0 finally appeared in March 2016. Although a new whole version number might suggest major changes to the user interface, the program included multiple small changes, so if you used an earlier version of the software, you didn't have to spend time getting accustomed to an entirely new setup.

Among the more notable improvements to be found in the new version is the Dope Sheet editor, which edits effects and clips on the timeline. New nodes integrate effects that can be rendered by the ImageMagick image editor. Since March, the developers have been releasing a new version each month, primarily for the purpose of correcting errors. When testing Natron for this article, version 2.0.5 was available and serves as the basis for this article.

Loads of Functions

The vast number of functions Natron brings to the table confirms the program is intended for professional users. For example, it supports technologies such as rotoscoping and rotopainting, thus making it possible to trace over animated videos. The tracking function is partially automatic and tracks cars and other moving objects. Natron can be controlled via Python2 scripts and from the command line, which becomes useful when computing elaborate effects on servers.

Natron is distributed under a GNU GPLv2 license and is built on free components. As a result, OpenColorIO looks after the color features, and OpenImageIO and FFmpeg import and export practically all existing image and video formats. Natron has expanded its effects capabilities and they comply with version 1.4 of the OpenFX standard – including commercial effects. An auto-save function does away with anxieties over the potential effect of a crash. Colors are saved internally with 32-bit floating-point numbers, giving Natron precise color correction capabilities.

The compositing program harnesses all of its processor cores, so work proceeds quickly right from the start. Even so, Natron is frugal with resources. As a rule, 3GB of main memory and a 3D graphics card suffice. However, the graphics card has to support OpenGL standard 1.5 with the following extensions:

  • GL_ARB_texture_non_power_of_two
  • GL_ARB_shader_objects
  • GL_ARB_vertex_buffer_object
  • GL_ARB_pixel_buffer_object
  • GL_ARB_framebuffer_object
  • GL_ARB_texture_float

The command

glxinfo | grep GL_ARB

checks to see whether the graphics card offers these extensions.

Registration Requirement

The developers offer Natron in various package formats. You only have to select and download the package suitable for your distribution [3]. If you have any doubts, you can click on the yellow box, which downloads a .tar.xz archive with statically compiled binaries. The download only starts once you have registered on the Natron website, although you pay no fee for doing so. If you do not want to register, you need to get the source code from GitHub [4] and compile it. Once the .tar.xz archive is decompressed, all that remains is to start the Natron script.

Figure 1 shows a preview window at the top left. Aside from the videos located in the gray rectangle, nothing else appears in the film generated by Natron. The additional space surrounding the rectangle can be useful when you want to insert a second clip into the scene. In the lower left, you put the effects together. Their properties appear in the sidebar on the upper right edge under Properties. Inside a few moments, you view the basic properties of the film under Project Settings.

Figure 1: The main window in Natron is graced by a monitor that is as large as possible. Whatever the size of your monitor, you can select the font size under Edit | Preferences.

Retrieved

You should make sure that the the lower left area shows the NodeGraph register. It displays each video piece and every effect as a small box or node. The Viewer node already located there works with the preview monitor in the top left area. The black lines leading from the nodes are best thought of as video cables. Because these are not connected to anything at first, the preview presents a black image.

To change this, right-click anyplace next to the Viewer and make a selection from the Image | Readers | ReadFFmpeg menu. Then select a video file from the hard drive. After clicking on Open , Natron creates a new node that represents the clip and then labels it ReadFFmpeg1 . At the same time, extensive information about the file appears at the top right in the Properties box (Figure 2).

Figure 2: The clip name shows in the Properties box under "File." You can also exchange the clip for another by clicking the symbol found to the right of the file name.

Additionally, Natron should have connected the nodes with the first input of the preview. Here the ReadFFmpeg1 node reads the video from the hard drive and transfers it to the viewer in the upper left, where it is finally viewable in the preview. Under the preview you have a timeline and various playback buttons (Figure 3). For example, the triangle symbol sitting to the right of the frame number at the bottom is used to start a film.

Figure 3: Natron counts through the images, otherwise known as frames. Here the preview is showing frame 4915. To navigate quickly through the film, you can also move the orange-colored triangle on the timeline control.

Veiled

Effects are added in the same way as described with the video. Right-click in the NodeGraph free space and then decide in the lower area of the context menu which effect to use. For example, to create a black and white film, add a node for color correction by clicking on Color | ColorCorrect . To keep the image black and white, the video has to run through the color correction node ColorCorrect1 . This node pulls saturation from the image and transfers the colorless result into the foreground.

Under certain circumstances, Natron will already have created the necessary connection. Otherwise, you will have to do this manually. Use the mouse to connect the Source of the color corrector by left-clicking and pulling the cable to the ReadFFmpeg1 video node (Figure 4). As soon as the mouse button is released, Natron connects the video with the color corrector. In the same way, you can also pull the source of the viewer to the color corrector ColorCorrect1 . The mouse wheel lets you navigate through the cables. The nodes can be moved by dragging and dropping them across the surface to make room for other connections. Images are centered by pressing the F key.

Figure 4: The ReadFFmpeg1 node reads the video from the hard drive and transfers it to the ColorCorrect1 node, which performs a color correction. The node then passes the result on to the Viewer1 node, which then shows the video in the preview.

Now the video runs through the color corrector to the preview. To the right, in the Properties box, Natron displays the properties of the color corrector (Figure 5). When you move the Saturation controller bar to the left, colors are pulled out, and only a black and white image remains in the preview. Additional effects are added in the same fashion. To remove a node, click on it to cause a white border to form around the node. Once this border appears, press the Delete key.

Figure 5: To set the color properties, either drag the small green controller or enter a value directly into the entry field.

Trading Places

Using yet another node, you can export the film by right-clicking in the NodeGraph area and selecting Image | Writers | WriteFFmpeg . In the new window, select the desired file format under File type (e.g., MP4 ) and give it a file name to the right next to Sequence . After clicking on Save , the new WriteFFmpeg1 node appears. Drag its Source to the color corrector node ColorCorrect1 .

A single output can be connected to multiple sources. In this example, the black and white image connects to the preview node and the output node that creates a file. The Properties box on the right shows all of the export settings. You can adjust the Format and Codec as desired, and you should specify the Format Type as Project format . Clicking the Render button then causes Natron to export the video.

Overview

The developers are already busily working on the next version of Natron, and version 2.1 should be available by the time you read this article. That version will focus on improving the rotoscoping tool and integration with Blender. Moreover, a single read/write node will make the numerous individual nodes currently used in reading and writing obsolete; that is, nodes such as ReadFFMPEG and WriteOIIO go away.

For the most part, you have to research the functions and numerous Natron buttons yourself. The little help provided consists of paltry entries in a wiki [5] and a few tutorials [6]. Plans for versions beyond 2.2 promise, among other things, better support for 3D, including a 3D camera and a 3D tracker. Also in the offing is integration of the GMIC filter, a favorite with Gimp users.